body {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #120005;
    background-image:
        radial-gradient(circle at top left, rgba(255, 110, 96, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 32, 32, 0.24), transparent 28%),
        linear-gradient(115deg, rgba(255,255,255,0.03) 10%, transparent 10%, transparent 90%, rgba(255,255,255,0.03) 90%),
        linear-gradient(25deg, rgba(255,255,255,0.03) 10%, transparent 10%, transparent 90%, rgba(255,255,255,0.03) 90%);
    background-size: cover, cover, 80px 80px, 80px 80px;
    background-blend-mode: screen, screen, overlay, overlay;
    color: #f2f2f2;
}

* {
    box-sizing: border-box;
}

#app {
    min-height: 100vh;
}

header {
    background: rgba(255, 255, 255, 0.96);
    color: #1f1f1f;
    padding: 1.15rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: relative;
    top: auto;
    z-index: auto;
}

body:not(.is-authenticated) header {
    min-height: 100vh;
    align-items: stretch;
    padding: clamp(1.25rem, 4vw, 3.5rem);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 44%, rgba(18, 0, 5, 0.18) 100%),
        linear-gradient(135deg, #fff 0%, #fff7f4 44%, #ffd7ce 100%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

body:not(.is-authenticated) .logo-brand {
    position: absolute;
    top: clamp(1.25rem, 3vw, 2.5rem);
    left: clamp(1.25rem, 4vw, 3.5rem);
    z-index: 2;
}

.logo-title {
    display: inline-flex;
    align-items: center;
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.08em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ff8a4f, #ff2525 45%, #d60c18);
    -webkit-background-clip: text;
    color: transparent;
    transform: skewX(-18deg);
    text-shadow: 0 0 12px rgba(0,0,0,0.25);
    -webkit-text-stroke: 0.9px rgba(0,0,0,0.75);
}

.logo-image {
    width: 320px;
    max-width: 100%;
    height: auto;
    display: block;
}

header h1 {
    font-size: 2.2rem;
    margin: 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-tagline {
    margin: 0.15rem 0 0;
    color: rgba(34,34,34,0.75);
    font-size: 0.95rem;
    font-weight: 500;
}

#auth-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

body:not(.is-authenticated) #auth-section {
    width: 100%;
    align-items: center;
    justify-content: center;
    padding-top: 7rem;
}

.auth-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sign-in-panel {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
}

.sign-in-copy {
    color: #1f1f1f;
    max-width: 610px;
}

.eyebrow,
.form-kicker {
    display: inline-flex;
    align-items: center;
    color: #d92323;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sign-in-copy h1 {
    margin: 0.85rem 0 1rem;
    max-width: 10ch;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.92;
    letter-spacing: 0;
}

.sign-in-copy p {
    max-width: 32rem;
    margin: 0;
    color: rgba(31, 31, 31, 0.72);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
}

.sign-in-card {
    width: 100%;
    padding: clamp(1.25rem, 3vw, 1.8rem);
    border: 1px solid rgba(31, 31, 31, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 28px 80px rgba(54, 5, 8, 0.16);
    backdrop-filter: blur(16px);
}

.sign-in-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.sign-in-card h2 {
    margin: 0.25rem 0 0;
    font-size: 1.8rem;
    letter-spacing: 0;
}

.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: max-content;
    color: rgba(31, 31, 31, 0.7);
    font-size: 0.92rem;
    font-weight: 700;
}

.switch-label input {
    width: 1rem;
    height: 1rem;
    accent-color: #ff5252;
}

.input-stack {
    display: grid;
    gap: 0.85rem;
}

#auth-section input,
#auth-section button,
.auth-panel label {
    margin: 0;
}

#auth-section input[type="text"],
#auth-section input[type="email"],
#auth-section input[type="password"] {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 0.95rem 1rem;
    outline: none;
    width: 100%;
    min-width: 180px;
    background: rgba(255,255,255,0.94);
    color: #1f1f1f;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

#auth-section input::placeholder {
    color: rgba(31,31,31,0.45);
}

#auth-section input:focus {
    border-color: rgba(255, 82, 82, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 82, 82, 0.12);
}

#auth-section button {
    border: none;
    background: #ff5252;
    color: white;
    border-radius: 8px;
    padding: 0.95rem 1.4rem;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sign-in-card #submit-btn {
    width: 100%;
    margin-top: 1rem;
}

#auth-section button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 82, 82, 0.24);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

#message {
    min-height: 1.2rem;
    margin: 0.85rem 0 0;
    color: #b42323;
    font-size: 0.92rem;
}

select, input[type="number"] {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 0.85rem 1rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    min-width: 180px;
}

select {
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.75) 50%), linear-gradient(135deg, rgba(255,255,255,0.75) 50%, transparent 50%);
    background-position: calc(100% - 1rem) calc(50% - 3px), calc(100% - 0.6rem) calc(50% - 3px);
    background-size: 8px 8px;
    background-repeat: no-repeat;
}

main {
    padding: 1rem 1.5rem 1.5rem;
    min-height: calc(100vh - 6.5rem);
    display: flex;
    flex-direction: column;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    justify-content: center;
}

nav button {
    padding: 0.9rem 1.2rem;
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#add-workout-btn {
    order: -1;
    flex-basis: 100%;
    max-width: 220px;
    margin: 0 auto 0.15rem;
}

nav button:hover,
nav button.active {
    background-color: rgba(255, 82, 82, 0.94);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(255, 50, 50, 0.2);
}

#content {
    min-height: 60vh;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.leaderboard-card {
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.16);
    padding: 1.2rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease;
}

.leaderboard-card:hover {
    transform: translateY(-6px);
}

.leaderboard-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: #fff;
}

.leaderboard-rank {
    font-size: 2rem;
    font-weight: 900;
    color: #ffdde0;
}

.leaderboard-meta {
    color: rgba(255,255,255,0.72);
    margin-top: 0.8rem;
    font-size: 0.95rem;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.leaderboard-controls {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.section-title {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #fff;
}

.home-screen {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.home-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    border-radius: 32px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
}

.logo-animate {
    width: 5rem;
    height: 5rem;
    font-size: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: 1.5rem;
    background: radial-gradient(circle at top left, #ff7a53, #d32f2f);
    box-shadow: 0 0 0 rgba(255, 101, 101, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

.home-hero h2 {
    margin: 0;
    font-size: 3rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.home-tag {
    color: rgba(255,255,255,0.72);
    font-size: 1rem;
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.home-card {
    display: grid;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.home-card span {
    font-size: 2rem;
}

.home-card strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.home-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.14);
}

.home-guides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.guide-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    text-align: center;
}

.guide-card span {
    font-size: 1.75rem;
}

.guide-card p {
    margin: 0;
    color: rgba(255,255,255,0.84);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 101, 101, 0.4); }
    50% { box-shadow: 0 0 28px 8px rgba(255, 101, 101, 0.2); }
}

.tutorial-step-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.tutorial-step-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.tutorial-step-text {
    margin-bottom: 1rem;
}

#content {
    flex: 1;
}

.heart-btn {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.heart-btn:hover {
    background: rgba(255,255,255,0.2);
}

.heart-btn.liked {
    background: rgba(255, 60, 60, 0.98);
    color: #fff;
}

.follow-btn,
.filter-btn {
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    padding: 0.85rem 1.1rem;
    margin: 0.25rem 0.25rem 0 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.follow-btn:hover,
.filter-btn:hover {
    background: rgba(255,255,255,0.2);
}

.filter-btn.active {
    background: #ff5252;
    color: #fff;
}

.connection-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.profile-filter-card {
    margin-top: 1rem;
}

.profile-filter-card .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.profile-filter-card h3 {
    margin-bottom: 0.5rem;
}

.profile-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
}

.section-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1rem;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}

.section-subnav button {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem 0.95rem;
    background: rgba(255,255,255,0.055);
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
}

.section-subnav button:hover,
.section-subnav button.active {
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(255, 82, 24, 0.18);
}

.profile-subnav-btn {
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    background: rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.profile-subnav-btn:hover,
.profile-subnav-btn.active {
    background: rgba(255, 82, 82, 0.94);
    color: #fff;
    transform: translateY(-1px);
}

.profile-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.profile-section-card {
    border-radius: 24px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 1.25rem;
}

.profile-section-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.discovery-item,
.leaderboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.discovery-item:last-child,
.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-mini {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.leaderboard-block {
    margin-top: 1rem;
}

.leaderboard-block h4 {
    margin-bottom: 0.75rem;
}

.profile-card .story-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.profile-card {
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.16);
    padding: 1.4rem;
    box-shadow: 0 18px 38px rgba(0,0,0,0.18);
}

.motivation-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.motivation-text {
    margin: 0 0 1rem;
    color: rgba(255,255,255,0.92);
    font-size: 0.98rem;
    line-height: 1.6;
}

.progress-row {
    display: grid;
    gap: 0.55rem;
}

.progress-label {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
}

.progress-track {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff8a4f, #ff2525);
    border-radius: 999px 0 0 999px;
}

.progress-meta {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.78);
}

.profile-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-summary h2 {
    margin: 0;
    font-size: 1.85rem;
    color: #fff;
}

.profile-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.badge {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    flex: 1 1 120px;
    min-width: 120px;
    text-align: center;
}

.badge strong {
    display: block;
    font-size: 1.2rem;
    color: #fff;
}

.badge span {
    display: block;
    margin-top: 0.35rem;
    color: rgba(255,255,255,0.72);
    font-size: 0.95rem;
}

.story-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    overflow: hidden;
    padding-bottom: 0.5rem;
}

.story-pill {
    min-width: 140px;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    flex: 1 1 140px;
}

.story-pill h4 {
    margin: 0 0 0.5rem;
}

.profile-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.profile-feed-card {
    border-radius: 24px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profile-feed-card h4 {
    margin: 0 0 0.6rem;
}

.profile-feed-card p {
    margin: 0 0 0.9rem;
    color: rgba(255,255,255,0.85);
}

@media (max-width: 840px) {
    .profile-header {
        grid-template-columns: 1fr;
    }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 101, 101, 0.4); }
    50% { box-shadow: 0 0 28px 8px rgba(255, 101, 101, 0.2); }
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.achievement-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 28px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.17);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.achievement-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(0,0,0,0.24);
}

.achievement-card.fire-glow {
    box-shadow: 0 28px 80px rgba(255, 84, 84, 0.45), 0 0 32px rgba(255, 119, 34, 0.35);
    border-color: rgba(255, 135, 84, 0.55);
}

.achievement-image {
    font-size: 4.5rem;
    margin-bottom: 1rem;
}

.achievement-image img {
    display: inline-block;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.18));
}

.achievement-stats {
    font-family: 'Impact', sans-serif;
    font-size: 1.3rem;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.achievement-details {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
    margin-top: 0.85rem;
    line-height: 1.6;
}

.achievement-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.achievement-card button,
.achievement-card .share-btn,
.achievement-card .delete-btn {
    margin-top: 0;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.1rem;
    background: rgba(255,255,255,0.12);
    color: white;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.achievement-card button:hover,
.achievement-card .share-btn:hover,
.achievement-card .delete-btn:hover {
    background: rgba(255,255,255,0.2);
}

.achievement-card .delete-btn.confirming {
    background: #ff3d3d;
    box-shadow: 0 12px 20px rgba(255, 77, 77, 0.35);
}

.detail-panel {
    border-radius: 28px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 24px 50px rgba(0,0,0,0.23);
    position: relative;
}

.detail-panel.fire-glow {
    box-shadow: 0 24px 70px rgba(255, 84, 84, 0.45), 0 0 36px rgba(255, 150, 50, 0.27);
}

.detail-panel h3 {
    margin-top: 0;
    color: #fff;
}

.detail-panel .detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
}

.detail-panel .detail-close:hover {
    background: rgba(255,255,255,0.18);
}

.detail-panel p {
    color: rgba(255,255,255,0.88);
    line-height: 1.6;
}

.comment-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.comment-section h4 {
    margin: 0 0 0.75rem;
    color: #fff;
}

.comments-list {
    display: grid;
    gap: 0.75rem;
}

.comment-item {
    padding: 0.95rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}

.comment-text {
    color: rgba(255,255,255,0.92);
    font-size: 0.95rem;
    line-height: 1.5;
}

.comment-empty {
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.95rem;
}

.comment-form {
    margin-top: 1rem;
    display: grid;
    gap: 0.65rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 1rem;
    resize: vertical;
    outline: none;
}

.comment-form textarea::placeholder {
    color: rgba(255,255,255,0.65);
}

.comment-delete-btn {
    margin-top: 0.75rem;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    background: rgba(255, 80, 80, 0.16);
    color: #ffb3b3;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.comment-delete-btn:hover {
    background: rgba(255, 80, 80, 0.28);
    transform: translateY(-1px);
}

.comment-form button {
    align-self: flex-end;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.3rem;
    background: #ff5252;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255,82,82,0.24);
}

.hidden {
    display: none !important;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    overflow: hidden;
}

table th, table td {
    padding: 1rem 0.85rem;
    text-align: left;
    color: #eee;
}

table th {
    background: rgba(255,255,255,0.08);
    font-weight: 700;
}

table tr:nth-child(even) {
    background: rgba(255,255,255,0.05);
}

.add-card {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

.add-card-panel {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 28px;
    padding: 1.5rem;
    box-shadow: 0 24px 50px rgba(0,0,0,0.2);
}

.tutorial-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
}

.tutorial-hero h3 {
    margin: 0.25rem 0 0.35rem;
    font-size: 1.2rem;
}

.tutorial-hero p,
.small-label {
    margin: 0;
    color: rgba(255,255,255,0.78);
}

.tutorial-toggle {
    border: none;
    background: #ff5252;
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tutorial-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(255, 82, 82, 0.24);
}

.tutorial-panel {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 24px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
}

.tutorial-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.tutorial-step-text {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tutorial-controls {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tutorial-controls button {
    flex: 1 1 30%;
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tutorial-controls button:hover:not(:disabled) {
    background: rgba(255,255,255,0.22);
}

.tutorial-controls button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.add-form {
    display: grid;
    gap: 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 28px;
    padding: 1.5rem;
    box-shadow: 0 22px 48px rgba(0,0,0,0.18);
}

.form-row {
    display: grid;
    gap: 0.5rem;
}

.form-row label {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.84);
}

.form-row input,
.form-row select {
    width: 100%;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.14);
    padding: 0.95rem 1.1rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    outline: none;
}

.form-row.checkbox-row {
    flex-direction: row;
    align-items: center;
    display: flex;
}

.form-row.checkbox-row label {
    margin: 0;
    gap: 0.75rem;
    display: inline-flex;
    align-items: center;
}

.add-form button {
    border: none;
    border-radius: 999px;
    padding: 0.95rem 1.4rem;
    background: #ff5252;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 82, 82, 0.22);
}

@media (max-width: 920px) {
    .add-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    header {
        flex-direction: column;
        align-items: stretch;
    }

    body:not(.is-authenticated) header {
        min-height: auto;
        padding: 1.15rem;
    }

    body:not(.is-authenticated) .logo-brand {
        position: static;
        align-items: center;
    }

    body:not(.is-authenticated) #auth-section {
        padding-top: 1.75rem;
    }

    .sign-in-panel {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sign-in-copy {
        text-align: center;
        justify-self: center;
    }

    .sign-in-copy h1 {
        max-width: 100%;
        font-size: clamp(2.6rem, 13vw, 4.2rem);
    }

    .sign-in-card-header {
        flex-direction: column;
    }

    .brand {
        justify-content: center;
    }

    #auth-section {
        justify-content: center;
    }

    .achievement-card {
        padding: 1rem;
    }

    table th, table td {
        padding: 0.75rem 0.75rem;
    }
}

/* Polished fire dashboard theme */
:root {
    --bg: #070405;
    --surface: rgba(17, 18, 20, 0.86);
    --surface-strong: rgba(24, 25, 28, 0.94);
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 123, 52, 0.34);
    --text: #f8f5f2;
    --muted: rgba(248, 245, 242, 0.66);
    --fire: #ff7a1a;
    --fire-hot: #ff3d1f;
    --ember: #ffb347;
    --app-header-height: 82px;
    --profile-card-bg: linear-gradient(180deg, rgba(24, 25, 28, 0.9), rgba(10, 11, 13, 0.9));
    --profile-card-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 22px 58px rgba(0,0,0,0.22);
}

body {
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, rgba(255, 122, 26, 0.08), transparent 34%),
        radial-gradient(circle at 88% 14%, rgba(255, 61, 31, 0.26), transparent 30%),
        radial-gradient(circle at 12% 76%, rgba(255, 179, 71, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 70px);
    color: var(--text);
}

body.is-authenticated header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: var(--app-header-height);
    padding: 0.7rem 1.25rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 20%, rgba(255, 122, 26, 0.12), transparent 24%),
        rgba(7, 4, 5, 0.94);
    color: var(--text);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

body.is-authenticated .brand-tagline {
    display: none;
}

body.is-authenticated .logo-image {
    width: 168px;
}

main {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: calc(var(--app-header-height) + 1rem) clamp(1rem, 3vw, 2.5rem) 2rem;
}

nav {
    position: sticky;
    top: var(--app-header-height);
    z-index: 12;
    padding: 0.75rem 0;
    background: linear-gradient(180deg, rgba(7, 4, 5, 0.96), rgba(7, 4, 5, 0.78));
    backdrop-filter: blur(14px);
}

nav::after {
    content: "";
    display: block;
    flex-basis: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 122, 26, 0.38), transparent);
    order: 99;
}

nav button,
.profile-subnav-btn,
.filter-btn,
.follow-btn,
.heart-btn,
.tutorial-controls button,
.achievement-card button,
.achievement-card .share-btn,
.achievement-card .delete-btn,
.comment-form button,
.add-form button,
.tutorial-toggle {
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 800;
}

nav button:hover,
nav button.active,
.profile-subnav-btn:hover,
.profile-subnav-btn.active,
.filter-btn.active,
.tutorial-toggle,
.add-form button,
.comment-form button {
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    border-color: transparent;
    box-shadow: 0 16px 32px rgba(255, 90, 28, 0.22);
}

nav button.active {
    color: #fff;
}

#user-info {
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

#user-name {
    padding-left: 0.75rem;
    color: var(--text);
    font-weight: 800;
}

#logout-btn {
    border-radius: 999px;
}

body:not(.is-authenticated) header {
    background:
        linear-gradient(90deg, rgba(8, 5, 5, 0.92) 0%, rgba(12, 8, 8, 0.82) 52%, rgba(255, 90, 28, 0.18) 100%),
        radial-gradient(circle at 76% 38%, rgba(255, 122, 26, 0.28), transparent 34%),
        linear-gradient(135deg, #090607 0%, #180706 100%);
    color: var(--text);
}

body:not(.is-authenticated) .brand-tagline,
body:not(.is-authenticated) .sign-in-copy p {
    color: var(--muted);
}

body:not(.is-authenticated) .sign-in-copy,
body:not(.is-authenticated) .sign-in-card h2 {
    color: var(--text);
}

body:not(.is-authenticated) .sign-in-copy h1 span,
.home-hero h2 span,
.eyebrow,
.form-kicker {
    color: var(--fire);
}

.sign-in-card {
    background: linear-gradient(180deg, rgba(26, 26, 29, 0.92), rgba(12, 12, 14, 0.88));
    border-color: var(--line-strong);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38), 0 0 44px rgba(255, 87, 24, 0.12);
}

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

#auth-section input[type="text"],
#auth-section input[type="email"],
#auth-section input[type="password"] {
    background: rgba(255, 255, 255, 0.075);
    border-color: var(--line);
    color: var(--text);
    box-shadow: none;
}

#auth-section input::placeholder {
    color: rgba(248, 245, 242, 0.46);
}

#auth-section button,
.sign-in-card #submit-btn {
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    box-shadow: 0 16px 34px rgba(255, 82, 24, 0.24);
}

.home-screen {
    gap: 1.35rem;
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    min-height: 420px;
    overflow: hidden;
    border-radius: 8px;
    padding: clamp(1.5rem, 4vw, 3rem);
    text-align: left;
    border: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(7, 4, 5, 0.98) 0%, rgba(7, 4, 5, 0.78) 50%, rgba(255, 82, 24, 0.1) 100%),
        radial-gradient(circle at 72% 42%, rgba(255, 122, 26, 0.34), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 64px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 28px 80px rgba(0, 0, 0, 0.28);
}

.home-hero,
.feature-hero,
.achievements-hero,
.profile-hero-web {
    border-color: rgba(255, 122, 26, 0.2);
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 55%, rgba(255, 122, 26, 0.14) 55% 57%, transparent 57%),
        linear-gradient(122deg, transparent 64%, rgba(255, 61, 31, 0.18) 64% 66%, transparent 66%);
}

.home-hero-copy {
    position: relative;
    z-index: 1;
    align-self: center;
}

.home-hero h2 {
    margin: 0.65rem 0 1rem;
    font-size: clamp(2.6rem, 7vw, 6.25rem);
    line-height: 0.92;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--text);
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

.home-tag {
    max-width: 34rem;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.65rem;
}

.hero-actions button,
.goal-card button,
.recent-card .card-title button {
    border: none;
    border-radius: 8px;
    padding: 0.95rem 1.25rem;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    box-shadow: 0 16px 32px rgba(255, 82, 24, 0.24);
}

.hero-actions .secondary-action,
.recent-card .card-title button {
    background: transparent;
    border: 1px solid var(--line);
    box-shadow: none;
}

.hero-mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: 280px;
}

.hero-mark::before {
    content: "";
    position: absolute;
    width: min(88%, 380px);
    aspect-ratio: 1;
    border: 26px solid rgba(255, 122, 26, 0.22);
    transform: rotate(45deg);
    box-shadow: 0 0 48px rgba(255, 82, 24, 0.16);
}

.hero-flame {
    position: relative;
    font-size: clamp(6rem, 16vw, 13rem);
    filter: drop-shadow(0 26px 46px rgba(255, 82, 24, 0.34));
    animation: pulse 1.8s ease-in-out infinite;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr minmax(280px, 0.95fr);
    gap: 1.1rem;
}

.dashboard-card,
.leaderboard-card,
.profile-card,
.profile-section-card,
.profile-feed-card,
.achievement-card,
.detail-panel,
.add-card-panel,
.add-form,
.tutorial-panel,
.guide-card {
    border-radius: 8px;
    background: var(--profile-card-bg);
    border: 1px solid var(--line);
    box-shadow: var(--profile-card-shadow);
    backdrop-filter: blur(14px);
}

.dashboard-card {
    padding: 1.5rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.card-title h3 {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
}

.card-title span {
    color: var(--fire);
    font-weight: 900;
    font-size: 1.3rem;
}

.recent-card .card-title button {
    margin-left: auto;
    padding: 0.55rem 0.85rem;
    color: var(--fire);
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.stat-item {
    min-height: 116px;
    display: grid;
    place-items: center;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.stat-item:nth-child(2n) {
    border-right: none;
}

.stat-item:nth-last-child(-n + 2) {
    border-bottom: none;
}

.stat-item span {
    color: var(--fire);
    font-size: 1.55rem;
    filter: drop-shadow(0 8px 14px rgba(255, 82, 24, 0.26));
}

.stat-item strong {
    display: block;
    font-size: 2rem;
    color: var(--text);
}

.stat-item small,
.recent-row span,
.recent-row small,
.goal-card p,
.achievement-details,
.leaderboard-meta,
.profile-feed-card p,
.profile-summary p,
.tutorial-hero p,
.small-label,
.form-row label {
    color: var(--muted);
}

.recent-list {
    display: grid;
    gap: 0.25rem;
}

.recent-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.recent-row:last-child {
    border-bottom: none;
}

.recent-row strong {
    color: var(--text);
}

.recent-row span {
    grid-column: 1;
}

.recent-row small {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
}

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

.goal-card {
    display: grid;
    justify-items: center;
    text-align: center;
}

.goal-card .card-title {
    justify-self: stretch;
}

.goal-ring {
    width: 170px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    margin: 0.5rem 0 1rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #111214 0 56%, transparent 57%),
        conic-gradient(var(--fire) var(--progress), rgba(255,255,255,0.11) 0);
    box-shadow: 0 0 34px rgba(255, 82, 24, 0.18);
}

.goal-ring div {
    display: grid;
    gap: 0.15rem;
}

.goal-ring strong {
    font-size: 2.35rem;
}

.goal-ring span {
    color: var(--muted);
}

.section-title h2,
.leaderboard-card h3,
.profile-summary h2,
.profile-section-card h3,
.profile-card h3,
.detail-panel h3,
.add-card-panel h2,
.add-card-panel h3,
.achievement-stats,
.feature-hero h2,
.achievements-hero h2,
.leaderboard-header h2 {
    color: var(--text);
    letter-spacing: 0;
}

.section-title h2,
.feature-hero h2,
.achievements-hero h2,
.leaderboard-header h2,
.add-card-panel h2 {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    text-transform: uppercase;
    color: var(--text);
}

.section-title p,
.feature-hero p,
.achievements-hero p,
.leaderboard-header p,
.add-card-panel p,
.tutorial-step-text,
.detail-panel p {
    color: var(--muted);
}

.achievement-card.fire-glow,
.detail-panel.fire-glow {
    border-color: var(--line-strong);
    box-shadow: 0 28px 72px rgba(255, 82, 24, 0.22), inset 0 1px 0 rgba(255,255,255,0.08);
}

.progress-fill {
    background: linear-gradient(90deg, var(--ember), var(--fire-hot));
}

.badge,
.story-pill,
.comment-item,
.tutorial-hero {
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    border: 1px solid var(--line);
}

.leaderboard-card,
.achievement-card,
.profile-feed-card,
.profile-section-card,
.record-card,
.template-card,
.goal-item,
.challenge-card,
.badge-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.leaderboard-card:hover,
.achievement-card:hover,
.profile-feed-card:hover,
.profile-section-card:hover,
.record-card:hover,
.template-card:hover,
.goal-item:hover,
.challenge-card:hover,
.badge-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 24px 62px rgba(255, 82, 24, 0.12), inset 0 1px 0 rgba(255,255,255,0.08);
}

.leaderboard-rank,
.badge strong,
.progress-meta strong,
.achievement-summary strong,
.next-achievement strong {
    color: var(--fire);
}

.achievement-image,
.tutorial-step-icon,
.guide-card span,
.home-card span {
    color: var(--fire);
}

.form-row input,
.form-row select,
select,
input[type="number"],
.comment-form textarea {
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    border-color: var(--line);
    color: var(--text);
}

.form-row input:focus,
.form-row select:focus,
select:focus,
input[type="number"]:focus,
.comment-form textarea:focus,
.goal-form input:focus,
.profile-edit-panel input:focus {
    outline: none;
    border-color: var(--fire);
    box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.12);
}

.achievements-screen {
    display: grid;
    gap: 1rem;
}

.achievements-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.achievements-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -90px;
    width: 260px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 122, 26, 0.22), transparent 64%);
    pointer-events: none;
}

.achievements-hero h2 {
    margin: 0.45rem 0 0.6rem;
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
}

.achievements-hero p,
.next-achievement p,
.badge-card p {
    color: var(--muted);
    line-height: 1.55;
}

.achievement-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 0.75rem;
}

.achievement-summary div {
    min-width: 100px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    text-align: center;
}

.achievement-summary strong {
    display: block;
    color: var(--text);
    font-size: 1.7rem;
}

.achievement-summary span,
.next-achievement span,
.badge-meta,
.next-achievement small {
    color: var(--muted);
}

.next-achievement {
    display: grid;
    gap: 0.55rem;
}

.next-achievement strong {
    color: var(--text);
    font-size: 1.35rem;
}

.next-achievement.unlocked {
    border-color: var(--line-strong);
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.badge-card {
    display: grid;
    gap: 0.8rem;
    min-height: 240px;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(24, 25, 28, 0.88), rgba(10, 11, 13, 0.86));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 18px 44px rgba(0, 0, 0, 0.22);
}

.badge-card.unlocked {
    border-color: var(--line-strong);
    box-shadow: 0 22px 58px rgba(255, 82, 24, 0.14), inset 0 1px 0 rgba(255,255,255,0.08);
}

.badge-card.locked {
    opacity: 0.62;
    filter: grayscale(0.72);
}

.badge-icon {
    width: 64px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 122, 26, 0.1);
    border: 1px solid rgba(255, 122, 26, 0.24);
    font-size: 2rem;
}

.badge-card h3 {
    margin: 0;
    color: var(--text);
}

.badge-card p {
    margin: 0.4rem 0 0;
}

.achievement-progress {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.08);
}

.achievement-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ember), var(--fire-hot));
    box-shadow: 0 0 18px rgba(255, 82, 24, 0.28);
}

.badge-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    font-weight: 800;
}

.feature-screen {
    display: grid;
    gap: 1rem;
}

.feature-hero h2 {
    margin: 0.45rem 0 0.55rem;
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.feature-hero p,
.record-card p,
.template-card p,
.goal-item p,
.challenge-card p {
    color: var(--muted);
    line-height: 1.55;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(34px, 1fr));
    gap: 0.55rem;
}

.calendar-day {
    min-height: 70px;
    display: grid;
    align-content: space-between;
    padding: 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.045);
    color: var(--muted);
}

.calendar-day.level-1 {
    background: rgba(255, 122, 26, 0.18);
    color: var(--text);
}

.calendar-day.level-2 {
    background: rgba(255, 122, 26, 0.34);
    color: var(--text);
}

.calendar-day.level-3 {
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    color: #fff;
}

.record-card,
.template-card,
.goal-item,
.challenge-card {
    display: grid;
    gap: 0.75rem;
}

.record-card span {
    font-size: 2.5rem;
}

.record-card img {
    width: 2.8rem;
    height: 2.8rem;
    object-fit: contain;
}

.record-card strong {
    color: var(--text);
    font-size: 1.35rem;
}

.chart-panel {
    min-height: 260px;
}

.chart-panel h3 {
    margin-top: 0;
    color: var(--text);
}

.bar-chart {
    height: 190px;
    display: flex;
    align-items: end;
    gap: 0.55rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.bar {
    flex: 1;
    min-width: 18px;
    display: grid;
    align-items: start;
    justify-items: center;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--ember), var(--fire-hot));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
}

.bar.volume {
    background: linear-gradient(180deg, #ffd36b, var(--fire));
}

.template-card button,
.goal-form button,
.goal-item button {
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.goal-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
}

.goal-form input,
.profile-edit-panel input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 0.9rem 1rem;
    background: rgba(255,255,255,0.07);
    color: var(--text);
}

.profile-edit-panel {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.profile-edit-panel h3 {
    margin: 0;
}

.profile-avatar-large {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--line-strong);
}

.milestone-panel {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
}

.milestone-panel p {
    margin-bottom: 0;
}

.milestone-photo {
    width: min(100%, 520px);
    max-height: 340px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.profile-page {
    display: grid;
    gap: 1.25rem;
}

.profile-hero-web {
    display: grid;
    gap: 1.6rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 122, 26, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(18, 18, 20, 0.94), rgba(7, 7, 8, 0.94));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 26px 70px rgba(0,0,0,0.28);
}

.profile-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
}

.profile-avatar-large {
    width: clamp(120px, 16vw, 190px);
    height: clamp(120px, 16vw, 190px);
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--fire);
    background: #0c0c0d;
    box-shadow: 0 0 0 8px rgba(255, 122, 26, 0.08), 0 0 42px rgba(255, 92, 24, 0.2);
}

.profile-identity h2 {
    margin: 0.55rem 0 0.25rem;
    color: var(--text);
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 0.95;
}

.profile-motto {
    margin: 0;
    color: var(--fire);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 800;
}

.profile-member {
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.profile-xp-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.level-badge {
    width: 108px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    text-align: center;
    clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    color: #fff;
    padding: 0.8rem;
}

.level-badge span {
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.level-badge strong {
    display: block;
    font-size: 2.1rem;
    line-height: 1;
}

.xp-panel {
    display: grid;
    gap: 0.65rem;
}

.xp-panel strong {
    color: var(--fire);
    font-size: 1.35rem;
}

.xp-panel span {
    justify-self: end;
    color: var(--muted);
}

.profile-stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 1rem;
}

.profile-stat-tile,
.profile-showcase-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(24, 25, 28, 0.9), rgba(10, 11, 13, 0.9));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 22px 58px rgba(0,0,0,0.22);
}

.profile-stat-tile {
    min-height: 150px;
    display: grid;
    place-items: center;
    gap: 0.35rem;
    padding: 1rem;
    text-align: center;
}

.profile-stat-tile span {
    color: var(--fire);
    font-size: 2.2rem;
    filter: drop-shadow(0 10px 18px rgba(255, 82, 24, 0.24));
}

.profile-stat-tile strong {
    color: var(--text);
    font-size: 2.4rem;
    line-height: 1;
}

.profile-stat-tile small {
    color: var(--muted);
    font-size: 1rem;
}

.profile-showcase-card {
    padding: clamp(1rem, 2.5vw, 1.45rem);
}

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

.profile-section-heading h3 {
    margin: 0;
    color: var(--text);
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 1.75rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.profile-section-heading button {
    border: none;
    background: transparent;
    color: var(--fire);
    font-weight: 900;
    cursor: pointer;
}

.profile-achievement-preview,
.profile-record-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.profile-achievement-item,
.profile-record-item {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    text-align: center;
}

.profile-achievement-item.locked {
    opacity: 0.55;
    filter: grayscale(0.8);
}

.profile-hex {
    width: 108px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    color: #111;
    font-size: 2.35rem;
    box-shadow: 0 18px 32px rgba(255, 82, 24, 0.18);
}

.profile-achievement-item strong,
.profile-record-item strong,
.profile-activity-row strong {
    color: var(--text);
}

.profile-achievement-item span,
.profile-record-item small,
.profile-activity-row span {
    color: var(--muted);
}

.profile-record-item {
    border-right: 1px solid var(--line);
    padding: 0.4rem 1rem;
}

.profile-record-item:last-child {
    border-right: none;
}

.profile-record-item span {
    color: var(--fire);
    font-size: 2.5rem;
}

.profile-record-item span img {
    width: 2.8rem;
    height: 2.8rem;
    object-fit: contain;
}

.profile-record-item b {
    color: var(--fire);
    font-size: 2.2rem;
    line-height: 1;
}

.profile-activity-list {
    display: grid;
}

.profile-activity-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.profile-activity-row:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 58px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid var(--fire);
    border-radius: 50%;
    color: var(--fire);
    font-size: 1.8rem;
}

.activity-icon img {
    width: 2rem;
    height: 2rem;
}

.profile-activity-row b {
    color: var(--fire);
    font-size: 1.15rem;
}

.profile-settings-card .profile-edit-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: center;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.moderation-filters,
.moderation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.moderation-filters button,
.moderation-actions button {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.055);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.moderation-filters button span {
    display: inline-grid;
    place-items: center;
    min-width: 1.45rem;
    margin-left: 0.35rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(0,0,0,0.26);
}

.moderation-status-banner {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
}

.moderation-status-banner.can-review {
    border-color: var(--line-strong);
}

.moderation-status-banner strong {
    color: var(--text);
}

.moderation-status-banner span {
    color: var(--muted);
}

.moderation-filters button.active,
.moderation-actions button {
    border-color: transparent;
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
}

.moderation-actions .reject-btn {
    background: rgba(255, 70, 70, 0.18);
    border-color: rgba(255, 70, 70, 0.36);
}

.moderation-actions button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.65);
}

.moderation-grid {
    display: grid;
    gap: 1rem;
}

.moderation-card {
    display: grid;
    gap: 1rem;
}

.moderation-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.moderation-pill {
    display: inline-flex;
    width: fit-content;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    background: rgba(255,255,255,0.12);
}

.moderation-pill.pending {
    background: rgba(255, 179, 71, 0.24);
    color: var(--ember);
}

.moderation-pill.approved {
    background: rgba(63, 214, 126, 0.18);
    color: #7dffaf;
}

.moderation-pill.rejected {
    background: rgba(255, 70, 70, 0.2);
    color: #ff9b9b;
}

.proof-status {
    min-width: 180px;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}

.proof-status strong,
.proof-status span {
    display: block;
}

.proof-status strong {
    color: var(--text);
}

.proof-status span {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.proof-status.ready {
    border-color: var(--line-strong);
}

.proof-status.missing {
    border-color: rgba(255, 70, 70, 0.34);
}

.moderation-card h3 {
    margin: 0.4rem 0;
    color: var(--text);
}

.moderation-card p,
.moderation-card a,
.moderation-warning {
    color: var(--muted);
}

.moderation-card a {
    color: var(--fire);
    font-weight: 900;
}

.moderation-exercises {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.moderation-review-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.proof-preview {
    display: grid;
    gap: 0.75rem;
}

.proof-preview video,
.proof-preview img,
.proof-video-detail {
    width: 100%;
    max-height: 380px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #050505;
    object-fit: contain;
}

.proof-placeholder {
    min-height: 220px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(255, 70, 70, 0.45);
    border-radius: 8px;
    color: #ff9b9b;
    background: rgba(255, 70, 70, 0.06);
    text-align: center;
}

.form-help {
    color: var(--muted);
    font-size: 0.85rem;
}

.moderation-exercises div {
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
}

.moderation-exercises strong,
.moderation-exercises span {
    display: block;
}

.moderation-exercises strong {
    color: var(--text);
}

.moderation-exercises span {
    color: var(--fire);
    margin-top: 0.25rem;
}

.toast-root {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 50;
    display: grid;
    gap: 0.85rem;
    pointer-events: none;
}

.achievement-toast {
    width: min(380px, calc(100vw - 2rem));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 122, 26, 0.22), transparent 32%),
        linear-gradient(180deg, rgba(24,25,28,0.98), rgba(8,8,9,0.98));
    box-shadow: 0 28px 70px rgba(0,0,0,0.38), 0 0 38px rgba(255, 82, 24, 0.16);
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.achievement-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast-icon {
    width: 58px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    font-size: 1.8rem;
}

.achievement-toast span {
    color: var(--fire);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.achievement-toast strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--text);
    font-size: 1.15rem;
}

.achievement-toast p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    line-height: 1.4;
}

@media (max-width: 1080px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .goal-card {
        grid-column: 1 / -1;
    }

    .profile-stat-row,
    .profile-achievement-preview,
    .profile-record-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-record-item:nth-child(2n) {
        border-right: none;
    }

    .profile-settings-card .profile-edit-panel {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    :root {
        --app-header-height: 86px;
    }

    body.is-authenticated header {
        flex-direction: row;
        align-items: center;
    }

    body.is-authenticated .logo-image {
        width: 150px;
    }

    nav {
        top: var(--app-header-height);
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.85rem;
    }

    nav button {
        flex: 0 0 auto;
    }

    .home-hero,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .achievements-hero {
        grid-template-columns: 1fr;
    }

    .profile-identity,
    .profile-xp-row {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .xp-panel span {
        justify-self: center;
    }

    .home-hero {
        min-height: auto;
    }

    .hero-mark {
        min-height: 190px;
    }

    .moderation-card-header,
    .moderation-review-layout {
        grid-template-columns: 1fr;
        display: grid;
    }

    .proof-status {
        min-width: 0;
    }
}

@media (max-width: 560px) {
    main {
        padding-inline: 0.85rem;
    }

    .home-hero,
    .dashboard-card {
        padding: 1rem;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-item,
    .stat-item:nth-child(2n),
    .stat-item:nth-last-child(-n + 2) {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .recent-row {
        grid-template-columns: 1fr;
    }

    .recent-row small {
        grid-column: 1;
        grid-row: auto;
    }

    .profile-stat-row,
    .profile-achievement-preview,
    .profile-record-preview,
    .profile-settings-card .profile-edit-panel {
        grid-template-columns: 1fr;
    }

    .profile-record-item {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .profile-record-item:last-child {
        border-bottom: none;
    }

    .profile-activity-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .profile-activity-row b {
        grid-column: 2;
    }
}

/* Final profile-inspired consistency pass */
.home-card,
.achievement-card,
.detail-panel,
.add-card-panel,
.add-form,
.tutorial-panel,
.leaderboard-card,
.profile-feed-card,
.profile-section-card,
.record-card,
.template-card,
.goal-item,
.challenge-card,
.badge-card,
table {
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--profile-card-bg);
    box-shadow: var(--profile-card-shadow);
}

.home-card:hover,
.achievement-card:hover,
.leaderboard-card:hover,
.profile-feed-card:hover,
.record-card:hover,
.template-card:hover,
.goal-item:hover,
.challenge-card:hover,
.badge-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 24px 62px rgba(255, 82, 24, 0.12), inset 0 1px 0 rgba(255,255,255,0.08);
}

.home-card span,
.guide-card span,
.achievement-image,
.tutorial-step-icon,
.leaderboard-rank,
.record-card span,
.card-title span,
.badge-icon {
    color: var(--fire);
}

.section-title h2,
.feature-hero h2,
.achievements-hero h2,
.leaderboard-header h2,
.add-card-panel h2,
.profile-section-card h3,
.detail-panel h3,
.chart-panel h3,
.template-card h3,
.goal-item h3,
.challenge-card h3,
.badge-card h3 {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--text);
}

.section-title p,
.feature-hero p,
.achievements-hero p,
.leaderboard-header p,
.add-card-panel p,
.detail-panel p,
.template-card p,
.goal-item p,
.challenge-card p,
.badge-card p,
.guide-card p,
.achievement-details {
    color: var(--muted);
}

.achievement-card .share-btn,
.achievement-card .delete-btn,
.remove-row-btn,
.follow-btn,
.filter-btn,
.heart-btn,
.profile-subnav-btn,
.section-subnav button {
    border-radius: 8px;
}

.form-row input,
.form-row select,
select,
input[type="number"],
.comment-form textarea,
.goal-form input,
.profile-edit-panel input {
    border-radius: 8px;
    border-color: var(--line);
    background: rgba(255,255,255,0.07);
    color: var(--text);
}

/* PHEATS production upgrade pass */
nav button[hidden] {
    display: none !important;
}

body.is-authenticated nav {
    align-items: center;
    justify-content: center;
}

#add-workout-btn {
    order: 0;
    flex-basis: auto;
    max-width: none;
    margin: 0;
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    border-color: transparent;
    box-shadow: 0 16px 34px rgba(255, 82, 24, 0.26);
}

.elite-home,
.elite-achievements,
.elite-leaderboard,
.elite-progress,
.elite-goals,
.elite-profile,
.elite-social {
    animation: screenIn 0.28s ease both;
}

.today-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: stretch;
    position: relative;
    overflow: hidden;
    min-height: 310px;
    padding: clamp(1.25rem, 3vw, 2.35rem);
    border-color: rgba(255, 122, 26, 0.26);
    background:
        linear-gradient(135deg, rgba(14, 14, 16, 0.96), rgba(7, 7, 8, 0.92)),
        linear-gradient(120deg, rgba(255, 122, 26, 0.16), transparent 48%);
}

.today-hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -42% auto;
    width: min(44vw, 560px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 122, 26, 0.18);
    transform: rotate(45deg);
    pointer-events: none;
}

.today-copy,
.today-status {
    position: relative;
    z-index: 1;
}

.today-copy {
    display: grid;
    align-content: center;
}

.today-copy h2 {
    max-width: 13ch;
    margin: 0.55rem 0 0.85rem;
    color: var(--text);
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 4.8rem;
    line-height: 0.92;
    text-transform: uppercase;
}

.today-copy p {
    max-width: 38rem;
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.today-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.today-actions button,
.compact-feature-hero button,
.save-log-btn {
    border: none;
    border-radius: 8px;
    padding: 0.95rem 1.15rem;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    box-shadow: 0 16px 34px rgba(255, 82, 24, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.today-actions .secondary-action {
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.06);
    box-shadow: none;
}

.today-actions button:hover,
.compact-feature-hero button:hover,
.save-log-btn:hover {
    transform: translateY(-2px);
}

.today-status {
    display: grid;
    gap: 1rem;
    align-content: center;
}

.streak-orb {
    min-height: 190px;
    display: grid;
    place-items: center;
    gap: 0.2rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 122, 26, 0.28);
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}

.streak-orb span {
    font-size: 2.4rem;
    animation: flamePulse 1.9s ease-in-out infinite;
}

.streak-orb strong {
    color: var(--text);
    font-size: 4.5rem;
    line-height: 0.88;
}

.streak-orb small,
.xp-mini small,
.board-meta,
.goal-strip small,
.mini-achievement small,
.premium-goal-card small {
    color: var(--muted);
}

.xp-mini {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}

.xp-mini > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.xp-mini strong {
    color: var(--text);
}

.xp-mini span {
    color: var(--fire);
    font-weight: 900;
}

.stat-command-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.8fr) minmax(320px, 1.15fr);
}

.today-ring-card .goal-ring {
    width: 148px;
}

.lift-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 1rem;
}

.lift-card {
    display: grid;
    gap: 0.8rem;
    min-height: 240px;
}

.lift-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.lift-card-top h3 {
    margin: 0.4rem 0 0;
    color: var(--text);
    font-size: 1rem;
    text-transform: uppercase;
}

.lift-icon {
    display: grid;
    place-items: center;
    width: 44px;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 122, 26, 0.28);
    border-radius: 8px;
    background: rgba(255, 122, 26, 0.1);
    color: var(--fire);
    font-size: 1.4rem;
}

.lift-card > strong {
    color: var(--text);
    font-size: 2.6rem;
    line-height: 1;
}

.lift-card > strong small {
    color: var(--muted);
    font-size: 0.95rem;
}

.lift-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.trend {
    display: inline-flex;
    align-items: center;
    min-width: 54px;
    justify-content: center;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.065);
    color: var(--muted);
    font-weight: 900;
}

.trend.up {
    color: #89ffb0;
}

.trend.down {
    color: #ff9b9b;
}

.sparkline {
    height: 54px;
    display: flex;
    align-items: end;
    gap: 0.35rem;
    margin-top: auto;
}

.sparkline span {
    flex: 1;
    min-width: 5px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, var(--ember), var(--fire-hot));
    opacity: 0.85;
}

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

.next-stack {
    display: grid;
    align-content: start;
    gap: 0.85rem;
}

.next-stack .card-title,
.profile-section-heading {
    margin-bottom: 0;
}

.next-stack .card-title button {
    margin-left: auto;
    border: none;
    background: transparent;
    color: var(--fire);
    font-weight: 900;
    cursor: pointer;
}

.mini-achievement,
.goal-strip,
.leaderboard-row.compact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}

.mini-achievement > span {
    width: 46px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 122, 26, 0.1);
    font-size: 1.45rem;
}

.mini-achievement strong,
.goal-strip strong,
.leaderboard-row.compact strong {
    display: block;
    color: var(--text);
}

.goal-strip {
    grid-template-columns: minmax(0, 1fr);
}

.leaderboard-row.compact {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.leaderboard-row.compact > span {
    color: var(--fire);
    font-weight: 900;
}

.premium-log-screen {
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
}

.log-command-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.quick-log-panel {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}

.quick-log-chips,
.add-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.quick-log-chips button,
.ghost-btn {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.mascot-nudge {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.mini-mascot {
    width: 62px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    font-size: 2rem;
    box-shadow: 0 18px 34px rgba(255, 82, 24, 0.22);
}

.premium-log-form {
    position: relative;
    gap: 1rem;
}

.premium-exercise-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(100px, 0.35fr) minmax(110px, 0.4fr) auto;
    gap: 0.75rem;
    align-items: end;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}

.premium-exercise-row label,
.compact-upload-grid label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
}

.premium-exercise-row input,
.compact-upload-grid input {
    width: 100%;
    min-width: 0;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 0.85rem;
    background: rgba(255,255,255,0.07);
    color: var(--text);
}

.premium-exercise-row .remove-row-btn {
    min-height: 45px;
}

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

.share-row {
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}

.share-row input {
    accent-color: var(--fire);
}

.save-log-btn {
    position: sticky;
    bottom: 1rem;
    z-index: 3;
    width: 100%;
}

.rarity-common {
    --rarity: rgba(255,255,255,0.22);
    --rarity-glow: rgba(255,255,255,0.08);
}

.rarity-rare {
    --rarity: rgba(77, 181, 255, 0.7);
    --rarity-glow: rgba(77, 181, 255, 0.16);
}

.rarity-epic {
    --rarity: rgba(198, 112, 255, 0.74);
    --rarity-glow: rgba(198, 112, 255, 0.18);
}

.rarity-legendary {
    --rarity: rgba(255, 198, 87, 0.9);
    --rarity-glow: rgba(255, 122, 26, 0.26);
}

.badge-card.rarity-common,
.badge-card.rarity-rare,
.badge-card.rarity-epic,
.badge-card.rarity-legendary,
.next-achievement.rarity-common,
.next-achievement.rarity-rare,
.next-achievement.rarity-epic,
.next-achievement.rarity-legendary,
.mini-achievement.rarity-common,
.mini-achievement.rarity-rare,
.mini-achievement.rarity-epic,
.mini-achievement.rarity-legendary {
    border-color: var(--rarity);
    box-shadow: 0 22px 58px var(--rarity-glow), inset 0 1px 0 rgba(255,255,255,0.075);
}

.badge-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.badge-card-head span {
    color: var(--rarity);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.badge-card.locked {
    opacity: 0.74;
}

.badge-card.locked .badge-icon {
    filter: grayscale(0.7);
}

.rarity-summary div {
    border-color: var(--rarity, var(--line));
}

.leaderboard-header.dashboard-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

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

.elite-board-grid {
    grid-template-columns: 1fr;
}

.elite-board-card {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    text-align: left;
}

.elite-board-card.rank-1 {
    border-color: rgba(255, 198, 87, 0.72);
    box-shadow: 0 26px 70px rgba(255, 122, 26, 0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}

.board-avatar {
    width: 56px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: rgba(255, 122, 26, 0.12);
    color: var(--fire);
    font-weight: 900;
}

.board-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.elite-board-card h3 {
    margin: 0 0 0.2rem;
}

.elite-board-card p {
    margin: 0;
    color: var(--muted);
}

.board-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.5rem;
}

.board-meta span {
    padding: 0.25rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,0.045);
    font-size: 0.8rem;
}

.rank-move {
    color: var(--fire);
    font-size: 1.6rem;
}

.workout-history-grid {
    display: grid;
    gap: 1rem;
}

.workout-history-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
}

.workout-card-icon {
    width: 58px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 122, 26, 0.1);
    font-size: 1.8rem;
}

.workout-history-card h3 {
    margin: 0 0 0.35rem;
    color: var(--text);
}

.workout-history-card h3 span {
    margin-left: 0.45rem;
    color: var(--fire);
    font-size: 0.8rem;
}

.workout-history-card p,
.workout-history-card small {
    color: var(--muted);
}

.premium-goal-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.premium-goal-card {
    min-height: 230px;
}

.goal-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.goal-card-head h3 {
    margin: 0;
}

.goal-card-head strong {
    color: var(--fire);
    font-size: 1.45rem;
}

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

.compact-lift-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.goal-ring-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.mini-goal-ring {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #111214 0 56%, transparent 57%),
        conic-gradient(var(--fire) var(--progress), rgba(255,255,255,0.11) 0);
    box-shadow: 0 0 34px rgba(255, 82, 24, 0.16);
    text-align: center;
}

.mini-goal-ring div {
    width: 68%;
}

.mini-goal-ring strong {
    display: block;
    color: var(--text);
    font-size: 1.5rem;
}

.mini-goal-ring span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.social-feed-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.feed-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    aspect-ratio: 1;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 122, 26, 0.1);
    border: 1px solid rgba(255, 122, 26, 0.24);
}

.premium-profile-hero {
    position: relative;
    overflow: hidden;
}

.premium-profile-hero::after {
    content: "";
    position: absolute;
    right: -8%;
    top: 18%;
    width: min(40vw, 440px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 122, 26, 0.16);
    transform: rotate(45deg);
    pointer-events: none;
}

.profile-heatmap {
    display: grid;
    grid-template-columns: repeat(7, minmax(18px, 1fr));
    gap: 0.45rem;
}

.profile-heatmap span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255,255,255,0.045);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.profile-heatmap .level-1 {
    background: rgba(255, 122, 26, 0.18);
    color: var(--text);
}

.profile-heatmap .level-2 {
    background: rgba(255, 122, 26, 0.34);
    color: var(--text);
}

.profile-heatmap .level-3 {
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    color: #fff;
}

.journey-timeline {
    display: grid;
    gap: 0.8rem;
}

.journey-timeline div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}

.journey-timeline div > span {
    width: 14px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--fire);
    box-shadow: 0 0 18px rgba(255, 82, 24, 0.34);
}

.journey-timeline strong {
    color: var(--text);
}

.journey-timeline small {
    color: var(--muted);
}

.unlock-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0,0,0,0);
    opacity: 0;
    pointer-events: none;
    transition: background 0.22s ease, opacity 0.22s ease;
}

.unlock-overlay.show {
    background: rgba(0,0,0,0.54);
    opacity: 1;
}

.unlock-card {
    width: min(420px, 100%);
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    padding: 1.35rem;
    border: 1px solid var(--rarity, var(--line-strong));
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(24,25,28,0.98), rgba(8,8,9,0.98)),
        linear-gradient(135deg, var(--rarity-glow), transparent);
    box-shadow: 0 34px 90px rgba(0,0,0,0.52), 0 0 50px var(--rarity-glow, rgba(255,82,24,0.2));
    text-align: center;
    transform: translateY(18px) scale(0.96);
    transition: transform 0.22s ease;
}

.unlock-overlay.show .unlock-card {
    transform: translateY(0) scale(1);
}

.unlock-mascot {
    font-size: 2.4rem;
    animation: flamePulse 1.5s ease-in-out infinite;
}

.unlock-badge {
    width: 92px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    color: #111;
    font-size: 2.8rem;
    box-shadow: 0 20px 44px rgba(255, 82, 24, 0.26);
}

.unlock-card span,
.achievement-toast span {
    color: var(--rarity, var(--fire));
}

.unlock-card strong {
    color: var(--text);
    font-size: 1.65rem;
}

.unlock-card p {
    margin: 0;
    color: var(--muted);
}

.progress-fill,
.achievement-progress span {
    animation: fillIn 0.75s ease both;
    transform-origin: left center;
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fillIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes flamePulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 122, 26, 0.18));
    }
    50% {
        transform: translateY(-2px) scale(1.04);
        filter: drop-shadow(0 0 18px rgba(255, 122, 26, 0.38));
    }
}

@media (max-width: 1180px) {
    .stat-command-grid,
    .home-lower-grid,
    .challenge-strip,
    .progress-visual-grid {
        grid-template-columns: 1fr;
    }

    .lift-card-grid,
    .compact-lift-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .premium-log-screen {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    main {
        padding-bottom: 6.8rem;
    }

    body.is-authenticated nav {
        position: fixed;
        top: auto;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.35rem;
        padding: 0.45rem;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(7, 4, 5, 0.94);
        box-shadow: 0 18px 54px rgba(0,0,0,0.42);
    }

    body.is-authenticated nav::after {
        display: none;
    }

    body.is-authenticated nav button {
        min-height: 48px;
        padding: 0.65rem 0.4rem;
        font-size: 0.78rem;
    }

    #add-workout-btn {
        transform: translateY(-8px);
        min-height: 56px;
    }

    .today-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .today-copy h2 {
        max-width: 12ch;
        font-size: 3.7rem;
    }

    .today-status {
        grid-template-columns: 1fr;
    }

    .premium-exercise-row,
    .workout-history-card,
    .elite-board-card {
        grid-template-columns: 1fr;
    }

    .compact-upload-grid,
    .premium-goal-form {
        grid-template-columns: 1fr;
    }

    .social-feed-card {
        display: grid;
    }
}

@media (max-width: 560px) {
    .today-copy h2 {
        font-size: 3rem;
    }

    .lift-card-grid,
    .compact-lift-grid,
    .profile-achievement-preview,
    .profile-record-preview {
        grid-template-columns: 1fr;
    }

    .leaderboard-header.dashboard-card {
        display: grid;
    }

    .leaderboard-controls {
        display: grid;
        width: 100%;
    }

    .leaderboard-controls select {
        width: 100%;
    }

    .journey-timeline div {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .journey-timeline small {
        grid-column: 2;
    }
}

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

/* Sharp readability pass */
:root {
    --sharp-radius: 4px;
    --cut-corner: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    --panel-bg: linear-gradient(180deg, rgba(18, 19, 22, 0.96), rgba(8, 9, 11, 0.95));
}

body {
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

body.is-authenticated header,
nav,
.dashboard-card,
.leaderboard-card,
.profile-card,
.profile-section-card,
.profile-feed-card,
.achievement-card,
.detail-panel,
.add-card-panel,
.add-form,
.tutorial-panel,
.guide-card,
.profile-stat-tile,
.profile-showcase-card,
.badge-card,
.record-card,
.template-card,
.goal-item,
.challenge-card,
.workout-history-card,
.mini-achievement,
.goal-strip,
.leaderboard-row.compact,
.quick-log-panel,
.premium-exercise-row,
.share-row,
.journey-timeline div,
.profile-heatmap span,
.achievement-toast,
.unlock-card {
    border-radius: var(--sharp-radius) !important;
}

.dashboard-card,
.leaderboard-card,
.profile-feed-card,
.profile-section-card,
.achievement-card,
.profile-showcase-card,
.profile-stat-tile,
.badge-card,
.record-card,
.template-card,
.goal-item,
.challenge-card,
.add-form,
.add-card-panel {
    position: relative;
    overflow: hidden;
    background: var(--panel-bg);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 42px rgba(0,0,0,0.28);
}

.dashboard-card::before,
.leaderboard-card::before,
.profile-showcase-card::before,
.badge-card::before,
.add-form::before,
.add-card-panel::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--ember), var(--fire-hot));
    opacity: 0.9;
}

.today-hero,
.feature-hero,
.achievements-hero,
.leaderboard-header.dashboard-card,
.premium-profile-hero {
    clip-path: var(--cut-corner);
    background:
        linear-gradient(115deg, rgba(255, 122, 26, 0.1), transparent 38%),
        var(--panel-bg);
}

.today-hero::after,
.home-hero::after,
.premium-profile-hero::after,
.achievements-hero::after {
    border-radius: 0;
    opacity: 0.8;
}

.today-copy h2,
.home-hero h2,
.feature-hero h2,
.achievements-hero h2,
.leaderboard-header h2,
.add-card-panel h2,
.section-title h2,
.profile-identity h2,
.profile-section-heading h3,
.card-title h3 {
    font-family: Inter, system-ui, sans-serif !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
}

.today-copy h2 {
    max-width: 13ch;
    font-size: 4rem;
    line-height: 1;
}

.feature-hero h2,
.achievements-hero h2,
.leaderboard-header h2,
.add-card-panel h2 {
    font-size: 2.65rem;
    line-height: 1.05;
}

.card-title h3,
.lift-card-top h3,
.profile-section-heading h3 {
    font-size: 1rem;
    font-weight: 900;
}

.today-copy p,
.feature-hero p,
.achievements-hero p,
.leaderboard-header p,
.add-card-panel p,
.lift-card p,
.profile-feed-card p,
.goal-item p,
.challenge-card p,
.record-card p,
.template-card p,
.achievement-details,
.profile-member {
    color: rgba(248, 245, 242, 0.78);
    font-size: 0.98rem;
    line-height: 1.55;
}

button,
select,
input,
textarea,
.profile-subnav-btn,
.filter-btn,
.follow-btn,
.heart-btn,
.tutorial-controls button,
.achievement-card button,
.achievement-card .share-btn,
.achievement-card .delete-btn,
.comment-form button,
.add-form button,
.tutorial-toggle,
.quick-log-chips button,
.ghost-btn,
.section-subnav button {
    border-radius: var(--sharp-radius) !important;
}

button,
.quick-log-chips button,
.ghost-btn,
.section-subnav button,
.today-actions button {
    letter-spacing: 0.01em;
}

.today-actions button,
.save-log-btn,
.compact-feature-hero button,
#add-workout-btn {
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.today-actions .secondary-action,
.quick-log-chips button,
.ghost-btn,
.section-subnav button,
.follow-btn,
.filter-btn,
.heart-btn {
    background: rgba(255,255,255,0.045);
}

.streak-orb {
    min-height: 160px;
    align-content: center;
    place-items: start;
    text-align: left;
    border-left: 3px solid var(--fire);
    background:
        linear-gradient(105deg, rgba(255, 122, 26, 0.14), transparent 45%),
        rgba(255,255,255,0.045);
}

.streak-orb span {
    display: none;
}

.streak-orb strong {
    font-size: 4rem;
}

.streak-orb small {
    font-size: 0.92rem;
    font-weight: 900;
    text-transform: uppercase;
}

.xp-mini,
.quick-log-panel,
.premium-exercise-row,
.share-row,
.journey-timeline div,
.goal-strip,
.mini-achievement,
.leaderboard-row.compact {
    background: rgba(255,255,255,0.035);
    border-color: rgba(255,255,255,0.14);
}

.goal-ring,
.mini-goal-ring {
    width: 100% !important;
    max-width: none;
    height: 122px;
    aspect-ratio: auto;
    border-radius: var(--sharp-radius) !important;
    padding: 1px;
    background:
        linear-gradient(90deg, rgba(255, 122, 26, 0.9) var(--progress), rgba(255,255,255,0.08) 0);
    box-shadow: none;
}

.goal-ring div,
.mini-goal-ring div {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    gap: 0.15rem;
    padding: 0.9rem;
    border-radius: 3px;
    background: rgba(10, 11, 13, 0.88);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.mini-goal-ring strong,
.goal-ring strong {
    font-size: 1.85rem;
}

.lift-icon,
.mini-achievement > span,
.badge-icon,
.workout-card-icon,
.feed-icon,
.activity-icon,
.toast-icon,
.mini-mascot {
    border-radius: var(--sharp-radius) !important;
    clip-path: var(--cut-corner);
}

.lift-card > strong {
    font-size: 2.3rem;
}

.trend,
.board-meta span,
.moderation-pill,
#user-info,
.progress-track,
.achievement-progress {
    border-radius: var(--sharp-radius) !important;
}

.trend {
    min-width: 58px;
    padding: 0.38rem 0.55rem;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.045);
}

.sparkline {
    gap: 0.22rem;
}

.sparkline span,
.bar {
    border-radius: 1px 1px 0 0 !important;
}

.achievement-progress,
.progress-track {
    height: 8px;
    background: rgba(255,255,255,0.12);
}

.achievement-progress span,
.progress-fill {
    border-radius: 0 !important;
}

.board-avatar,
.profile-avatar-large {
    border-radius: var(--sharp-radius) !important;
    clip-path: var(--cut-corner);
}

.profile-avatar-large {
    border-width: 2px;
    box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.08), 0 18px 38px rgba(0,0,0,0.28);
}

.profile-hex,
.level-badge,
.unlock-badge {
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.profile-heatmap span {
    min-height: 30px;
}

.journey-timeline div > span {
    width: 3px;
    height: 32px;
    border-radius: 0;
    aspect-ratio: auto;
}

.social-feed-card {
    align-items: stretch;
}

.unlock-overlay.show {
    background: rgba(0,0,0,0.66);
}

.unlock-card {
    clip-path: var(--cut-corner);
}

@media (max-width: 820px) {
    .today-copy h2 {
        font-size: 3rem;
    }

    .feature-hero h2,
    .achievements-hero h2,
    .leaderboard-header h2,
    .add-card-panel h2 {
        font-size: 2.1rem;
    }

    .goal-ring,
    .mini-goal-ring {
        height: 108px;
    }
}

@media (max-width: 560px) {
    .today-copy h2 {
        font-size: 2.45rem;
    }

    .today-actions {
        display: grid;
    }
}

.pheats-mascot {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 26px rgba(255, 91, 15, 0.22));
}

.mascot-panel {
    position: relative;
    display: grid;
    place-items: end center;
    min-height: 160px;
    overflow: hidden;
    border: 1px solid rgba(255, 122, 26, 0.22);
    border-radius: var(--sharp-radius);
    background:
        linear-gradient(135deg, rgba(255, 122, 26, 0.14), transparent 52%),
        rgba(255,255,255,0.035);
    clip-path: var(--cut-corner);
}

.mascot-panel::before {
    content: "";
    position: absolute;
    inset: 12% -12% auto auto;
    width: 58%;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 122, 26, 0.18);
    transform: rotate(45deg);
}

.mascot-home {
    width: min(260px, 92%);
    animation: mascotPower 3.2s ease-in-out infinite;
}

.mascot-vault {
    width: min(170px, 88%);
    align-self: center;
}

.mascot-board {
    width: min(136px, 88%);
}

.mascot-profile {
    width: min(150px, 86%);
}

.mascot-feature {
    width: min(128px, 88%);
}

.mascot-small {
    width: 56px;
}

.mascot-unlock {
    width: 94px;
}

.mascot-panel-home {
    min-height: 210px;
}

.mascot-panel-vault,
.mascot-panel-board,
.mascot-panel-profile,
.mascot-panel-feature {
    min-height: 132px;
    min-width: 144px;
}

.visual-feature-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.visual-callout {
    width: min(420px, 100%);
    display: grid;
    gap: 0.2rem;
    margin: 1rem 0 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 122, 26, 0.24);
    border-left: 3px solid var(--fire);
    background: rgba(255,255,255,0.04);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.visual-callout span,
.visual-callout small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.visual-callout strong {
    color: var(--text);
    font-size: 1.25rem;
}

.achievements-hero {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.leaderboard-header.dashboard-card {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.leaderboard-header.dashboard-card {
    display: grid;
}

.profile-identity {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.mini-mascot {
    background: rgba(255, 122, 26, 0.08);
}

.unlock-mascot {
    width: 104px;
    animation: mascotPower 2.6s ease-in-out infinite;
}

@keyframes mascotPower {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.025);
    }
}

@media (max-width: 1080px) {
    .achievements-hero,
    .leaderboard-header.dashboard-card,
    .profile-identity,
    .visual-feature-hero {
        grid-template-columns: 1fr;
    }

    .mascot-panel-vault,
    .mascot-panel-board,
    .mascot-panel-profile {
        min-height: 180px;
    }
}

@media (max-width: 560px) {
    .mascot-panel-home {
        min-height: 180px;
    }

    .mascot-home {
        width: min(220px, 88%);
    }
}

/* Emoji fire + differentiated tab identity pass */
body.is-authenticated {
    --tab-accent: var(--fire);
    --tab-hot: var(--fire-hot);
    --tab-deep: #090607;
    --tab-soft: rgba(255, 122, 26, 0.12);
    --tab-line: rgba(255, 122, 26, 0.28);
    background:
        radial-gradient(circle at var(--tab-glow-x, 16%) var(--tab-glow-y, 12%), color-mix(in srgb, var(--tab-accent) 28%, transparent), transparent 30%),
        radial-gradient(circle at 84% 82%, rgba(255, 45, 20, 0.18), transparent 28%),
        linear-gradient(135deg, #080607, var(--tab-deep) 48%, #120503);
}

body.tab-home {
    --tab-accent: #ff8a1f;
    --tab-hot: #ff3d1f;
    --tab-deep: #100706;
    --tab-glow-x: 18%;
    --tab-glow-y: 16%;
}

body.tab-progress {
    --tab-accent: #ffb33d;
    --tab-hot: #ff6a1f;
    --tab-deep: #0d0904;
    --tab-glow-x: 72%;
    --tab-glow-y: 16%;
}

body.tab-log {
    --tab-accent: #ff4a24;
    --tab-hot: #e81d18;
    --tab-deep: #120405;
    --tab-glow-x: 50%;
    --tab-glow-y: 10%;
}

body.tab-community {
    --tab-accent: #ff7330;
    --tab-hot: #ff2020;
    --tab-deep: #08080c;
    --tab-glow-x: 80%;
    --tab-glow-y: 38%;
}

body.tab-profile {
    --tab-accent: #ffc247;
    --tab-hot: #ff7a1a;
    --tab-deep: #0d0802;
    --tab-glow-x: 20%;
    --tab-glow-y: 76%;
}

body.is-authenticated::before,
body.is-authenticated::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.is-authenticated::before {
    opacity: 0.32;
    background:
        radial-gradient(circle, rgba(255, 180, 71, 0.8) 0 1px, transparent 2px) 8% 16% / 112px 112px,
        radial-gradient(circle, rgba(255, 79, 28, 0.55) 0 1px, transparent 2px) 82% 22% / 148px 148px,
        radial-gradient(circle, rgba(255,255,255,0.12) 0 1px, transparent 1px) 50% 70% / 96px 96px;
    animation: emberDrift 18s linear infinite;
}

body.is-authenticated::after {
    opacity: 0.42;
    background:
        linear-gradient(120deg, transparent 0 43%, rgba(255,255,255,0.04) 43% 44%, transparent 44% 100%),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 22px);
    mix-blend-mode: screen;
}

body.is-authenticated header,
body.is-authenticated main,
.toast-root {
    position: relative;
    z-index: 1;
}

#content {
    position: relative;
    isolation: isolate;
}

#content::before {
    content: "";
    position: absolute;
    inset: clamp(0.4rem, 1.5vw, 1rem) 0 auto;
    height: 210px;
    border: 1px solid color-mix(in srgb, var(--tab-accent) 22%, transparent);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--tab-accent) 10%, transparent), transparent 55%),
        linear-gradient(135deg, transparent 0 48%, rgba(255,255,255,0.045) 48% 49%, transparent 49%);
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
    opacity: 0.65;
    z-index: -1;
}

body.tab-progress #content::before {
    height: 260px;
    background:
        radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--tab-accent) 22%, transparent), transparent 34%),
        repeating-linear-gradient(135deg, rgba(255, 194, 71, 0.08) 0 1px, transparent 1px 18px);
}

body.tab-log #content::before {
    height: 180px;
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--tab-hot) 18%, transparent), transparent 54%),
        repeating-linear-gradient(0deg, rgba(255, 74, 36, 0.11) 0 1px, transparent 1px 14px);
}

body.tab-community #content::before {
    height: 235px;
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--tab-hot) 20%, transparent), transparent 35%),
        linear-gradient(90deg, transparent 0 32%, rgba(255,255,255,0.05) 32% 33%, transparent 33% 66%, rgba(255,255,255,0.05) 66% 67%, transparent 67%);
}

body.tab-profile #content::before {
    height: 230px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--tab-accent) 14%, transparent), transparent 48%),
        radial-gradient(circle at 12% 70%, rgba(255, 194, 71, 0.18), transparent 24%);
}

body.is-authenticated nav {
    background:
        linear-gradient(180deg, rgba(22, 22, 24, 0.86), rgba(8, 8, 10, 0.9)),
        linear-gradient(90deg, color-mix(in srgb, var(--tab-accent) 15%, transparent), transparent 50%, color-mix(in srgb, var(--tab-hot) 12%, transparent));
    border-color: color-mix(in srgb, var(--tab-accent) 28%, rgba(255,255,255,0.08));
    box-shadow: 0 24px 70px rgba(0,0,0,0.42), 0 0 38px color-mix(in srgb, var(--tab-accent) 14%, transparent);
}

body.is-authenticated nav button {
    position: relative;
    overflow: visible;
    min-height: 44px;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

body.is-authenticated nav button:hover {
    transform: translateY(-2px);
}

body.is-authenticated nav button:active {
    transform: translateY(0) scale(0.98);
}

body.is-authenticated nav button.active {
    color: #111;
    background: linear-gradient(135deg, var(--tab-accent), var(--tab-hot));
    box-shadow: 0 14px 32px color-mix(in srgb, var(--tab-accent) 28%, transparent);
}

body.is-authenticated nav button.active::after {
    content: "";
    position: absolute;
    left: 16%;
    right: 16%;
    bottom: -9px;
    height: 3px;
    background: var(--tab-accent);
    box-shadow: 0 0 18px var(--tab-accent);
}

.pheats-mascot {
    display: inline-grid !important;
    place-items: center;
    width: auto !important;
    height: auto !important;
    aspect-ratio: 1;
    font-size: clamp(3rem, 10vw, 8.5rem);
    line-height: 1;
    filter:
        drop-shadow(0 12px 24px rgba(255, 61, 31, 0.35))
        drop-shadow(0 0 18px rgba(255, 180, 71, 0.34));
    transform-origin: 50% 78%;
    animation: emojiFlameFloat 2.8s ease-in-out infinite, emojiFlamePulse 1.7s ease-in-out infinite;
}

.mascot-small {
    font-size: 2.6rem;
}

.mascot-unlock {
    font-size: 5rem;
}

.mascot-feature,
.mascot-board,
.mascot-profile,
.mascot-vault {
    font-size: clamp(3rem, 6vw, 5.6rem);
}

.mascot-home {
    font-size: clamp(5.5rem, 16vw, 12rem);
}

.mascot-panel {
    align-items: center;
    justify-items: center;
    background:
        radial-gradient(circle at 50% 56%, color-mix(in srgb, var(--tab-accent) 24%, transparent), transparent 44%),
        linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
    border-color: color-mix(in srgb, var(--tab-accent) 30%, rgba(255,255,255,0.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 42px rgba(0,0,0,0.24);
}

.mascot-panel::after {
    content: "";
    position: absolute;
    inset: auto 16% 16% 16%;
    height: 8px;
    background: radial-gradient(ellipse, color-mix(in srgb, var(--tab-accent) 45%, transparent), transparent 68%);
    filter: blur(5px);
    animation: fireShadow 2.8s ease-in-out infinite;
}

.mood-pr,
.mood-streak {
    animation-duration: 1.7s, 1.05s;
}

.mood-idle {
    opacity: 0.78;
    filter: drop-shadow(0 8px 18px rgba(255, 122, 26, 0.22));
    animation-duration: 4.6s, 3.6s;
}

.mood-ready {
    opacity: 0.95;
}

.dashboard-card,
.badge-card,
.leaderboard-card,
.profile-showcase-card,
.profile-section-card,
.profile-stat-tile,
.add-form,
.add-card-panel {
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.dashboard-card:hover,
.badge-card:hover,
.leaderboard-card:hover,
.profile-showcase-card:hover,
.profile-stat-tile:hover,
.add-card-panel:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--tab-accent) 42%, rgba(255,255,255,0.12));
    box-shadow: 0 26px 68px rgba(0,0,0,0.36), 0 0 34px color-mix(in srgb, var(--tab-accent) 12%, transparent);
}

.hero-prime,
.today-hero,
.feature-hero,
.achievements-hero,
.leaderboard-header.dashboard-card,
.premium-profile-hero,
.log-command-panel {
    border-color: color-mix(in srgb, var(--tab-accent) 36%, rgba(255,255,255,0.1));
    background:
        radial-gradient(circle at 78% 20%, color-mix(in srgb, var(--tab-accent) 20%, transparent), transparent 32%),
        linear-gradient(128deg, color-mix(in srgb, var(--tab-accent) 13%, transparent), transparent 44%),
        linear-gradient(180deg, rgba(21, 21, 24, 0.96), rgba(8, 8, 10, 0.95));
    box-shadow: 0 28px 84px rgba(0,0,0,0.38), 0 0 48px color-mix(in srgb, var(--tab-accent) 13%, transparent);
}

body.tab-home .today-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.48fr);
}

body.tab-home .lift-card {
    background:
        linear-gradient(180deg, rgba(18, 19, 22, 0.96), rgba(9, 9, 11, 0.96)),
        linear-gradient(135deg, rgba(255, 138, 31, 0.13), transparent 56%);
}

body.tab-progress .achievements-hero,
body.tab-progress .feature-hero {
    clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

body.tab-progress .badge-card {
    background:
        linear-gradient(180deg, rgba(18, 14, 9, 0.96), rgba(8, 7, 6, 0.96)),
        repeating-linear-gradient(135deg, rgba(255, 194, 71, 0.055) 0 1px, transparent 1px 16px);
}

body.tab-progress .badge-card.unlocked {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 22px 58px rgba(0,0,0,0.32), 0 0 26px color-mix(in srgb, var(--tab-accent) 16%, transparent);
}

body.tab-log .premium-log-screen {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(1rem, 3vw, 1.6rem);
    align-items: start;
}

body.tab-log .log-command-panel {
    position: sticky;
    top: 1rem;
    min-height: 520px;
}

body.tab-log .premium-log-form,
body.tab-log .premium-exercise-row,
body.tab-log .quick-log-panel {
    border-color: rgba(255, 74, 36, 0.3);
    background:
        linear-gradient(135deg, rgba(255, 74, 36, 0.08), transparent 48%),
        rgba(255,255,255,0.038);
}

body.tab-log .premium-exercise-row {
    border-left: 3px solid var(--tab-hot);
}

body.tab-log .save-log-btn {
    width: 100%;
    min-height: 54px;
    font-size: 1rem;
}

body.tab-community .leaderboard-header.dashboard-card {
    min-height: 190px;
    background:
        linear-gradient(90deg, rgba(255, 115, 48, 0.13), transparent 40%, rgba(255, 32, 32, 0.11)),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 72px),
        linear-gradient(180deg, rgba(18, 18, 22, 0.96), rgba(7, 7, 10, 0.96));
}

body.tab-community .podium-grid {
    align-items: end;
}

body.tab-community .podium-card,
body.tab-community .elite-board-card {
    border-color: color-mix(in srgb, var(--tab-accent) 35%, rgba(255,255,255,0.08));
    background:
        linear-gradient(180deg, rgba(22, 19, 19, 0.96), rgba(7, 7, 10, 0.96)),
        linear-gradient(120deg, color-mix(in srgb, var(--tab-hot) 12%, transparent), transparent 50%);
}

body.tab-community .podium-1 {
    transform: translateY(-16px);
    box-shadow: 0 34px 90px rgba(0,0,0,0.42), 0 0 44px rgba(255, 115, 48, 0.24);
}

body.tab-profile .premium-profile-hero {
    min-height: 260px;
    background:
        radial-gradient(circle at 14% 50%, rgba(255, 194, 71, 0.24), transparent 26%),
        linear-gradient(105deg, rgba(255, 194, 71, 0.12), transparent 52%),
        linear-gradient(180deg, rgba(18, 16, 12, 0.96), rgba(7, 7, 8, 0.96));
}

body.tab-profile .profile-avatar-large,
body.tab-profile .level-badge,
body.tab-profile .profile-achievement-item {
    border-color: color-mix(in srgb, var(--tab-accent) 46%, rgba(255,255,255,0.12));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tab-accent) 10%, transparent), 0 18px 42px rgba(0,0,0,0.34);
}

/* Calm layout pass: reduce density, fix controls, soften headings */
:root {
    --content-gap: clamp(1.25rem, 2.4vw, 2.25rem);
    --panel-padding: clamp(1.25rem, 2.6vw, 2rem);
    --quiet-heading-weight: 760;
}

body {
    line-height: 1.55;
}

main {
    padding-top: calc(var(--app-header-height) + 1.75rem) !important;
}

#content,
.feature-screen,
.home-screen,
.profile-page,
.achievements-screen {
    gap: var(--content-gap) !important;
}

.dashboard-card,
.leaderboard-card,
.profile-card,
.profile-section-card,
.profile-feed-card,
.achievement-card,
.detail-panel,
.add-card-panel,
.add-form,
.tutorial-panel,
.guide-card,
.profile-showcase-card,
.profile-stat-tile,
.badge-card,
.record-card,
.template-card,
.goal-item,
.challenge-card,
.moderation-card {
    padding: var(--panel-padding) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 14px 34px rgba(0,0,0,0.22) !important;
}

.dashboard-grid,
.feature-grid,
.leaderboard-grid,
.badge-grid,
.profile-section-grid,
.profile-feed,
.achievement-grid,
.achievements-grid,
.challenge-strip,
.moderation-grid {
    gap: var(--content-gap) !important;
}

.home-hero,
.feature-hero,
.achievements-hero,
.leaderboard-header.dashboard-card,
.premium-profile-hero,
.profile-hero-web,
.log-command-panel {
    padding: clamp(1.6rem, 3vw, 2.6rem) !important;
    min-height: auto !important;
}

.home-hero h2,
.feature-hero h2,
.achievements-hero h2,
.leaderboard-header h2,
.add-card-panel h2,
.section-title h2,
.profile-identity h2,
.profile-section-heading h3,
.card-title h3,
.achievement-stats {
    font-family: Inter, system-ui, sans-serif !important;
    font-weight: var(--quiet-heading-weight) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
}

.home-hero h2,
.feature-hero h2,
.achievements-hero h2,
.leaderboard-header h2,
.add-card-panel h2 {
    font-size: clamp(2rem, 4vw, 3.35rem) !important;
    line-height: 1.05 !important;
}

.profile-section-heading h3,
.card-title h3,
.leaderboard-card h3,
.badge-card h3,
.record-card h3,
.template-card h3,
.goal-item h3,
.challenge-card h3 {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem) !important;
}

p,
.leaderboard-meta,
.achievement-details,
.profile-member,
.feature-hero p,
.achievements-hero p,
.home-tag,
.form-help {
    line-height: 1.65 !important;
}

body.is-authenticated nav {
    gap: 0.9rem !important;
    padding: 1rem 0 1.1rem !important;
    margin-bottom: var(--content-gap) !important;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,122,26,0.45) transparent;
}

nav button,
.section-subnav button,
.profile-subnav-btn,
.filter-btn,
.follow-btn,
.heart-btn {
    min-height: 44px;
    padding: 0.8rem 1.05rem !important;
    font-weight: 720 !important;
}

#add-workout-btn {
    max-width: none;
    flex-basis: auto;
    margin: 0 !important;
}

.section-subnav {
    gap: 0.75rem !important;
    padding: 0.85rem !important;
    margin-bottom: var(--content-gap) !important;
}

.leaderboard-card:hover,
.achievement-card:hover,
.profile-feed-card:hover,
.profile-section-card:hover,
.record-card:hover,
.template-card:hover,
.goal-item:hover,
.challenge-card:hover,
.badge-card:hover,
.profile-showcase-card:hover,
.profile-stat-tile:hover,
.add-card-panel:hover {
    transform: translateY(-2px) !important;
}

select,
input,
textarea {
    font-size: 1rem;
}

select,
.form-row select,
.leaderboard-controls select,
input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
    min-height: 46px;
    padding: 0.85rem 2.6rem 0.85rem 1rem !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    background-color: rgba(255,255,255,0.075) !important;
    color: var(--text) !important;
}

select,
.form-row select,
.leaderboard-controls select {
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    background-image: none !important;
    color-scheme: dark;
}

select option {
    background: #151517;
    color: #f8f5f2;
}

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

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

.compact-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem !important;
}

.file-upload-control {
    position: relative;
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px dashed rgba(255, 122, 26, 0.36);
    border-radius: 12px;
    background: rgba(255,255,255,0.045);
}

.file-upload-control input[type="file"] {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
    background: rgba(0,0,0,0.22) !important;
    color: var(--muted) !important;
}

.file-upload-control input[type="file"]::file-selector-button {
    border: none;
    border-radius: 8px;
    margin-right: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.file-upload-control > span {
    color: var(--fire);
    font-weight: 800;
}

.leaderboard-proof {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
}

.leaderboard-proof summary {
    width: fit-content;
    cursor: pointer;
    color: var(--fire);
    font-weight: 800;
}

.leaderboard-proof video {
    width: min(100%, 520px);
    max-height: 320px;
    margin-top: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #050505;
}

.proof-muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.podium-proof {
    justify-self: center;
}

.leaderboard-header.dashboard-card {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
}

.leaderboard-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem !important;
    align-items: center;
}

.leaderboard-controls select {
    min-width: 190px;
}

@media (max-width: 760px) {
    main {
        padding-top: calc(var(--app-header-height) + 1rem) !important;
    }

    body.is-authenticated nav {
        justify-content: flex-start !important;
        padding-inline: 0.2rem !important;
    }

    .leaderboard-header.dashboard-card {
        grid-template-columns: 1fr !important;
    }
}

/* Social-style graphics for feed and leaderboard cards */
.workout-post-card,
.rank-post {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 122, 26, 0.22) !important;
    background:
        linear-gradient(145deg, rgba(255, 122, 26, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(24, 25, 28, 0.96), rgba(8, 8, 10, 0.96)) !important;
}

.workout-post-card::before,
.rank-post::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 122, 26, 0.24), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(255, 61, 31, 0.18), transparent 26%);
    opacity: 0.42;
}

.post-header,
.rank-post-top {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
}

.rank-post-top {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.post-avatar,
.board-avatar {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 122, 26, 0.52);
    border-radius: 14px !important;
    clip-path: none !important;
    background: rgba(255, 122, 26, 0.12);
    color: var(--fire);
    font-weight: 900;
}

.post-avatar img,
.board-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-header h4,
.rank-post h3 {
    margin: 0;
}

.post-header p,
.post-header small,
.rank-post p,
.rank-post-score span {
    margin: 0;
    color: var(--muted);
}

.post-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: capitalize;
}

.post-status.approved {
    border-color: rgba(91, 255, 165, 0.38);
    color: #8cffbd;
    background: rgba(91, 255, 165, 0.1);
}

.post-status.pending {
    border-color: rgba(255, 194, 71, 0.38);
    color: var(--ember);
    background: rgba(255, 194, 71, 0.1);
}

.post-status.rejected {
    border-color: rgba(255, 85, 85, 0.38);
    color: #ff9b9b;
    background: rgba(255, 85, 85, 0.1);
}

.post-graphic,
.rank-post-score {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: stretch;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(255, 122, 26, 0.18);
    border-radius: 14px;
    background:
        linear-gradient(120deg, rgba(255, 122, 26, 0.13), transparent 58%),
        rgba(0, 0, 0, 0.18);
}

.rank-post-score {
    grid-template-columns: 1fr;
}

.post-graphic-icon {
    width: 74px;
    min-height: 74px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--fire), var(--fire-hot));
    color: #fff;
    font-size: 2.1rem;
    box-shadow: 0 18px 38px rgba(255, 82, 24, 0.18);
}

.post-graphic strong,
.rank-post-score strong {
    display: block;
    color: var(--text);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1;
}

.post-graphic span {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.post-media,
.rank-post-media {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}

.post-media video,
.post-media img,
.rank-post-media video {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #050505;
}

.rank-post-media.empty-media {
    min-height: 112px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(255,255,255,0.16);
    border-radius: 14px;
    color: var(--muted);
    background: rgba(255,255,255,0.035);
}

.post-caption {
    position: relative;
    z-index: 1;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.post-caption p {
    margin: 0;
    color: rgba(248, 245, 242, 0.88);
}

.interactive-feed-card .reaction-bar,
.comment-preview,
.quick-comment-row,
.social-comment-form {
    position: relative;
    z-index: 1;
}

.rank-post .board-meta {
    position: relative;
    z-index: 1;
    margin-top: 0.75rem;
}

.podium-proof-video {
    width: 100%;
    max-height: 220px;
    margin-top: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #050505;
}

@media (max-width: 760px) {
    .post-header,
    .rank-post-top,
    .post-graphic {
        grid-template-columns: 1fr;
    }

    .post-status,
    .rank-move {
        justify-self: start;
    }
}

.progress-fill,
.achievement-progress span {
    background: linear-gradient(90deg, var(--tab-accent), var(--tab-hot));
    box-shadow: 0 0 16px color-mix(in srgb, var(--tab-accent) 32%, transparent);
}

.eyebrow,
.form-kicker,
.leaderboard-rank,
.card-title span,
.home-card span,
.badge-icon {
    color: var(--tab-accent);
}

@keyframes emojiFlameFloat {
    0%, 100% {
        transform: translateY(0) rotate(-2deg) scale(1);
    }
    50% {
        transform: translateY(-8px) rotate(2deg) scale(1.04);
    }
}

@keyframes emojiFlamePulse {
    0%, 100% {
        filter:
            drop-shadow(0 12px 24px rgba(255, 61, 31, 0.32))
            drop-shadow(0 0 16px rgba(255, 180, 71, 0.3));
    }
    50% {
        filter:
            drop-shadow(0 16px 30px rgba(255, 61, 31, 0.46))
            drop-shadow(0 0 28px rgba(255, 180, 71, 0.52));
    }
}

@keyframes fireShadow {
    0%, 100% {
        transform: scaleX(0.82);
        opacity: 0.44;
    }
    50% {
        transform: scaleX(1.06);
        opacity: 0.68;
    }
}

@keyframes emberDrift {
    from {
        background-position: 8% 16%, 82% 22%, 50% 70%;
    }
    to {
        background-position: 8% -84%, 82% -78%, 50% -30%;
    }
}

@media (max-width: 980px) {
    body.tab-log .premium-log-screen {
        grid-template-columns: 1fr;
    }

    body.tab-log .log-command-panel {
        position: relative;
        top: auto;
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .pheats-mascot {
        font-size: clamp(3.2rem, 22vw, 7.5rem);
    }

    .mascot-small {
        font-size: 2.25rem;
    }

    #content::before {
        height: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.is-authenticated::before,
    .pheats-mascot,
    .mascot-panel::after {
        animation: none !important;
    }
}

/* Social interaction upgrade */
.social-command-screen {
    display: grid;
    gap: clamp(1rem, 2vw, 1.35rem);
}

.social-hero-panel {
    min-height: 210px;
}

.social-filter-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.social-action-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.8fr) minmax(240px, 0.9fr);
    gap: 1rem;
}

.social-action-card {
    display: grid;
    align-content: start;
    gap: 0.8rem;
    min-height: 220px;
    border-color: rgba(255, 115, 48, 0.22);
    background:
        linear-gradient(145deg, rgba(255, 115, 48, 0.08), transparent 48%),
        rgba(255,255,255,0.032);
}

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

.partner-card,
.interaction-row,
.battle-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.035);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.partner-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #111;
    font-weight: 950;
    background: linear-gradient(135deg, var(--tab-accent), var(--tab-hot));
    clip-path: var(--cut-corner);
}

.partner-card strong,
.interaction-row strong,
.battle-row strong {
    display: block;
    color: var(--text);
}

.partner-card span,
.interaction-row small,
.battle-row small,
.social-empty-line {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
}

.partner-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: end;
}

.partner-actions button,
.follow-chip,
.own-chip,
.reaction-bar button,
.quick-comment-row button,
.social-comment-form button {
    border-radius: var(--sharp-radius) !important;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.055);
    color: var(--text);
    font-weight: 900;
}

.partner-actions button,
.follow-chip,
.quick-comment-row button,
.social-comment-form button {
    min-height: 34px;
    padding: 0.45rem 0.62rem;
}

.partner-actions button:hover,
.follow-chip:hover,
.quick-comment-row button:hover,
.social-comment-form button:hover,
.reaction-bar button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 115, 48, 0.42);
    box-shadow: 0 12px 30px rgba(255, 82, 24, 0.12);
}

.interaction-row,
.battle-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.interaction-row > span,
.battle-row > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: rgba(255, 115, 48, 0.1);
    border: 1px solid rgba(255, 115, 48, 0.2);
    clip-path: var(--cut-corner);
}

.battle-row b {
    color: var(--tab-accent);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.interactive-profile-feed {
    display: grid;
    gap: 1rem;
}

.interactive-feed-card {
    display: grid;
    gap: 0.85rem;
    padding: clamp(1rem, 2vw, 1.2rem);
    border-color: rgba(255, 115, 48, 0.18);
    background:
        linear-gradient(105deg, rgba(255, 115, 48, 0.07), transparent 42%),
        rgba(255,255,255,0.032);
}

.feed-card-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
}

.feed-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.feed-title-row h4 {
    margin: 0;
    color: var(--text);
}

.interactive-feed-card p,
.interactive-feed-card small {
    margin: 0.22rem 0 0;
    color: var(--muted);
}

.follow-chip,
.own-chip {
    display: inline-grid;
    place-items: center;
    min-width: 64px;
    min-height: 30px;
    padding: 0.35rem 0.55rem;
    color: var(--tab-accent);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.own-chip {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.035);
}

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

.reaction-bar button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.reaction-bar button span {
    font-size: 1.05rem;
}

.reaction-bar button b {
    color: var(--text);
}

.reaction-bar button.active {
    color: #111;
    border-color: transparent;
    background: linear-gradient(135deg, var(--tab-accent), var(--tab-hot));
    box-shadow: 0 12px 32px color-mix(in srgb, var(--tab-accent) 24%, transparent);
}

.reaction-bar button.active b {
    color: #111;
}

.comment-preview {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border-left: 3px solid rgba(255, 115, 48, 0.42);
    background: rgba(0,0,0,0.16);
}

.comment-preview div {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
}

.comment-preview strong {
    color: var(--text);
}

.quick-comment-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.quick-comment-row button {
    color: rgba(255,255,255,0.84);
    font-size: 0.82rem;
}

.social-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
}

.social-comment-form input {
    width: 100%;
    min-height: 42px;
    border-radius: var(--sharp-radius);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.055);
    color: var(--text);
    padding: 0 0.75rem;
}

.social-comment-form input:focus {
    outline: none;
    border-color: rgba(255, 115, 48, 0.48);
    box-shadow: 0 0 0 3px rgba(255, 115, 48, 0.12);
}

.social-rank-strip .challenge-card {
    min-height: 122px;
}

@media (max-width: 1080px) {
    .social-action-grid {
        grid-template-columns: 1fr;
    }

    .partner-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .partner-actions {
        grid-column: 1 / -1;
        justify-content: start;
    }
}

@media (max-width: 560px) {
    .feed-title-row,
    .social-comment-form {
        grid-template-columns: 1fr;
    }

    .feed-title-row {
        display: grid;
        justify-items: start;
    }

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

/* Anti-overlap layout guard */
*,
*::before,
*::after {
    box-sizing: border-box;
}

#content,
#content * {
    min-width: 0;
}

#content {
    isolation: isolate;
}

.dashboard-card,
.leaderboard-card,
.profile-feed-card,
.profile-showcase-card,
.achievement-card,
.badge-card,
.add-form,
.add-card-panel,
.detail-panel,
.moderation-card,
.challenge-card,
.goal-item,
.template-card,
.record-card {
    position: relative;
    overflow: hidden;
}

.dashboard-card > *,
.leaderboard-card > *,
.profile-feed-card > *,
.profile-showcase-card > *,
.achievement-card > *,
.badge-card > *,
.add-form > *,
.add-card-panel > *,
.detail-panel > *,
.moderation-card > *,
.challenge-card > *,
.goal-item > *,
.template-card > *,
.record-card > * {
    position: relative;
    z-index: 1;
}

.leaderboard-card::before,
.profile-feed-card::before,
.profile-showcase-card::before,
.badge-card::before,
.add-form::before,
.add-card-panel::before,
.workout-post-card::before,
.rank-post::before {
    pointer-events: none;
    z-index: 0;
}

.profile-feed,
.interactive-profile-feed,
.leaderboard-grid,
.elite-board-grid,
.leaderboard-list,
.podium-grid,
.challenge-strip,
.social-action-grid,
.feature-grid,
.badge-grid,
.achievements-grid,
.profile-section-grid,
.dashboard-grid,
.moderation-grid {
    align-items: start;
}

.rank-post.elite-board-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.05rem !important;
    align-items: stretch !important;
}

.rank-post-top,
.post-header {
    width: 100%;
}

.rank-post-top {
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto !important;
}

.rank-post-score,
.rank-post .board-meta,
.rank-post-media,
.post-graphic,
.post-media,
.post-caption,
.reaction-bar,
.comment-preview,
.quick-comment-row,
.social-comment-form {
    width: 100%;
    max-width: 100%;
}

.rank-post-media video,
.post-media video,
.post-media img,
.proof-preview video,
.proof-preview img,
.proof-video-detail,
.milestone-photo {
    display: block;
    width: 100%;
    max-width: 100%;
}

.workout-post-card.social-feed-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    align-items: stretch !important;
    justify-content: initial !important;
}

.post-header {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
}

.post-header h4,
.post-header p,
.post-header small,
.rank-post h3,
.rank-post p,
.rank-post-score strong,
.rank-post-score span,
.board-meta span,
.post-caption p,
.comment-preview span,
.comment-preview strong {
    overflow-wrap: anywhere;
}

.post-graphic {
    grid-template-columns: auto repeat(3, minmax(0, 1fr)) !important;
}

.post-graphic > div,
.rank-post-score,
.proof-status,
.moderation-exercises div,
.partner-card,
.interaction-row,
.battle-row {
    min-width: 0;
}

.podium-card {
    display: grid;
    gap: 0.7rem;
    justify-items: center;
    align-content: start;
}

.podium-grid {
    grid-auto-rows: auto;
}

.leaderboard-proof,
.podium-proof-video {
    max-width: 100%;
}

.leaderboard-controls,
.leaderboard-header,
.section-subnav,
.profile-subnav,
nav {
    min-width: 0;
}

.leaderboard-controls > *,
.section-subnav > *,
.profile-subnav > *,
nav > * {
    flex-shrink: 0;
}

.mascot-panel {
    max-width: 100%;
    overflow: hidden;
}

.mascot-panel svg,
.mascot-panel img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .rank-post-top,
    .post-header,
    .post-graphic,
    .moderation-card-header,
    .moderation-review-layout,
    .social-comment-form {
        grid-template-columns: 1fr !important;
    }

    .post-avatar,
    .board-avatar,
    .leaderboard-rank,
    .rank-move,
    .post-status {
        justify-self: start;
    }

    .post-graphic-icon {
        width: 64px;
        min-height: 64px;
    }
}

@media (max-width: 640px) {
    .reaction-bar,
    .quick-comment-row,
    .partner-actions,
    .leaderboard-controls {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    .reaction-bar button,
    .quick-comment-row button,
    .partner-actions button,
    .leaderboard-controls select,
    .leaderboard-controls label {
        width: 100%;
    }
}

/* Global black / burnt-orange identity and horizontal post layout */
:root {
    --bg: #050303 !important;
    --surface: rgba(14, 12, 11, 0.94) !important;
    --surface-strong: rgba(20, 16, 14, 0.96) !important;
    --panel-bg: linear-gradient(180deg, rgba(18, 15, 13, 0.96), rgba(7, 6, 6, 0.96)) !important;
    --profile-card-bg: linear-gradient(180deg, rgba(18, 15, 13, 0.96), rgba(7, 6, 6, 0.96)) !important;
    --line: rgba(255, 255, 255, 0.1) !important;
    --line-strong: rgba(194, 82, 28, 0.46) !important;
    --fire: #c85a1f !important;
    --fire-hot: #9f2419 !important;
    --ember: #e17a2f !important;
    --tab-accent: var(--fire) !important;
    --tab-hot: var(--fire-hot) !important;
    --tab-deep: #070303 !important;
}

body,
body.tab-home,
body.tab-training,
body.tab-progress,
body.tab-community,
body.tab-profile {
    --tab-accent: var(--fire) !important;
    --tab-hot: var(--fire-hot) !important;
    --tab-deep: #070303 !important;
    background-color: #050303 !important;
    background-image:
        radial-gradient(circle at 82% 8%, rgba(159, 36, 25, 0.2), transparent 28%),
        radial-gradient(circle at 8% 72%, rgba(200, 90, 31, 0.12), transparent 26%),
        linear-gradient(180deg, #050303, #090606 42%, #050303) !important;
}

body.is-authenticated header,
body.is-authenticated nav {
    background:
        linear-gradient(180deg, rgba(8, 6, 6, 0.96), rgba(5, 4, 4, 0.94)),
        linear-gradient(90deg, rgba(200, 90, 31, 0.12), transparent 55%, rgba(159, 36, 25, 0.1)) !important;
    border-color: rgba(200, 90, 31, 0.22) !important;
}

#content::before,
body.tab-home #content::before,
body.tab-training #content::before,
body.tab-progress #content::before,
body.tab-community #content::before,
body.tab-profile #content::before {
    background:
        linear-gradient(145deg, rgba(200, 90, 31, 0.12), transparent 48%),
        radial-gradient(circle at 80% 12%, rgba(159, 36, 25, 0.14), transparent 28%) !important;
}

.dashboard-card,
.leaderboard-card,
.profile-feed-card,
.profile-showcase-card,
.profile-section-card,
.achievement-card,
.badge-card,
.add-form,
.add-card-panel,
.detail-panel,
.moderation-card,
.challenge-card,
.goal-item,
.template-card,
.record-card,
.profile-stat-tile,
.podium-card {
    border-color: rgba(200, 90, 31, 0.18) !important;
    background:
        linear-gradient(180deg, rgba(18, 15, 13, 0.96), rgba(7, 6, 6, 0.96)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 18px 42px rgba(0,0,0,0.34) !important;
}

.dashboard-card::before,
.leaderboard-card::before,
.profile-feed-card::before,
.profile-showcase-card::before,
.badge-card::before,
.add-form::before,
.add-card-panel::before,
.workout-post-card::before,
.rank-post::before {
    background:
        linear-gradient(90deg, rgba(200, 90, 31, 0.18), transparent 32%),
        radial-gradient(circle at 92% 10%, rgba(159, 36, 25, 0.14), transparent 24%) !important;
    opacity: 0.38 !important;
}

nav button:hover,
nav button.active,
.section-subnav button:hover,
.section-subnav button.active,
.filter-btn.active,
.follow-btn:hover,
.heart-btn.liked,
.reaction-bar button.active,
.save-log-btn,
.add-form button,
.comment-form button,
.moderation-actions button:not(:disabled),
.template-card button,
.goal-form button,
.goal-item button {
    background: linear-gradient(135deg, var(--fire), var(--fire-hot)) !important;
    box-shadow: 0 14px 32px rgba(159, 36, 25, 0.2) !important;
}

.eyebrow,
.form-kicker,
.card-title span,
.leaderboard-rank,
.rank-move,
.post-status,
.post-graphic-icon,
.feed-icon,
.profile-motto,
.profile-section-heading button,
.leaderboard-proof summary,
.file-upload-control > span {
    color: var(--ember) !important;
}

.workout-post-card.social-feed-card {
    grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.05fr) minmax(220px, 0.85fr) !important;
    grid-template-areas:
        "head graphic media"
        "caption graphic media"
        "actions actions actions"
        "comments comments comments"
        "quick quick quick"
        "form form form" !important;
    column-gap: clamp(1rem, 2vw, 1.6rem) !important;
    row-gap: 1rem !important;
    align-items: stretch !important;
}

.workout-post-card .post-header {
    grid-area: head;
    align-self: start;
}

.workout-post-card .post-graphic {
    grid-area: graphic;
    margin: 0 !important;
    align-self: stretch;
    grid-template-columns: 1fr !important;
    align-content: center;
}

.workout-post-card .post-media {
    grid-area: media;
    margin: 0 !important;
    align-self: stretch;
}

.workout-post-card .post-media:empty {
    display: none;
}

.workout-post-card .post-caption {
    grid-area: caption;
    padding: 0 !important;
    border-top: 0 !important;
}

.workout-post-card .reaction-bar {
    grid-area: actions;
}

.workout-post-card .comment-preview {
    grid-area: comments;
}

.workout-post-card .quick-comment-row {
    grid-area: quick;
}

.workout-post-card .social-comment-form {
    grid-area: form;
}

.rank-post.elite-board-card {
    grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1fr) minmax(260px, 1fr) auto !important;
    grid-template-areas:
        "top score media move"
        "meta meta media move" !important;
    align-items: stretch !important;
    column-gap: clamp(1rem, 2vw, 1.5rem) !important;
}

.rank-post .rank-post-top {
    grid-area: top;
    grid-template-columns: auto auto minmax(0, 1fr) !important;
}

.rank-post .rank-move {
    grid-area: move;
    align-self: center;
}

.rank-post .rank-post-score {
    grid-area: score;
    margin: 0 !important;
    align-content: center;
}

.rank-post .board-meta {
    grid-area: meta;
    margin: 0 !important;
    align-self: end;
}

.rank-post .rank-post-media {
    grid-area: media;
    margin: 0 !important;
    align-self: stretch;
}

.rank-post-media video,
.post-media video,
.post-media img {
    height: 100%;
    min-height: 170px;
    max-height: 260px !important;
}

.rank-post-media.empty-media {
    min-height: 170px;
}

@media (max-width: 1100px) {
    .workout-post-card.social-feed-card,
    .rank-post.elite-board-card {
        grid-template-columns: 1fr !important;
        grid-template-areas: none !important;
    }

    .workout-post-card > *,
    .rank-post > * {
        grid-area: auto !important;
    }

    .workout-post-card .post-graphic {
        grid-template-columns: auto repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 680px) {
    .workout-post-card .post-graphic,
    .rank-post .rank-post-score {
        grid-template-columns: 1fr !important;
    }
}

/* Visible PHEATS refresh: spacious black/fire surfaces */
.home-platform-copy {
    max-width: 640px;
    margin: 0.6rem 0 1.2rem;
    color: rgba(255, 244, 236, 0.78);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.65;
}

.hero-prime {
    padding: clamp(1.35rem, 3vw, 2.35rem) !important;
    gap: clamp(1.2rem, 3vw, 2.2rem) !important;
}

.leaderboard-grid.elite-board-grid {
    display: block !important;
}

.horizontal-leaderboard-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: clamp(1rem, 2vw, 1.45rem) !important;
}

.rank-post.elite-board-card,
.workout-post-card.social-feed-card {
    width: 100% !important;
    border-radius: 24px !important;
    padding: clamp(1rem, 2vw, 1.45rem) !important;
    overflow: hidden !important;
}

.rank-post .rank-post-score,
.workout-post-card .post-graphic {
    border: 1px solid rgba(200, 90, 31, 0.18);
    border-radius: 20px;
    background:
        radial-gradient(circle at 15% 10%, rgba(225, 122, 47, 0.16), transparent 36%),
        linear-gradient(135deg, rgba(28, 15, 10, 0.94), rgba(8, 6, 6, 0.96));
    padding: clamp(0.95rem, 2vw, 1.25rem);
}

.rank-post .rank-score-main,
.post-graphic strong {
    color: #fff4ec;
    text-shadow: 0 0 24px rgba(200, 90, 31, 0.22);
}

.rank-post-media,
.post-media {
    border: 1px solid rgba(200, 90, 31, 0.16);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(18, 8, 6, 0.92), rgba(4, 3, 3, 0.96)),
        radial-gradient(circle at 82% 18%, rgba(159, 36, 25, 0.18), transparent 34%);
    overflow: hidden;
}

.rank-post-media.empty-media {
    display: grid;
    place-items: center;
    min-height: 185px;
    color: rgba(255, 244, 236, 0.56);
    text-align: center;
}

.post-caption {
    color: rgba(255, 244, 236, 0.8) !important;
    line-height: 1.6;
}

.post-header,
.rank-post-top {
    gap: 0.85rem !important;
}

.reaction-bar,
.comment-preview,
.quick-comment-row,
.social-comment-form {
    margin-top: 0.25rem !important;
}

.section-subnav {
    margin-bottom: clamp(1rem, 2vw, 1.5rem) !important;
}

#content {
    padding-top: clamp(1.25rem, 2vw, 2rem) !important;
}

/* Readability and nutrition tracker upgrade */
html {
    text-size-adjust: 100%;
}

body {
    font-size: 16px !important;
    line-height: 1.55 !important;
}

#content,
.live-screen,
.feature-screen,
.home-screen,
.profile-screen,
.nutrition-screen {
    display: grid;
    gap: clamp(1.15rem, 2.4vw, 2rem) !important;
}

h1,
h2,
h3,
h4,
.hero-number,
.rank-score-main,
.stat-item strong,
.profile-stat-tile strong {
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere;
}

h2 {
    max-width: 13ch;
    font-size: clamp(2.1rem, 5vw, 4.6rem) !important;
}

h3 {
    font-size: clamp(1.1rem, 2.4vw, 1.55rem) !important;
}

p,
small,
span,
label,
input,
select,
button,
textarea,
.recent-row,
.badge-meta,
.post-caption,
.meal-copy {
    line-height: 1.55 !important;
}

button,
input,
select,
textarea {
    min-height: 46px;
}

button,
.section-subnav button,
nav button,
.file-upload-control {
    white-space: normal !important;
}

.dashboard-card,
.profile-feed-card,
.leaderboard-card,
.badge-card,
.add-form,
.profile-section-card,
.nutrition-log-card {
    min-width: 0;
}

.stat-grid,
.dashboard-grid,
.home-lower-grid,
.lift-card-grid,
.badge-grid,
.profile-stats-grid {
    gap: clamp(1rem, 2vw, 1.5rem) !important;
}

.nutrition-hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: center;
}

.nutrition-ring-card {
    display: grid;
    gap: 1rem;
    justify-items: center;
    padding: 1rem;
    border: 1px solid rgba(200, 90, 31, 0.18);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(18, 10, 7, 0.92), rgba(5, 4, 4, 0.96));
}

.nutrition-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: clamp(1rem, 2vw, 1.5rem);
}

.nutrition-analysis-card,
.nutrition-coach-card,
.nutrition-log-section {
    padding: clamp(1.1rem, 2.4vw, 1.6rem) !important;
}

.analysis-preview {
    display: grid;
    grid-template-columns: minmax(190px, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: center;
}

.analysis-preview img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(225, 122, 47, 0.22);
}

.nutrition-upload input {
    display: none;
}

.nutrition-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.8rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(225, 122, 47, 0.32);
    background: linear-gradient(135deg, rgba(200, 90, 31, 0.95), rgba(159, 36, 25, 0.95));
    color: #fff4ec;
    cursor: pointer;
}

.calorie-goal-control {
    display: grid;
    gap: 0.45rem;
    width: min(100%, 220px);
    color: rgba(255, 244, 236, 0.72);
}

.calorie-goal-control input,
.manual-food-grid input,
.manual-food-inline input {
    width: 100%;
    border: 1px solid rgba(200, 90, 31, 0.22);
    border-radius: 14px;
    background: rgba(4, 3, 3, 0.72);
    color: #fff4ec;
    padding: 0.8rem 0.95rem;
}

.manual-food-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(120px, 0.45fr)) auto;
    gap: 0.85rem;
    align-items: end;
}

.manual-food-inline,
.confirm-actions,
.macro-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.macro-strip {
    margin-top: 1.1rem;
}

.macro-strip div {
    flex: 1 1 150px;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(200, 90, 31, 0.16);
    background: rgba(255, 255, 255, 0.035);
}

.macro-strip strong {
    display: block;
    color: #fff4ec;
    font-size: 1.45rem;
}

.macro-strip span {
    color: rgba(255, 244, 236, 0.62);
}

.nutrition-log-list {
    display: grid;
    gap: 1rem;
}

.nutrition-log-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.95rem;
    border: 1px solid rgba(200, 90, 31, 0.16);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(20, 12, 8, 0.82), rgba(7, 5, 5, 0.92));
}

.meal-thumb img,
.meal-photo-placeholder {
    width: 92px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
}

.meal-photo-placeholder {
    display: grid;
    place-items: center;
    color: rgba(255, 244, 236, 0.52);
    background: rgba(255, 255, 255, 0.05);
}

.meal-copy {
    display: grid;
    gap: 0.15rem;
}

.meal-copy span,
.meal-copy p,
.meal-macros small {
    color: rgba(255, 244, 236, 0.58);
}

.meal-copy strong,
.meal-macros strong {
    color: #fff4ec;
    font-size: 1.08rem;
}

.meal-macros {
    text-align: right;
    min-width: 96px;
}

.meal-macros strong {
    display: block;
    font-size: 1.5rem;
    color: var(--ember) !important;
}

@media (max-width: 900px) {
    nav {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .nutrition-hero,
    .nutrition-layout,
    .analysis-preview {
        grid-template-columns: 1fr;
    }

    .manual-food-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    h2 {
        max-width: 100%;
        font-size: clamp(2rem, 12vw, 3rem) !important;
    }

    .today-actions,
    .confirm-actions,
    .manual-food-inline {
        align-items: stretch;
        flex-direction: column;
    }

    .nutrition-log-card {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .meal-thumb img,
    .meal-photo-placeholder {
        width: 72px;
    }

    .meal-macros {
        grid-column: 1 / -1;
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 0.4rem;
    }
}

/* PHEATS unified app shell */
:root {
    --pheats-bg: #030202;
    --pheats-surface: rgba(15, 13, 12, 0.94);
    --pheats-surface-soft: rgba(255, 255, 255, 0.045);
    --pheats-line: rgba(226, 112, 43, 0.18);
    --pheats-orange: #d46324;
    --pheats-red: #a32820;
    --pheats-cream: #fff3ea;
    --pheats-muted: rgba(255, 243, 234, 0.66);
}

body {
    color: var(--pheats-cream) !important;
    background:
        radial-gradient(circle at 50% -10%, rgba(212, 99, 36, 0.18), transparent 34rem),
        radial-gradient(circle at 100% 20%, rgba(163, 40, 32, 0.13), transparent 28rem),
        linear-gradient(180deg, #050303 0%, #020101 100%) !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 450 !important;
}

body::after {
    content: "";
    position: fixed;
    inset: auto 8vw -22rem auto;
    width: 32rem;
    height: 32rem;
    pointer-events: none;
    background: radial-gradient(circle, rgba(212, 99, 36, 0.16), transparent 68%);
    filter: blur(8px);
    animation: pheatsPulse 7s ease-in-out infinite;
    z-index: -1;
}

@keyframes pheatsPulse {
    0%, 100% { opacity: 0.42; transform: translateY(0) scale(1); }
    50% { opacity: 0.72; transform: translateY(-18px) scale(1.06); }
}

header {
    min-height: 74px !important;
    padding: 0.85rem clamp(1rem, 3vw, 2rem) !important;
    background: rgba(3, 2, 2, 0.86) !important;
    border-bottom: 1px solid var(--pheats-line) !important;
    backdrop-filter: blur(18px);
}

.brand.logo-brand {
    gap: 0.75rem !important;
}

.brand-tagline {
    max-width: 18ch;
    margin: 0 !important;
    color: var(--pheats-muted) !important;
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
}

#main-content {
    padding-bottom: 6rem;
}

nav {
    position: sticky !important;
    top: 82px !important;
    z-index: 40 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
    width: min(760px, calc(100% - 2rem)) !important;
    margin: 1rem auto 1.6rem !important;
    padding: 0.42rem !important;
    border: 1px solid var(--pheats-line) !important;
    border-radius: 999px !important;
    background: rgba(8, 6, 5, 0.82) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34) !important;
    backdrop-filter: blur(18px);
}

nav button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.42rem !important;
    min-height: 42px !important;
    padding: 0.65rem 0.85rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: rgba(255, 243, 234, 0.7) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.9rem !important;
    font-weight: 650 !important;
}

nav button::before {
    content: attr(data-icon);
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    color: var(--pheats-orange);
    background: rgba(212, 99, 36, 0.09);
}

nav button.active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(212, 99, 36, 0.95), rgba(163, 40, 32, 0.95)) !important;
}

nav button.active::before {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

#content {
    width: min(1180px, calc(100% - 2rem)) !important;
    margin: 0 auto !important;
    padding: 0 0 clamp(2rem, 5vw, 4rem) !important;
}

.dashboard-card,
.profile-feed-card,
.leaderboard-card,
.badge-card,
.add-form,
.profile-section-card,
.nutrition-log-card,
.record-card,
.template-card,
.goal-item {
    border: 1px solid var(--pheats-line) !important;
    border-radius: 22px !important;
    background:
        linear-gradient(145deg, rgba(18, 14, 12, 0.95), rgba(6, 5, 5, 0.95)) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

.dashboard-card:hover,
.profile-feed-card:hover,
.leaderboard-card:hover,
.badge-card:hover,
.nutrition-log-card:hover {
    border-color: rgba(226, 112, 43, 0.34) !important;
    transform: translateY(-2px);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

h1,
h2,
h3,
.card-title h3,
.sign-in-copy h1,
.profile-name {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    text-transform: none !important;
    font-weight: 760 !important;
}

.eyebrow,
.form-kicker,
.card-title span {
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    color: var(--pheats-orange) !important;
}

p,
small,
.empty-note,
.recent-row span,
.recent-row small,
.badge-card p,
.profile-feed-card p {
    color: var(--pheats-muted) !important;
}

.section-subnav {
    position: relative !important;
    z-index: 20 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.55rem !important;
    padding: 0 !important;
    margin: 0 0 1rem !important;
    background: transparent !important;
    border: 0 !important;
}

.section-subnav button {
    flex: 0 1 auto !important;
    min-height: 40px !important;
    padding: 0.62rem 0.9rem !important;
    border: 1px solid rgba(226, 112, 43, 0.18) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--pheats-muted) !important;
}

.section-subnav button.active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(212, 99, 36, 0.95), rgba(163, 40, 32, 0.95)) !important;
}

.sign-in-panel {
    min-height: calc(100vh - 96px);
    align-items: center !important;
    gap: clamp(1.5rem, 4vw, 3rem) !important;
}

.sign-in-copy p {
    max-width: 46ch;
    font-size: clamp(1rem, 2vw, 1.15rem) !important;
}

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
}

.onboarding-card {
    position: relative;
    width: min(720px, 100%);
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid rgba(226, 112, 43, 0.34);
    border-radius: 28px;
    background:
        radial-gradient(circle at 20% 0%, rgba(212, 99, 36, 0.22), transparent 34%),
        linear-gradient(145deg, rgba(18, 12, 9, 0.98), rgba(4, 3, 3, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.onboarding-card h2 {
    max-width: 12ch;
    margin: 0.35rem 0 0.65rem;
}

.onboarding-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 999px;
}

.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 1.35rem 0;
}

.onboarding-steps div {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid rgba(226, 112, 43, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.onboarding-steps strong {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pheats-orange), var(--pheats-red));
}

.onboarding-steps span {
    color: var(--pheats-cream);
    font-weight: 760;
}

.onboarding-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quiet-action {
    background: transparent !important;
    color: var(--pheats-muted) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 760px) {
    header {
        min-height: 64px !important;
    }

    .brand-tagline,
    #user-name {
        display: none !important;
    }

    nav {
        position: fixed !important;
        top: auto !important;
        right: 0.8rem !important;
        bottom: 0.8rem !important;
        left: 0.8rem !important;
        width: auto !important;
        margin: 0 !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        border-radius: 24px !important;
    }

    nav button {
        flex-direction: column !important;
        gap: 0.2rem !important;
        min-height: 56px !important;
        padding: 0.45rem 0.2rem !important;
        font-size: 0.72rem !important;
    }

    nav button::before {
        width: 1.35rem;
        height: 1.35rem;
    }

    #content {
        width: min(100% - 1rem, 1180px) !important;
        padding-bottom: 6.25rem !important;
    }

    .onboarding-steps {
        grid-template-columns: 1fr;
    }

    .onboarding-actions {
        flex-direction: column;
    }
}
