/* Base layout */

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 180ms;
    animation-timing-function: ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }
}

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

html {
    scroll-behavior: smooth;
}

:root {
    color-scheme: dark;
    --page-bg: #101010;
    --topbar-bg: #141414;
    --glass-panel: #181818;
    --glass-subtle: #1d1d1d;
    --glass-control: #141414;
    --glass-border: #303030;
    --text-primary: #f2f2f2;
    --text-secondary: #b8b8b8;
    --text-muted: #8d8d8d;
    --text-on-accent: #101010;
    --accent: #ffffff;
    --accent-hover: #ffffff;
    --accent-soft: rgba(255, 255, 255, 0.12);
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --danger: #ff8a80;
    --focus-ring: #ffffff;
    --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.24);
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.2);
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --ui-transition: 320ms ease-in-out;
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    color: var(--text-primary);

    min-height: 100vh;

}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    line-height: 1.25;
}
.app-page {
    min-height: 100vh;
}

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

button {
    cursor: pointer;
}

a {
    color: inherit;
}

/* NAVIGATION */

.topbar {
    width: min(calc(100% - 40px), 1160px);
    min-height: 42px;

    margin: 0 auto;
    padding: 26px 0 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    /* Same clean header style as firstdetails.html */
    background: transparent;
    border: none;
    border-bottom: none;
    box-shadow: none;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    position: relative;
    top: auto;

    z-index: 100;
}

.logo {
    color: var(--text-primary);
    text-decoration: none;

    font-size: 15px;
    font-weight: 600;

    letter-spacing: 0.13em;

    white-space: nowrap;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.topbar nav a {
    color: var(--text-secondary);

    text-decoration: none;

    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;

    transition: color var(--ui-transition);
}

.topbar nav a:hover,
.topbar nav a.active {
    color: var(--text-primary);
}

.topbar nav button {
    background: transparent;

    border: none;

    color: var(--text-secondary);

    font-size: 14px;

    padding: 0;

    transition: color var(--ui-transition);
}

.topbar nav button:hover {
    color: var(--text-primary);
}

/* GENERAL LAYOUT */

.container {
    width: 88%;

    max-width: 1100px;

    margin: 0 auto;

    padding: 60px 0;
}

.narrow {
    max-width: 680px;
}

/* HERO / PAGE HEADING */

.hero {
    margin-bottom: 45px;
}

.page-heading {
    margin-bottom: 40px;
}

.small-title {
    color: var(--text-secondary);

    font-size: 12px;



    margin-bottom: 10px;
}

.hero h1,
.page-heading h1 {
    color: var(--text-primary);

}

.subtitle {
    color: var(--text-secondary);


    margin-top: 12px;

}
/* Activity */
/* TODAY PAGE */

.people-grid {
    display: grid;

    grid-template-columns: 1fr;

    gap: 20px;
}

.person-card {
    padding: 28px;
}

.person-top {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    padding-bottom: 24px;

    border-bottom: 1px solid #222;
}

.person-top h2 {
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -0.04em;

    margin-bottom: 4px;
}

.person-top p {
    color: #777;

    font-size: 14px;
}

/* STREAK */

.streak {
    text-align: right;
}

.streak span {
    font-size: 18px;
}

.streak strong {
    display: block;

    font-size: 27px;

    line-height: 1.1;
}

.streak small {
    color: #666;

    font-size: 11px;
}

/* WORKOUTS */

.workout-section {
    padding-top: 24px;
}

.workout-section h3 {
    color: #777;

    font-size: 13px;

    font-weight: 600;

    margin-bottom: 15px;
}

.workouts {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.workout-item,
.history-workout,
.competition-result,
.profile-detail,
.profile-upload,
.public-workout {
    background: var(--glass-subtle);

    border: 1px solid rgba(255, 255, 255, 0.24);

    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);

    border-radius: 9px;

    padding: 15px;
}

.workout-name {
    color: #fff;

    font-size: 14px;

    font-weight: 700;

    margin-bottom: 5px;
}

.workout-details {

    font-size: 13px;
}

.no-workout {
    color: #555;

    font-size: 14px;

    padding: 10px 0;
}

/* BUTTONS */

.actions {
    display: flex;

    gap: 12px;

    margin-top: 30px;
}

.main-button,
.secondary-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 46px;

    padding: 0 20px;

    border-radius: 8px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    border: 1px solid transparent;

    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.main-button {
    background: rgba(185, 28, 28, 0.18);

    color: #fff;
    border-color: rgba(248, 113, 113, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.main-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.secondary-button {
    background: var(--glass-subtle);

    color: #fff;

    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

/* FORMS */

.auth-content [hidden] {
    display: none !important;
}

.form-group {
    margin-bottom: 23px;
}

.form-group label {
    display: block;

    color: #aaa;

    font-size: 13px;

    margin-bottom: 8px;
}

input,
select,
textarea {
    width: 100%;

    background: rgba(42, 12, 16, 0.16);

    color: #fff;

    border: 1px solid rgba(255, 255, 255, 0.28);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-radius: 8px;

    padding: 13px 14px;

    outline: none;

    font-size: 14px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #555;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(255, 255, 255, 0.62);

    background: rgba(42, 12, 16, 0.22);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

textarea {
    min-height: 120px;

    resize: vertical;
}

/* HISTORY */

.history-day {
    margin-bottom: 38px;
}

.history-date {
    color: #fff;

    font-size: 19px;

    padding-bottom: 11px;

    margin-bottom: 12px;

}

.history-day + .history-day .history-date {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 14px;
    margin-top: 18px;
}

.history-workout {
    margin-bottom: 8px;
}

/* Competition */
/* COMPETITION */

.competition-search,
.competition-section {
    background: rgba(22, 10, 12, 0.46);

    border: 1px solid rgba(255, 255, 255, 0.2);

    border-radius: 14px;

    padding: 25px;

    margin-bottom: 25px;
}

.competition-search h2,
.competition-section h2 {
    font-size: 17px;

    margin-bottom: 16px;
}

.search-box {
    width: 100%;
}

.competition-results {
    display: flex;

    flex-direction: column;

    gap: 10px;

    margin-top: 15px;
}
.logoutBtn {
    background: #e53935;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.logoutBtn:hover {
    background: #c62828;
}

.logoutBtn:active {
    transform: scale(0.97);
}
.competition-result {
    display: flex;
    align-items: center;
    padding: 13px;
    
    
    border-radius: 9px;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.competition-result:hover {
    border-color: var(--glass-border);
}

.competition-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.competition-user-link {
    color: inherit;
    text-decoration: none;
}

.competition-user-link:hover .competition-user-info strong {
    text-decoration: underline;
}

.competition-user-link:hover h3 {
    text-decoration: underline;
}

.competition-user-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.competition-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    object-fit: cover;
}

.competition-user-info {
    display: flex;

    flex-direction: column;

    flex: 1;

    min-width: 0;
}

.competition-user-info strong {
    font-size: 14px;
}

.competition-user-info h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}

.competition-user-info span {
    color: #777;

    font-size: 12px;
}

/* COMPETITION GRID */

.competition-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 15px;
}

.competition-card {
    padding: 18px;
    background: rgba(22, 10, 12, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
}

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

.competition-card-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.competition-card-profile .competition-user-info {
    gap: 2px;
}

.competition-card .today-workouts {
    padding-left: 58px;
}

.competition-card .today-workouts p {
    margin: 4px 0 0;
    font-size: 12px;
}

.remove-competitor-button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    font-size: 24px;
    line-height: 1;
}

.add-competitor-button,
.remove-competitor-button {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.competition-card-header p,
.recent-workouts {
    color: #999;
}

.competition-card h4 {
    margin: 18px 0 8px;
}

.competition-card .today-workouts p {
    margin: 8px 0;
}

.competition-avatar.placeholder {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 700;
}
/* profiles.css */
/* PROFILE */

.profile-card {
    padding: 30px;
}

.profile-container {
    width: calc(100% - 2rem);
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3.5rem) 0;
}

.profile-container > .profile-card {
    width: 100%;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    text-align: center;
}

.profile-photo-container {
    display: flex;
    justify-content: center;
}

.profile-container #profileName {
    margin-top: 0.25rem;
    font-size: clamp(1.6rem, 4vw, 2rem);
    overflow-wrap: anywhere;
}

.profile-container .profile-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-container > .profile-card > .main-button {
    display: flex;
    width: max-content;
    margin: 1rem auto 0;
}

.profile-container > .logoutBtn {
    display: block;
    margin: 1rem auto 0;
}

.social-section {
    margin: 0 0 1.5rem;
    padding-top: 1.25rem;
}

.social-section h2 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.social-links a {
    color: #ddd;
    text-decoration: none;
    padding: 0.55rem 0.8rem;
    background: rgba(22, 10, 12, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-header {
    text-align: center;

    padding-bottom: 28px;

    border-bottom: none;
}

.profile-photo {
    width: 120px;

    height: 120px;

    object-fit: cover;

    border-radius: 50%;

    border: 2px solid #292929;

    display: block;

    margin: 0 auto 18px;
}

.profile-header h2 {
    font-size: 28px;

    margin-bottom: 5px;
}

.profile-username {
    color: #777;

    font-size: 14px;
}

/* PROFILE DETAILS */

.profile-details {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    padding: 25px 0;
}

.profile-detail {
    background: rgba(22, 10, 12, 0.34);



    padding: 17px;

    text-align: center;
}

.profile-detail span {
    display: block;

    color: #666;

    font-size: 11px;

    margin-bottom: 6px;
}

.profile-detail strong {
    color: #fff;

    font-size: 17px;
}

/* SOCIALS */

.profile-socials {
    border-top: none;

    padding-top: 24px;
}

.profile-socials h3 {
    font-size: 15px;

    margin-bottom: 12px;
}

.profile-socials a {
    display: block;

    color: #aaa;

    text-decoration: none;

    padding: 9px 0;

    font-size: 14px;
}

.profile-socials a:hover {
    color: #fff;
}

/* PROFILE UPLOAD */

.profile-upload {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 15px;

    padding: 20px;


    border: 1px solid rgba(255, 255, 255, 0.16);

    border-radius: 9px;
}

.profile-upload .profile-photo {
    margin: 0;
}

.profile-upload input[type="file"] {
    padding: 10px;

    background: rgba(22, 10, 12, 0.38);
}

/* PUBLIC PROFILE */

.public-profile-header {
    text-align: center;

    padding-bottom: 28px;

    border-bottom: 0;
}

.public-profile-photo {
    width: 120px;

    height: 120px;

    object-fit: cover;

    border-radius: 50%;

    border: 2px solid #292929;

    margin-bottom: 18px;
}

.public-profile-header h2 {
    font-size: 28px;

    margin-bottom: 5px;
}

.public-workout-history {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.public-workout-history h2 {
    margin-bottom: 14px;
}

.public-workout-list {
    display: grid;
    gap: 10px;
}

.public-workout {
    padding: 14px;
    background: rgba(22, 10, 12, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
}

.public-workout > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.public-workout time,
.public-workout p {
    color: #999;
}

.public-workout p {
    margin: 8px 0 0;
}

/* Authentication */
/* LOGIN / SIGNUP */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.auth-brand {
    position: fixed;
    top: 28px;
    left: 32px;
    z-index: 100;
    color: var(--text-primary);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 3px;
    text-decoration: none;
}

.auth-brand:hover {
    opacity: 0.8;
}

.auth-container {
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 100px 24px 60px;
}

.auth-content {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.auth-content h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}

.auth-content form > .main-button,
.auth-content form > .google-button {
    width: 100%;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 42px;
}

.auth-form .form-group,
.auth-content .form-group {
    margin-bottom: 28px;
}

.auth-content .form-group label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 9px;
}

.auth-content .form-group input {
    width: 100%;
    padding: 13px 2px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.auth-content .form-group input:focus {
    border-bottom-color: var(--text-primary);
    background: transparent;
    box-shadow: none;
}

.auth-content .form-group input::placeholder {
    color: var(--text-muted);
}

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

.auth-content .password-input-wrap input {
    padding-right: 3.25rem;
}

.password-visibility-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    display: grid;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    padding: 0 2px;
    border: 0;
    color: var(--text-secondary);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-visibility-toggle:hover {
    color: var(--text-primary);
    background: transparent;
}

.password-visibility-toggle:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.login-method-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-subtle);
}

.login-method-toggle button {
    flex: 1;
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.login-method-toggle button:hover {
    color: var(--text-primary);
}

.login-method-toggle button.is-active {
    color: var(--text-primary);
    background: var(--glass-panel);
    box-shadow: var(--shadow-soft);
}

.auth-button {
    width: 100%;
    margin-top: 5px;
}

.auth-content .main-button {
    width: 100%;
    margin-top: 8px;
}

.auth-message {
    min-height: 20px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 13px;
    margin-top: 18px;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    color: var(--text-secondary);
    font-size: 13px;
}

.auth-footer a {
    color: var(--text-primary);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-text-button {
    display: block;
    width: max-content;
    margin: 20px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.auth-text-button:hover {
    color: var(--text-primary);
}

.auth-content strong {
    overflow-wrap: anywhere;
}

.auth-content button:disabled {
    cursor: wait;
    opacity: 0.58;
    transform: none;
}

/* GOOGLE LOGIN */

.google-button {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: var(--text-primary);
    border: none;
    border-radius: 0;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 4px;
    margin-top: 0;
    cursor: pointer;
}

.google-button:hover {
    background: transparent;
    opacity: 0.7;
}

/* DIVIDER */

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    display: none;
}

/* SMALL TEXT */

small {
    color: #666;

    font-size: 11px;
}

/* LOADING */

.loading {
    color: #666;

    font-size: 14px;
}

/* ERROR */

.error-message {
    color: #aaa;

    font-size: 14px;

    padding: 15px 0;
}

/* HIDDEN */

.hidden {
    display: none !important;
}

/* Visual refinements */
/* PREMIUM GLASS REFINEMENTS */

.competition-search,
.competition-section,
.competition-card,

.competition-result,
.profile-detail,
.profile-upload,
.public-workout,
.social-links a,
.google-button {
    background: var(--glass-subtle);
    border-color: rgba(255, 255, 255, 0.24);
}

.profile-upload input[type="file"] {
    background: rgba(42, 12, 16, 0.16);
}

.google-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.person-top,
.history-date,
.social-section,
.profile-header,
.profile-socials,
.public-profile-header {
    border-color: rgba(255, 255, 255, 0.22);
}

.person-top p,
.streak small,
.workout-section h3,
.profile-username,
.competition-user-info span,
.competition-card-header p,
.recent-workouts,
.profile-detail span,
.public-workout time,
.public-workout p,
.auth-subtitle,
.auth-message,
.auth-footer,
small,
.loading {
    color: var(--text-secondary);
}

.workout-name,
.competition-user-info strong,
.competition-card h4,
.profile-detail strong,
.history-date {
    letter-spacing: -0.015em;
}



.topbar nav a:hover,
.topbar nav a.active {
    text-shadow: 0 0 16px rgba(248, 113, 113, 0.4);
}

/* MOBILE */

@media (max-width: 800px) {

    .topbar {
        padding: 18px 5%;

        flex-direction: column;

        gap: 15px;
    }

    .topbar nav {
        flex-wrap: wrap;

        justify-content: center;

        gap: 14px 18px;
    }

    .container {
        width: 92%;

        padding: 40px 0;
    }

    .hero h1,
    .page-heading h1 {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }

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

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

    .profile-container .profile-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .person-card,
    .profile-card,
    .competition-search,
    .competition-section {
        padding: 22px;
    }

    .person-top {
        gap: 15px;
    }

    .person-top h2 {
        font-size: 24px;
    }

    .actions {
        flex-direction: column;
    }

    .actions a {
        width: 100%;
    }

    .competition-result {
        align-items: flex-start;
    }

    .auth-page {
        padding: 20px;
    }

    .auth-container {
        width: calc(100% - 1.25rem);
        max-width: 440px;
        min-height: 100svh;
        padding: 1rem 0;
    }

    .profile-container {
        width: calc(100% - 1.25rem);
        max-width: 760px;
        padding: 1rem 0;
    }

    .profile-container > .profile-card {
        padding: 1.25rem;
    }

    .profile-container .profile-details {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding: 1.25rem 0;
    }

}
/* Typography */
/* INTER TYPOGRAPHY SYSTEM */



h1,
.hero h1,
.page-heading h1,
.exercise-detail-heading h1,
.auth-content h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

h2,
.person-top h2,
.profile-header h2,
.public-profile-header h2,
.competition-search h2,
.competition-section h2,
.workout-section h3,
.exercise-section-heading h2,
.library-heading h2,
.social-section h2,
.profile-socials h3,
.public-workout-history h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

p,
.subtitle {
    line-height: 1.6;
}

.topbar nav button,
.hero h1,
.page-heading h1,
.person-top h2,
.workout-name,
.history-date,
.competition-search h2,
.competition-section h2,
.competition-card h4,
.profile-header h2,
.public-profile-header h2,
.profile-detail strong,
.auth-content h1,
.auth-footer a,
.competition-user-info strong {
    color: var(--text-primary);
}

.topbar nav a,
.topbar nav button,
.small-title,
.subtitle,
.person-top p,
.streak small,
.workout-section h3,
.workout-details,
.no-workout,
.form-group label,
.competition-user-info span,
.competition-card-header p,
.recent-workouts,
.profile-username,
.profile-detail span,
.profile-socials a,
.public-workout time,
.public-workout p,
.auth-subtitle,
.auth-message,
.auth-footer,
.auth-divider,
.loading,
.search-status {
    color: var(--text-secondary);
}

.card,
.person-card,
.profile-card,
.competition-search,
.competition-section,
.competition-card,

.workout-item,
.history-workout,
.competition-result,
.profile-detail,
.profile-upload,
.public-workout,
.social-links a,
.google-button {
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.topbar {
    border-color: var(--glass-border);
}



.hero h1,
.page-heading h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-shadow: none;
}

.subtitle {
    max-width: 650px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: normal;
    text-shadow: none;
}

.small-title {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.person-top h2,
.profile-header h2,
.public-profile-header h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.auth-logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.auth-content h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.profile-container #profileName {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.competition-search h2,
.competition-section h2,
.social-section h2,
.profile-socials h3,
.public-workout-history h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.main-button {
    font-size: 15px;
    font-weight: 600;
}



.secondary-button,
.google-button,
.social-links a {
    font-size: 15px;
    font-weight: 500;
}

.secondary-button:hover,
.google-button:hover,
.social-links a:hover {
    color: var(--text-primary);
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
}

input,
select,
    textarea {
    color: var(--text-primary);
    border-color: var(--glass-border);
    font-size: 15px;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

select option {
    color: var(--text-primary);
    background: var(--glass-panel);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 4px var(--glass-border);
}

.person-top,
.history-date,
.social-section,
.profile-header,
.profile-socials,
.public-profile-header,
.auth-divider::before,
.auth-divider::after {
    border-color: none;
}

.history-date {
    font-size: 21px;
    line-height: 1.25;
}

.person-top p,
.streak small,
.workout-section h3,
.profile-username,
.competition-user-info span,
.competition-card-header p,
.recent-workouts,
.profile-detail span,
.public-workout time,
.public-workout p,
.auth-subtitle,
.auth-message,
.auth-footer,
.loading {
    color: var(--text-secondary);
}

.profile-detail strong,
.workout-name,
.competition-user-info strong,
.competition-card h4 {
    color: var(--text-primary);
}

.workout-name,
.competition-card h4 {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.streak strong,
.profile-detail strong {
    font-variant-numeric: tabular-nums;
}

.streak small,
small,
.profile-detail span {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
}

.no-workout,
.auth-message,
.auth-footer,
.loading,
.error-message,
.search-status {
    font-size: 14px;
}



.competition-avatar.placeholder {
    color: var(--text-on-accent);
    background: var(--accent);
}

.competition-user-link:focus-visible,
.topbar a:focus-visible,
.main-button:focus-visible,
.secondary-button:focus-visible,
.google-button:focus-visible,
.auth-text-button:focus-visible,
.login-method-toggle button:focus-visible,
.otp-inline-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

@media (max-width: 800px) {
    .hero h1,
    .page-heading h1 {
        font-size: clamp(2rem, 7vw, 2.5rem);
    }

    .container {
        min-width: 0;
    }
}
/* Canvas motion */
/* MINIMAL CANVAS & QUIET MOTION */



.topbar {
    background: var(--topbar-bg);
    box-shadow: 0 1px 0 var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.hero,
.page-heading {
    width: auto;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.card,
.person-card,
.profile-card,
.competition-search,
.competition-section,
.competition-card,

.workout-item,
.history-workout,
.competition-result,
.profile-detail,
.profile-upload,
.public-workout,
.social-links a,
.google-button {
    background: var(--glass-subtle);
    border: 1px solid var(--glass-border);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.competition-search,
.competition-section,
.competition-card,
.competition-result,
.profile-detail,
.profile-upload,
.public-workout,
.social-links a,
.google-button {
    color: var(--text-primary);
}

.person-top,
.history-date,
.social-section,
.profile-header,
.profile-socials,
.public-profile-header,
.auth-divider::before,
.auth-divider::after {
    border-color: rgba(16, 24, 32, 0.1);
}

.main-button,
.secondary-button,
.google-button,
.social-links a,
.topbar a,
.topbar button,
input,
select,
textarea {
    transition:
        color var(--ui-transition),
        background-color var(--ui-transition),
        border-color var(--ui-transition),
        box-shadow var(--ui-transition),
        transform 240ms var(--ease-premium);
}

.main-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
}

.competition-search-area {
    position: relative;
    margin: 0 0 48px;
}

.search-control {
    display: flex;
    align-items: center;
    min-height: 48px;
}

.search-trigger,
.search-close {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.search-trigger {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    transition:
        color var(--ui-transition),
        background-color var(--ui-transition),
        border-color var(--ui-transition),
        box-shadow var(--ui-transition);
}

.search-trigger:hover {
    background: var(--glass-subtle);
    border-color: var(--glass-border);
}

.search-trigger:focus-visible,
.search-close:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.search-trigger svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-overlay {
    display: flex;
    align-items: center;
    width: 0;
    height: 48px;
    margin-left: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-7px);
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--glass-panel);
    transition:
        width 260ms var(--ease-premium),
        margin-left 260ms var(--ease-premium),
        opacity 200ms ease,
        transform 260ms var(--ease-premium),
        border-color 220ms ease,
        visibility 0s linear 260ms;
}

.search-control.is-open .search-overlay {
    width: min(380px, calc(100vw - 104px));
    margin-left: 12px;
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-card);
    transition:
        width 260ms var(--ease-premium),
        margin-left 260ms var(--ease-premium),
        opacity 200ms ease,
        transform 260ms var(--ease-premium),
        border-color 220ms ease,
        visibility 0s;
}

.search-overlay:focus-within {
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 3px var(--glass-border);
}

.search-overlay input,
.search-overlay input:focus {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    outline: 0;
}

.search-overlay input:focus-visible {
    outline: 0;
}

.search-close {
    width: 36px;
    height: 36px;
    margin-right: 5px;
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.search-close:hover {
    background: var(--glass-subtle);
}

.search-close svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.competition-results:empty {
    display: none;
}

.competition-results:not(:empty) {
    animation: search-results-in 240ms var(--ease-premium) both;
}

.competition-result {
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.competition-people h2 {
    margin-bottom: 18px;
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.competition-grid {
    gap: 18px;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes search-results-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main.container,
.auth-container,
.profile-container {
    animation: page-enter 120ms var(--ease-premium) both;
}

@media (max-width: 800px) {
    main.container,
    .auth-container,
    .profile-container {
        animation-duration: 80ms;
    }
}

@media (max-width: 600px) {
    .search-control.is-open .search-overlay {
        width: calc(100vw - 104px);
    }

    .competition-search-area {
        margin-bottom: 40px;
    }
}

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

body,
.topbar,
.card,
.person-card,
.profile-card,
.competition-search,
.competition-section,
.competition-card,
.workout-item,
.history-workout,
.competition-result,
.profile-detail,
.profile-upload,
.public-workout,
.social-links a,
.main-button,
.secondary-button,
.google-button,
.search-trigger,
.search-overlay,
.search-close,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6 {
    transition:
        color var(--ui-transition),
        background-color var(--ui-transition),
        border-color var(--ui-transition),
        box-shadow var(--ui-transition),
        fill var(--ui-transition),
        stroke var(--ui-transition),
        transform 240ms var(--ease-premium);
}

.search-overlay {
    transition:
        width 260ms var(--ease-premium),
        margin-left 260ms var(--ease-premium),
        opacity 200ms ease,
        transform 260ms var(--ease-premium),
        visibility 0s linear 260ms,
        color var(--ui-transition),
        background-color var(--ui-transition),
        border-color var(--ui-transition),
        box-shadow var(--ui-transition);
}

.search-control.is-open .search-overlay {
    transition:
        width 260ms var(--ease-premium),
        margin-left 260ms var(--ease-premium),
        opacity 200ms ease,
        transform 260ms var(--ease-premium),
        visibility 0s,
        color var(--ui-transition),
        background-color var(--ui-transition),
        border-color var(--ui-transition),
        box-shadow var(--ui-transition);
}

.person-top,
.history-date,
.social-section,
.profile-header,
.profile-socials,
.public-profile-header,
.auth-divider::before,
.auth-divider::after,
input,
select,
textarea {
    border-color: var(--glass-border);
}

input,
select,
textarea {
    background: var(--glass-control);
}

input:focus,
select:focus,
textarea:focus {
    background: var(--glass-panel);
}

.search-trigger,
.search-close {
    background: var(--glass-panel);
    border-color: var(--glass-border);
}

.search-trigger:hover,
.search-close:hover {
    background: var(--glass-subtle);
}

.competition-result,
.workout-item,
.history-workout,
.profile-detail,
.profile-upload,
.public-workout,
.social-links a,
.google-button {
    background: var(--glass-subtle);
    border-color: var(--glass-border);
}

.main-button {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

.main-button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.secondary-button,
.google-button,
.social-links a {
    background: var(--glass-panel);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

.secondary-button:hover,
.google-button:hover,
.social-links a:hover {
    background: var(--glass-subtle);
}



@media (max-width: 800px) {
    .topbar-actions {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .hero,
    .page-heading {
        padding: 16px 18px 18px;
    }

    .container.narrow {
        width: calc(100% - 2rem);
        min-width: 0;
        max-width: 100%;
    }

    input,
    select,
    textarea {
        min-width: 0;
        max-width: 100%;
    }
}
/* Onboarding */
/* FIRST-TIME PROFILE SETUP */

#firstSetupPage {
    min-height: 100vh;
}

#firstSetupPage .setup-shell {
    width: min(calc(100% - 40px), 1160px);
    margin: 0 auto;
    padding: 26px 0 64px;
}

#firstSetupPage .setup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    margin-bottom: clamp(42px, 8vh, 86px);
}

#firstSetupPage .wordmark {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 750;
    letter-spacing: 0.13em;
}

#firstSetupPage .setup-step {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

#firstSetupPage .step-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4a8d70;
    box-shadow: 0 0 0 4px rgba(74, 141, 112, 0.12);
}

#firstSetupPage .setup-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(440px, 1fr);
    align-items: start;
    gap: clamp(42px, 7vw, 92px);
}

#firstSetupPage .intro-copy {
    max-width: 390px;
    margin: 22px 0 0;
    color: var(--text-secondary);
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.65;
}

#firstSetupPage .eyebrow,
#firstSetupPage .card-kicker {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

#firstSetupPage .setup-intro h1 {
    max-width: 460px;
    margin: 22px 0 18px;
    color: var(--text-primary);
    font-size: clamp(44px, 5vw, 66px);
    font-weight: 650;
    letter-spacing: -0.065em;
    line-height: 0.99;
}

#firstSetupPage .privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    max-width: 400px;
    margin-top: 46px;
    padding: 17px 18px;
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    background: var(--glass-panel);
}

#firstSetupPage .privacy-icon {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin-top: 1px;
    color: var(--text-secondary);
}

#firstSetupPage .privacy-note strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 650;
}

#firstSetupPage .privacy-note span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
}

#firstSetupPage .setup-card {
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    background: var(--glass-panel);
    box-shadow: var(--shadow-card);
}

#firstSetupPage .card-heading {
    margin-bottom: 27px;
}

#firstSetupPage .card-heading h2 {
    margin: 10px 0 6px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -0.035em;
}

#firstSetupPage .card-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

#firstSetupPage .setup-form {
    margin: 0;
}

#firstSetupPage .setup-field {
    min-width: 0;
    margin: 0 0 21px;
}

#firstSetupPage .setup-field label {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

#firstSetupPage .required-mark {
    color: #b74343;
}

#firstSetupPage .optional-label {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 450;
}

#firstSetupPage input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 11px;
    outline: none;
    background: var(--glass-control);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

#firstSetupPage input::placeholder {
    color: var(--text-muted);
    opacity: 0.78;
}

#firstSetupPage input:focus-visible {
    border-color: var(--text-secondary);
    background: var(--glass-panel);
    box-shadow: 0 0 0 3px var(--glass-border);
}

#firstSetupPage .field-hint {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

#firstSetupPage .age-validation-message {
    color: var(--danger);
}

#firstSetupPage .age-validation-message[hidden] {
    display: none;
}

#firstSetupPage .metrics-grid,
#firstSetupPage .socials-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

#firstSetupPage .photo-field {
    margin-bottom: 25px;
}

#firstSetupPage .photo-control {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 13px;
    border: 1px solid var(--glass-border);
    border-radius: 13px;
    background: var(--glass-subtle);
}

#firstSetupPage .photo-preview-wrap {
    position: relative;
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--glass-panel);
    color: var(--text-muted);
}

#firstSetupPage #photoPreview {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: inherit;
    object-fit: cover;
}

#firstSetupPage #photoPreview[src=""] {
    opacity: 0;
}

#firstSetupPage .photo-placeholder {
    width: 24px;
    height: 24px;
}

#firstSetupPage .photo-picker {
    min-width: 0;
}

#firstSetupPage .photo-picker input[type="file"] {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
}

#firstSetupPage .photo-picker input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 11px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass-panel);
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

#firstSetupPage .photo-picker small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 10px;
}

#firstSetupPage .socials-details {
    margin: 2px 0 23px;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

#firstSetupPage .socials-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 1px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

#firstSetupPage .socials-details summary::-webkit-details-marker {
    display: none;
}

#firstSetupPage .socials-details summary::after {
    content: "+";
    color: var(--text-muted);
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

#firstSetupPage .socials-details[open] summary::after {
    content: "−";
}

#firstSetupPage .socials-details summary > span > span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 450;
}

#firstSetupPage .socials-content {
    padding: 0 0 2px;
}

#firstSetupPage .social-links-container,
.profile-card .social-links-container {
    display: grid;
    gap: 9px;
    margin-bottom: 10px;
}

#firstSetupPage .social-link-item,
.profile-card .social-link-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

#firstSetupPage .social-links-container,
#firstSetupPage .social-links-field > button,
#firstSetupPage .social-links-field > small {
    grid-column: 1 / -1;
}

#firstSetupPage .social-link-item input,
.profile-card .social-link-item input {
    min-width: 0;
}

#firstSetupPage .social-links-field > button,
#firstSetupPage .remove-social-link,
.profile-card .social-links-field > button,
.profile-card .remove-social-link {
    width: fit-content;
    padding: 8px 11px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass-panel);
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
}

#add-social-link {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    color: var(--text-secondary);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

#add-social-link:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

#add-social-link:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

#add-social-link:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#firstSetupPage .social-links-field > button:disabled,
.profile-card .social-links-field > button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

#firstSetupPage .social-links-field > small {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
}

.profile-card .social-links-field > small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 11px;
}

#firstSetupPage .save-button {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 0;
    padding: 13px 18px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: var(--text-on-accent);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

#firstSetupPage .save-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

#firstSetupPage .save-button:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

#firstSetupPage .save-button:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

#firstSetupPage .save-arrow {
    width: 17px;
    height: 17px;
}

#firstSetupPage .setup-message {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

#firstSetupPage .setup-footer {
    margin: 18px 0 0;
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

@media (max-width: 850px) {
    #firstSetupPage .setup-header {
        margin-bottom: 38px;
    }

    #firstSetupPage .setup-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 27px;
        max-width: 620px;
        margin: 0 auto;
    }

    #firstSetupPage .intro-copy {
        max-width: 520px;
        margin-top: 0;
        font-size: 16px;
    }

    #firstSetupPage .privacy-note {
        display: none;
    }
}

@media (max-width: 520px) {
    #firstSetupPage .setup-shell {
        width: min(calc(100% - 28px), 620px);
        padding-top: 17px;
        padding-bottom: 36px;
    }

    #firstSetupPage .setup-header {
        margin-bottom: 30px;
    }

    #firstSetupPage .setup-step {
        font-size: 10px;
    }

    #firstSetupPage .setup-card {
        padding: 22px 18px;
        border-radius: 17px;
    }

    #firstSetupPage .card-heading h2 {
        font-size: 21px;
    }

    #firstSetupPage .metrics-grid,
    #firstSetupPage .socials-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}

@media (max-width: 480px) {
    #firstSetupPage .social-link-item,
    .profile-card .social-link-item {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

.profile-container #profileName,
.profile-container #profileUsername,
.profile-container #profileIs {
    text-align: center;
}

.profile-container #profileIs {
    margin: 1rem 0 0;
}

.profile-container .profile-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    padding: 1rem 0;
}

.profile-container .profile-details .social-sections {
    display: flex;
    align-items: baseline;
    gap: 0.25em;
    text-align: center;
}

.profile-container .profile-details[hidden],
.profile-container .profile-details [hidden] {
    display: none !important;
}

#publicProfileIs {
    margin: 1rem 0 0;
    text-align: center;
}

.container.narrow #publicProfile {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.container.narrow #publicProfile > .profile-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    padding: 1rem 0;
}

.container.narrow #publicProfile > .profile-details .profile-detail {
    display: flex;
    align-items: baseline;
    gap: 0.25em;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
}

.container.narrow #publicProfile > .profile-details .profile-detail span {
    display: inline;
    margin: 0;
    font-size: inherit;
    color: var(--text-secondary);
}

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

/* GLOBAL TOPBAR - FIRST SETUP STYLE Applies consistently to every page using #navbar */

@media (max-width: 520px) {
    .topbar {
        width: min(calc(100% - 28px), 620px);
        min-height: 42px;
        padding: 17px 0 0;
    }

    .topbar nav {
        gap: 14px;
    }

    .topbar nav a {
        font-size: 12px;
    }
}
/* People search */
/* ALWAYS VISIBLE PEOPLE SEARCH */

.search-control {
    width: min(100%, 620px);
}

.search-overlay,
.search-control.is-open .search-overlay {
    flex: 1 1 0;
    width: auto;
    max-width: 560px;
    min-width: 0;
    margin-left: 0;
    overflow: visible;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
}

.search-overlay input,
.search-overlay input:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
    transition: none;
}



.search-trigger {
    transition: none;
}

.competition-results:not(:empty) {
    animation: none;
}

/* TEXT-FIRST SURFACES */

.card,
.person-card,
.profile-card,
.competition-search,
.competition-section,
.competition-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.profile-container .profile-card input,
.profile-container .profile-card select,
.profile-container .profile-card textarea {
    padding-right: 2px;
    padding-left: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.profile-container .profile-card input:focus,
.profile-container .profile-card select:focus,
.profile-container .profile-card textarea:focus {
    background: transparent;
    border-bottom-color: var(--text-secondary);
    box-shadow: none;
}

#profileForm #age:focus,
#profileForm #height:focus,
#profileForm #weight:focus,
#profileForm #age:focus-visible,
#profileForm #height:focus-visible,
#profileForm #weight:focus-visible {
    border-color: var(--glass-border);
    outline: none;
    box-shadow: none;
}

.workout-item,
.history-workout {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 14px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.workouts {
    gap: 0;
}

.workout-name {
    margin: 0;
    color: var(--text-primary);
    font-weight: 550;
}

.workout-details {
    color: var(--text-secondary);
    text-align: right;
}

.history-day {
    margin-bottom: 36px;
}

.history-date {
    margin: 0 0 6px;
    padding: 0 0 10px;
    border-bottom: 0;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.history-workout {
    padding: 12px 0;
    border-bottom: 0;
}

.history-workout .workout-name {
    font-size: 14px;
}

.history-workout .workout-details {
    font-size: 13px;
}

@media (max-width: 600px) {
    .history-workout {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .history-workout .workout-details {
        text-align: left;
    }
}

.competition-search,
.competition-section {
    padding: 0;
    margin-bottom: 42px;
}

.competition-people h2,
.competition-search h2,
.competition-section h2 {
    margin-bottom: 18px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.competition-search-area {
    margin-bottom: 46px;
}

.search-control {
    min-height: 44px;
    gap: 14px;
}

.search-trigger,
.search-close {
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.search-trigger {
    width: 44px;
    height: 44px;
}

.search-trigger:hover,
.search-close:hover {
    color: var(--text-primary);
    background: transparent;
}

.search-overlay,
.search-control.is-open .search-overlay {
    height: 44px;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.search-overlay:focus-within {
    border-bottom-color: var(--text-secondary);
    box-shadow: none;
}

.search-overlay input,
.search-overlay input:focus {
    height: 42px;
    padding: 0 2px;
    color: var(--text-primary);
}

.competition-results {
    width: min(560px, 100%);
    margin-top: 14px;
    gap: 0;
}

.competition-result {
    gap: 14px;
    padding: 15px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

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

.competition-card {
    padding: 22px 0;
    border-bottom: 1px solid var(--glass-border);
}

.competition-card-header p,
.recent-workouts {
    color: var(--text-secondary);
}

.competition-card h4 {
    margin: 14px 0 5px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.competition-card .today-workouts p {
    margin: 5px 0;
    font-size: 13px;
}

.competition-results .add-competitor-button,
.competition-card .remove-competitor-button {
    display: inline-grid;
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    place-items: center;
    margin: 0;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    font-size: 23px;
    font-weight: 400;
}

.competition-results .add-competitor-button:hover,
.competition-card .remove-competitor-button:hover {
    color: var(--text-primary);
    background: var(--glass-subtle);
    border: 0;
    box-shadow: none;
    transform: none;
}

.profile-detail,
.profile-upload,
.public-workout {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.profile-upload input[type="file"] {
    padding: 0;
    background: transparent;
    border: 0;
}

.profile-upload input[type="file"]::file-selector-button,
#firstSetupPage .photo-picker input[type="file"]::file-selector-button {
    padding: 6px 0;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.profile-container > .profile-card,
.container.narrow #publicProfile {
    padding: 0;
}

.profile-details {
    gap: 10px 22px;
}

.profile-details .profile-detail {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.social-links a {
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-underline-offset: 4px;
}

.social-links a:hover {
    color: var(--text-primary);
    background: transparent;
    text-decoration: underline;
}

.public-workout-list {
    gap: 0;
}
.public-workout {
    padding: 14px 0;
    border: none;
}
.login-method-toggle {
    gap: 20px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    background: transparent;
}

.login-method-toggle button {
    min-height: 42px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.login-method-toggle button.is-active {
    border-bottom-color: var(--text-primary);
    background: transparent;
    box-shadow: none;
}

.logoutBtn {
    padding: 8px 0;
    color: var(--danger);
    background: transparent;
    border: 0;
    border-radius: 0;
}

.logoutBtn:hover {
    color: var(--danger);
    background: transparent;
    text-decoration: underline;
    transform: none;
}

.account-danger-zone {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
}

.account-danger-zone .logoutBtn {
    display: block;
    margin: 0 auto;
}

.account-danger-zone .logoutBtn:disabled {
    opacity: 0.55;
    cursor: wait;
    text-decoration: none;
}

.account-delete-message {
    margin-top: 8px;
}

#firstSetupPage .photo-control {
    padding: 13px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

#firstSetupPage input:not([type="file"]) {
    padding-right: 2px;
    padding-left: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
}

#firstSetupPage input:not([type="file"]):focus-visible {
    background: transparent;
    border-bottom-color: var(--text-secondary);
    box-shadow: none;
}

@media (max-width: 600px) {
    .workout-item,
    .history-workout {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .workout-details {
        text-align: left;
    }

    .competition-search-area {
        margin-bottom: 34px;
    }
}
/* Navigation and authentication */
/* GOOGLE OAUTH BUTTON */

.auth-content a.google-oauth-button {
    width: 100%;
    min-height: 50px;
    display: flex;
    position: relative;
    z-index: 1;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    padding: 0 18px;
    color: #3c4043 !important;
    background: #fff !important;
    border: 1px solid #dadce0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    opacity: 1;
    visibility: visible;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.google-oauth-mark {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.auth-content a.google-oauth-button:hover {
    color: #3c4043;
    background: #fff;
    border-color: #d1d5db;
    box-shadow: 0 2px 5px rgba(60, 64, 67, 0.2);
    opacity: 1;
    transform: translateY(-1px);
}

.auth-content a.google-oauth-button:active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
    transform: translateY(0);
}

.otp-login-page .auth-container {
    width: 100%;
    max-width: 560px;
    min-height: calc(100svh - 42px);
    padding: 38px 16px 48px;
}

.otp-login-page .otp-login-form h1 {
    margin-bottom: 12px;
    font-size: clamp(2.25rem, 7vw, 2.6rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.035em;
    text-align: center;
}

.otp-login-subtitle {
    max-width: 480px;
    margin: 0 auto 30px;
    font-size: 18px;
    line-height: 1.45;
    text-align: center;
}

.otp-login-subtitle strong {
    display: block;
    margin-top: 3px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 500;
}

.otp-login-status {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.otp-resend-block {
    margin-top: 34px;
    text-align: center;
}

.otp-resend-prompt {
    margin-bottom: 8px;
    font-size: 17px;
}

.otp-resend-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.otp-inline-link {
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}

.otp-inline-link:hover {
    opacity: 0.72;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.otp-inline-link:disabled {
    opacity: 0.55;
    cursor: wait;
    text-decoration: none;
}

.otp-login-page .auth-divider {
    gap: 16px;
    margin: 42px 0 24px;
    font-size: 16px;
}

.otp-login-page .auth-divider::before,
.otp-login-page .auth-divider::after {
    display: block;
    flex: 1;
    border-top: 1px solid var(--glass-border);
    content: "";
}

@media (max-width: 520px) {
    .otp-login-page .auth-container {
        padding: 32px 16px 40px;
    }

    .otp-inline-link {
        font-size: 16px;
    }
}

/* GLOBAL NAVIGATION */

body {
    background: var(--page-bg);
}

.topbar {
    width: min(calc(100% - 40px), 1160px);
    min-height: 42px;
    padding: 26px 0 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: relative;
    top: auto;
    z-index: 100;
}

.logo {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: 0.13em;
    white-space: nowrap;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.topbar nav a,
.topbar nav button {
    color: var(--text-secondary);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 0;
    transition: color var(--ui-transition);
}

.topbar nav a:hover,
.topbar nav a.active,
.topbar nav button:hover {
    color: var(--text-primary);
    text-shadow: none;
}

@media (max-width: 520px) {
    .topbar {
        width: min(calc(100% - 28px), 620px);
        min-height: 42px;
        padding: 17px 0 0;
    }

    .topbar nav {
        gap: 14px;
    }

    .topbar nav a,
    .topbar nav button {
        font-size: 12px;
    }
}

/* Exercise library */
/* PUBLIC EXERCISE LIBRARY */
/* Exercise demonstration videos */
.exercise-demo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border: none;
    outline: none;
}

/* Never display native video controls */
.exercise-demo::-webkit-media-controls,
.exercise-demo::-webkit-media-controls-enclosure,
.exercise-demo::-webkit-media-controls-panel,
.exercise-demo::-webkit-media-controls-timeline,
.exercise-demo::-webkit-media-controls-play-button,
.exercise-demo::-webkit-media-controls-mute-button,
.exercise-demo::-webkit-media-controls-fullscreen-button {
    display: none !important;
    -webkit-appearance: none;
}
.library-heading h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    letter-spacing: -0.02em;
}
#personalDashboard[hidden],
#guestCta[hidden] {
    display: none !important;
}
.exercise-library {
    margin-top: 54px;
    scroll-margin-top: 28px;
}
.exercise-library-page .exercise-library {
    margin-top: 0;
}
.exercise-today-dashboard {
    margin-bottom: 54px;
}
.library-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 24px;
}
.exercise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 0;
}
.exercise-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}
.exercise-card-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
}
.exercise-category,
.exercise-level {
    display: inline-flex;
    align-items: center;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
}
.exercise-category {
    color: var(--text-secondary);
}
.exercise-level {
    color: var(--text-secondary);
}
.exercise-card h3 {
    font-size: 19px;
    margin-bottom: 8px;
}
.exercise-equipment {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 13px;
}
.exercise-equipment strong {
    color: var(--text-primary);
}
.exercise-muscles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.exercise-tag {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 0;
}
.exercise-details {
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    padding-top: 12px;
}
.exercise-details summary {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    padding: 4px 0;
}
.exercise-detail-content {
    padding-top: 12px;
    color: var(--text-secondary);
    font-size: 13px;
}
.exercise-detail-content h4 {
    color: var(--text-primary);
    font-size: 13px;
    margin: 14px 0 7px;
}
.exercise-detail-content ol,
.exercise-detail-content ul {
    padding-left: 20px;
}
.exercise-detail-content li + li {
    margin-top: 6px;
}
.exercise-alternative {
    margin-top: 14px;
    padding: 0 0 0 12px;
    border-left: 1px solid var(--glass-border);
}
.exercise-alternative strong {
    color: var(--text-primary);
}
.library-note {
    color: var(--text-muted);
    font-size: 12px;
    margin: 20px 0 12px;
    max-width: 900px;
}

@media (max-width: 900px) {
    .exercise-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .exercise-grid {
        grid-template-columns: 1fr;
    }
    .library-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

/* RESPONSIVE APP NAVIGATION AND EXERCISE CARDS */
.exercise-library-page {
    display: flex;
    flex-direction: column;
}

.exercise-library-page .exercise-today-dashboard { order: 1; }
.exercise-library-page .exercise-library { order: 2; }

.topbar-start {
    gap: 13px;
}

.mobile-menu-toggle,
.mobile-login,
.mobile-nav-backdrop,
.mobile-nav-panel {
    display: none;
}

.exercise-card {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: clamp(16px, 1.5vw, 18px);
    background: var(--glass-panel);
    box-shadow: var(--shadow-soft);
}

.library-heading h2 {
    font-size: clamp(23px, 2.1vw, 24px);
}

.exercise-grid {
    column-gap: 20px;
    row-gap: 20px;
}

.exercise-card-media {
    --art-ink: #202124;
    --art-accent: var(--accent);
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.exercise-card-media > svg {
    width: min(90%, 250px);
    height: 100%;
    overflow: visible;
}

.exercise-card-media .art-orbit { fill: rgba(255, 255, 255, 0.72); }
.exercise-card-media .art-ground { fill: none; stroke: rgba(0, 0, 0, 0.18); stroke-width: 2; stroke-linecap: round; }
.exercise-card-media .art-person { stroke: var(--art-ink); stroke-width: 5; }
.exercise-card-media .art-person circle { fill: var(--art-accent); stroke: none; }
.exercise-card-media .art-dumbbell { fill: none; stroke: var(--art-accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.exercise-card-media .art-rope { fill: none; stroke: var(--art-accent); stroke-width: 3; stroke-dasharray: 5 5; }
.exercise-card-media .art-spark { fill: var(--art-accent); opacity: 0.75; }
.exercise-card-media .art-spark-small { opacity: 0.45; }

.exercise-card-content {
    display: flex;
    min-height: 220px;
    flex: 1;
    flex-direction: column;
    padding: 16px 17px 15px;
}

.exercise-library-groups {
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 4vw, 42px);
}

.exercise-section {
    min-width: 0;
}

.exercise-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.exercise-section-heading h2 {
    color: var(--text-primary);
    font-size: clamp(18px, 1.7vw, 21px);
    letter-spacing: -0.025em;
}

.exercise-section .exercise-card-content {
    min-height: 0;
    padding: 15px 16px;
}

.exercise-section .exercise-card h3 {
    min-height: 0;
    margin: 0;
    font-size: clamp(15px, 1.15vw, 17px);
}

body.app-page .exercise-library-page .exercise-card h3 {
    text-align: center;
}

.exercise-card .exercise-card-topline { margin-bottom: 8px; }
.exercise-card .exercise-category,
.exercise-card .exercise-level { font-size: 10px; font-weight: 650; }
.exercise-card .exercise-card-topline .exercise-category { color: var(--text-secondary); }
.exercise-card .exercise-card-topline .exercise-level { padding: 3px 7px; border-radius: 999px; background: var(--glass-subtle); }
.exercise-card h3 { margin: 0 0 7px; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.25; }
.exercise-card .exercise-equipment { margin-bottom: 11px; font-size: clamp(11px, 0.83vw, 12px); line-height: 1.4; }
.exercise-card .exercise-muscles { gap: 5px; margin-bottom: 13px; }
.exercise-card .exercise-tag { padding: 3px 7px; border-radius: 999px; color: var(--text-secondary); background: var(--glass-subtle); font-size: 10px; line-height: 1.3; }
.exercise-card .exercise-details { padding-top: 10px; }
.exercise-card .exercise-details summary { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.exercise-card .exercise-details summary::after { content: "+"; color: var(--text-secondary); font-size: 18px; font-weight: 400; line-height: 1; }
.exercise-card .exercise-details[open] summary::after { content: "−"; }

@media (max-width: 800px) {
    :root {
        --mobile-gutter: clamp(16px, 4.2vw, 28px);
        --mobile-space: clamp(12px, 2.8vw, 20px);
    }

    body {
        background: var(--page-bg) !important;
        color: var(--text-primary);
    }

    .topbar {
        width: min(calc(100% - var(--mobile-gutter) - var(--mobile-gutter)), 720px);
        min-height: clamp(54px, 7vw, 62px);
        padding: clamp(6px, 1.6vw, 12px) 0;
        margin: 0 auto;
        flex-direction: row;
        gap: var(--mobile-space);
        background: transparent !important;
        box-shadow: none !important;
        position: relative;
        z-index: 100;
    }

    .topbar-start { gap: clamp(8px, 2.6vw, 13px); }
    .logo { color: #15243a; font-size: clamp(13px, 3.8vw, 15px); letter-spacing: 0.12em; }
    .mobile-menu-toggle {
        display: flex;
        width: clamp(36px, 10vw, 40px);
        height: clamp(36px, 10vw, 40px);
        flex: 0 0 clamp(36px, 10vw, 40px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        border: 1px solid #e5eaf1;
        border-radius: 13px;
        color: #26364c;
        background: #ffffff;
        box-shadow: 0 2px 7px rgba(20, 37, 63, 0.04);
    }

    .mobile-menu-toggle span { width: 17px; height: 2px; border-radius: 99px; background: currentColor; }
    .desktop-navigation { display: none !important; }
    .mobile-login {
        display: inline-flex;
        min-height: clamp(38px, 10vw, 42px);
        align-items: center;
        justify-content: center;
        padding: 0 clamp(12px, 4vw, 17px);
        border: 1px solid var(--accent);
        border-radius: 13px;
        color: #ffffff;
        background: var(--accent);
        box-shadow: var(--shadow-soft);
        text-decoration: none;
        font-size: 13px;
        font-weight: 650;
    }

    .mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 900;
        background: rgba(15, 23, 42, 0.52);
        opacity: 0;
        transition: opacity 220ms ease;
    }

    .mobile-nav-backdrop.is-visible { opacity: 1; }
    .mobile-nav-panel[hidden],
    .mobile-nav-backdrop[hidden] { display: none !important; }
    .mobile-nav-panel {
        display: block;
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 901;
        width: min(86vw, 360px);
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        padding: max(clamp(18px, 5vw, 24px), env(safe-area-inset-top)) clamp(18px, 5vw, 22px) max(clamp(20px, 5vw, 26px), env(safe-area-inset-bottom));
        color: #182437;
        background: #ffffff;
        box-shadow: 18px 0 48px rgba(15, 23, 42, 0.12);
        transform: translateX(-102%);
        transition: transform 240ms cubic-bezier(0.2, 0.75, 0.25, 1);
        visibility: hidden;
    }

    .mobile-nav-panel.is-open { transform: translateX(0); visibility: visible; }
    .mobile-nav-heading { display: flex; align-items: center; justify-content: space-between; padding: 2px 0 24px; border-bottom: 1px solid #edf0f4; }
    .mobile-nav-brand { color: #15243a; font-size: 15px; font-weight: 800; letter-spacing: 0.13em; text-decoration: none; }
    .mobile-nav-close { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #e8edf3; border-radius: 12px; color: #334155; background: #fff; }
    .mobile-nav-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
    .mobile-nav-links { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
    .mobile-nav-logout { min-height: 42px; display: flex; align-items: center; padding: 0 12px; border: 0; color: #58677b; background: transparent; text-align: left; text-decoration: none; font-size: 14px; font-weight: 500; }
    .mobile-nav-open { overflow: hidden; }

    .container {
        width: min(calc(100% - var(--mobile-gutter) - var(--mobile-gutter)), 720px);
        padding: clamp(16px, 3vw, 24px) 0 clamp(32px, 5vw, 44px);
    }

    .exercise-library-page .exercise-library {
        margin-top: 0;
        order: 1;
    }
    .exercise-library-page .exercise-today-dashboard { order: 2; }
    .exercise-today-dashboard { margin-bottom: 0; }
    .exercise-section-heading { margin-bottom: clamp(11px, 3vw, 15px); }
    .exercise-section-heading h2 { font-size: clamp(20px, 4.7vw, 24px); }
    .exercise-library-groups { gap: clamp(25px, 7vw, 36px); }
    .library-heading { align-items: center; flex-direction: row; gap: var(--mobile-space); margin-bottom: clamp(14px, 3vw, 18px); }
    .library-heading h2 { font-size: clamp(20px, 5.3vw, 23px); letter-spacing: -0.02em; }
    .exercise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mobile-space); }
    .exercise-card { border-radius: 16px; box-shadow: 0 2px 9px rgba(20, 37, 63, 0.045); }
    .exercise-card-media { height: clamp(112px, 31vw, 142px); }
    .exercise-card-media > svg { width: 96%; }
    .exercise-card-content { min-height: clamp(180px, 51vw, 205px); padding: clamp(10px, 3vw, 14px); }
    .exercise-section .exercise-card-content { min-height: 0; padding: clamp(12px, 3vw, 15px); }
    .exercise-card .exercise-card-topline { gap: 5px; margin-bottom: 6px; }
    .exercise-card .exercise-category,
    .exercise-card .exercise-level { font-size: 9px; }
    .exercise-card .exercise-card-topline .exercise-level { padding: 3px 6px; }
    .exercise-card h3 { min-height: 39px; margin-bottom: 6px; font-size: clamp(14px, 3.8vw, 15px); }
    .exercise-card .exercise-equipment { min-height: 34px; margin-bottom: 9px; font-size: clamp(10px, 2.9vw, 11px); }
    .exercise-card .exercise-muscles { gap: 4px; margin-bottom: 10px; }
    .exercise-card .exercise-tag { padding: 3px 6px; font-size: 9px; }
    .exercise-card .exercise-details { padding-top: 8px; }
    .exercise-card .exercise-details summary { font-size: 11px; }
    .exercise-detail-content { font-size: 12px; }

    .person-card,
    .profile-card,
    .competition-search,
    .competition-section { border-radius: 18px; }

    .hero h1,
    .page-heading h1 { font-size: clamp(2rem, 7vw, 2.5rem); }
    .small-title { writing-mode: horizontal-tb; transform: none; }
    body,
    body * { writing-mode: horizontal-tb; text-orientation: mixed; }
}

@media (max-width: 560px) {
    .exercise-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(154px, 30vw, 170px)), 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav-panel,
    .mobile-nav-backdrop { transition-duration: 0.01ms; }
}
/* Responsive refinements */
/* Consistent surface refinements across viewport sizes */
html,
body {
    background: var(--page-bg) !important;
    color: var(--text-primary);
}

body {
    font-family: var(--font-body) !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

body p,
body li {
    font-weight: 400 !important;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display) !important;
    font-weight: 500;
    letter-spacing: -0.02em;
}

button,
input,
select,
textarea,
[role="button"],
.main-button,
.secondary-button,
.google-button,
.social-links a,
nav a,
nav button,
.mobile-nav-panel a,
.mobile-nav-panel button {
    font-family: var(--font-body) !important;
    font-weight: 500 !important;
}

#navbar .topbar .logo,
.auth-logo,
.mobile-nav-panel .mobile-nav-brand {
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
}

.exercise-media {
    display: block;
    width: 100%;
    max-width: 240px;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 12px;
    background: #000;
}

.exercise-demo {
    cursor: default;
}

.exercise-detail-media-content {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.exercise-growth-tagline {
    max-width: 100%;
    margin: 0;
    padding-inline: 4px;
    color: #f2f2f2;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-wrap: balance;
}

.exercise-growth-tagline span {
    color: #d6b45e;
    text-shadow: 0 0 16px rgba(214, 180, 94, 0.22);
}


.main-button {
    color: var(--text-on-accent) !important;
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

.exercise-card {
    position: relative;
}

.exercise-card-link {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.exercise-card-link:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid var(--focus-ring);
    outline-offset: -3px;
    border-radius: inherit;
}

.exercise-card-link:hover h3 {
    color: var(--accent-hover);
}

.exercise-detail-container {
    max-width: 1100px;
    padding-top: clamp(18px, 3vw, 32px);
    padding-bottom: clamp(36px, 6vw, 72px);
}

.exercise-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.exercise-back-link:hover {
    color: var(--accent-hover);
}

.exercise-detail-heading {
    margin-bottom: clamp(20px, 3vw, 30px);
}

.exercise-detail-eyebrow,
.exercise-mode-kicker {
    margin: 0 0 6px;
    color: var(--accent-hover);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.exercise-detail-heading h1 {
    margin: 0 0 7px;
    color: var(--text-primary);
    font-size: clamp(32px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.exercise-detail-heading > p:last-child {
    margin: 0;
    color: var(--text-secondary);
}

.exercise-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    align-items: stretch;
    gap: clamp(16px, 2.5vw, 26px);
}

.exercise-demo-panel,
.exercise-workout-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    background: var(--glass-panel);
    box-shadow: var(--shadow-soft);
}

.exercise-demo-panel {
    display: grid;
    min-height: 330px;
    place-items: center;
    padding: clamp(14px, 2vw, 22px);
    background: var(--glass-subtle);
}

.exercise-detail-media {
    display: block;
    width: 100%;
    max-height: min(64vh, 520px);
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: 14px;
    background: #111;
    object-fit: contain;
}

.exercise-media-placeholder {
    display: grid;
    min-height: 260px;
    place-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.exercise-workout-panel {
    padding: clamp(17px, 2.5vw, 26px);
}

.exercise-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: var(--glass-subtle);
}

.exercise-mode-tabs button {
    min-height: 42px;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    color: var(--text-secondary);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.exercise-mode-tabs button[aria-selected="true"] {
    color: var(--text-primary);
    background: var(--glass-panel);
    box-shadow: 0 2px 7px rgba(20, 37, 63, 0.08);
}

.exercise-mode-tabs button:focus-visible,
.exercise-done-button:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.exercise-mode-panel {
    min-height: 280px;
    padding-top: clamp(22px, 3vw, 30px);
}

.exercise-mode-intro h2,
.exercise-ai-coming-soon h2 {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: clamp(20px, 2.2vw, 25px);
    letter-spacing: -0.025em;
}

.exercise-mode-intro > p:last-child,
.exercise-ai-coming-soon > p:last-child {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.exercise-workout-form {
    margin-top: 24px;
}

.exercise-mode-content {
    min-height: 280px;
    padding-inline: clamp(17px, 2.5vw, 26px);
}

.exercise-mode-content .exercise-workout-form {
    display: flex;
    min-height: 260px;
    flex-direction: column;
}

.exercise-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 14px;
}

.exercise-form-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 650;
}

.exercise-form-field input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 11px;
    color: var(--text-primary);
    background: var(--glass-panel);
    font: inherit;
    font-size: 15px;
}

.exercise-form-field input:focus {
    border-color: var(--accent);
    outline: 3px solid var(--focus-ring);
    outline-offset: 1px;
}

.exercise-form-message {
    min-height: 22px;
    margin: 14px 0 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.exercise-form-message a {
    color: #60a5fa;
    font-weight: 650;
}

.exercise-done-button {
    display: block;
    width: 100%;
    min-width: 132px;
    min-height: 48px;
    margin-top: auto;
}

.exercise-done-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.exercise-ai-coming-soon {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.exercise-coming-soon-badge {
    padding: 5px 10px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--accent-hover);
    background: var(--accent-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.exercise-ai-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin: 20px 0 15px;
    border: 1px solid var(--glass-border);
    border-radius: 17px;
    color: var(--accent-hover);
    background: var(--glass-subtle);
}

.exercise-ai-icon svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 800px) {
    .exercise-detail-layout {
        grid-template-columns: 1fr;
    }

    .exercise-demo-panel {
        min-height: 260px;
    }

    .exercise-detail-media {
        max-height: 44vh;
    }
}

@media (max-width: 560px) {
    .exercise-detail-container {
        padding-top: 15px;
    }

    .exercise-workout-panel {
        border-radius: 17px;
    }

}

.main-button:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}

#firstSetupPage {
    background: var(--page-bg) !important;
}

/* Shared hamburger navigation on desktop and mobile */
.topbar {
    width: min(calc(100% - clamp(32px, 8.4vw, 56px)), 1160px);
    min-height: 60px;
    margin: 0 auto;
    padding: clamp(8px, 1.5vw, 14px) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar .mobile-menu-toggle {
    display: flex !important;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid #e4e9f0;
    border-radius: 13px;
    color: var(--text-primary);
    background: #fff;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.topbar .mobile-menu-toggle span {
    display: block;
    width: 17px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
}

.topbar .mobile-menu-toggle:hover { background: var(--glass-subtle); }
.topbar .mobile-menu-toggle:focus-visible,
.topbar .mobile-login:focus-visible,
.mobile-nav-panel a:focus-visible,
.mobile-nav-panel button:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.topbar .logo {
    color: var(--text-primary);
    font-size: clamp(14px, 1.3vw, 16px);
    font-weight: 800;
    letter-spacing: -0.035em;
    text-decoration: none;
    white-space: nowrap;
}

.topbar .mobile-login {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    color: #fff;
    background: var(--accent);
    box-shadow: var(--shadow-soft);
    font-size: 13px;
}

.mobile-nav-panel {
    display: block;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1001;
    width: min(50vw, 460px);
    min-width: min(300px, calc(100vw - 24px));
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: max(22px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
    color: #182437;
    background: #fff;
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.14);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 240ms cubic-bezier(0.2, 0.75, 0.25, 1), visibility 240ms;
}

.mobile-nav-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
}

.mobile-nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

#mobileNavigation[hidden],
.mobile-nav-backdrop[hidden] { display: none !important; }

.mobile-nav-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0 22px;
    border-bottom: 1px solid #edf0f4;
}

.mobile-nav-brand {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.035em;
    text-decoration: none;
}

.mobile-nav-close {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--text-primary);
    background: transparent;
    cursor: pointer;
}

.mobile-nav-close:hover {
    background: var(--glass-subtle);
}

.mobile-nav-close:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.mobile-nav-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 16px;
}

.mobile-nav-links > a,
.mobile-nav-links > .mobile-nav-logout {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 11px;
    border: 0;
    border-radius: 12px;
    color: var(--text-primary);
    background: transparent;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.mobile-nav-links > a:hover,
.mobile-nav-links > .mobile-nav-logout:hover,
.mobile-nav-links > a.active {
    color: var(--accent-hover);
    background: var(--accent-soft);
}

.mobile-nav-open { overflow: hidden; }

html.mobile-nav-open,
body.mobile-nav-open {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Mobile-first app navigation */
.bottom-navigation {
    display: none;
}

@media (max-width: 800px) {
    body.has-bottom-navigation {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    #navbar .topbar .mobile-menu-toggle {
        display: none !important;
    }

    .bottom-navigation {
        position: fixed;
        inset: auto 0 0;
        z-index: 999;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr)) 48px;
        padding: 8px 14px max(8px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
        contain: paint;
    }

    .mobile-nav-panel {
        width: clamp(220px, 50vw, 320px);
        min-width: 0;
        touch-action: pan-y;
        transition:
            transform 200ms cubic-bezier(0.2, 0.75, 0.25, 1),
            visibility 200ms;
    }

    .mobile-nav-backdrop {
        background: rgba(0, 0, 0, 0.42);
        transition: opacity 200ms ease;
    }

    .bottom-nav-item {
        display: flex;
        min-width: 0;
        min-height: 52px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 0;
        border-radius: 12px;
        position: relative;
        color: var(--text-muted);
        background: transparent;
        text-decoration: none;
        font-size: 10px;
        line-height: 1.2;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition:
            transform 120ms ease-out,
            color 140ms ease;
    }

    .bottom-nav-item:active {
        transform: scale(0.94);
    }

    .bottom-nav-item svg {
        position: relative;
        z-index: 1;
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .bottom-nav-item.active {
        color: var(--accent-hover);
    }

    .bottom-nav-item.active::before,
    .bottom-nav-more[aria-expanded="true"]::before {
        position: absolute;
        inset: 3px;
        z-index: 0;
        border-radius: 10px;
        background: var(--accent-soft);
        content: "";
    }

    .bottom-nav-item::before {
        opacity: 0;
        transition: opacity 140ms ease;
    }

    .bottom-nav-item.active::before,
    .bottom-nav-more[aria-expanded="true"]::before {
        opacity: 1;
    }

    .bottom-nav-item:focus-visible {
        outline: 3px solid var(--focus-ring);
        outline-offset: -2px;
    }

    .bottom-nav-more {
        width: 48px;
        justify-self: end;
        font: inherit;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav-panel,
    .mobile-nav-backdrop,
    .bottom-nav-item,
    .bottom-nav-item::before {
        transition-duration: 0.01ms;
    }
}

/* Desktop navigation */
.desktop-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
    margin-left: auto;
}

.desktop-navigation a,
.desktop-nav-logout {
    color: var(--text-primary, #e8edf5);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.desktop-navigation .desktop-nav-more {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    background: var(--glass-panel);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.desktop-navigation .desktop-nav-more svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.desktop-navigation .desktop-nav-more:hover {
    background: var(--glass-subtle);
}

.desktop-navigation a:hover,
.desktop-navigation a.active,
.desktop-nav-logout:hover {
    color: var(--accent-hover);
}

.desktop-nav-logout {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

@media (min-width: 769px) {
    .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .topbar-start {
        display: flex;
        align-items: center;
    }

    .topbar-start > .mobile-menu-toggle,
    .bottom-navigation {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-navigation {
        display: none;
    }
}

/* Keep exercise browsing and controls light instead of card-heavy */
.main-button,
.secondary-button {
    border-radius: 999px;
    box-shadow: none;
}

.main-button,
#firstSetupPage .save-button {
    color: #fff !important;
    background: #202124 !important;
    border: 1px solid #202124 !important;
    box-shadow: none;
}

.main-button:hover,
#firstSetupPage .save-button:hover {
    color: #fff !important;
    background: #3f4348 !important;
    border-color: #3f4348 !important;
}

.secondary-button {
    color: #343a40;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.secondary-button:hover {
    color: #202124;
    background: #e5e7eb;
    border-color: #9ca3af;
}

.main-button:focus-visible,
.secondary-button:focus-visible,
#firstSetupPage .save-button:focus-visible {
    outline: 3px solid rgba(55, 65, 81, 0.28);
    outline-offset: 3px;
}

.topbar .mobile-login {
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    border-radius: 0;
    color: #343a40;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.topbar .mobile-login:hover {
    color: #111827;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.topbar .mobile-login:focus-visible {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
}

.exercise-card {
    overflow: visible;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.exercise-card-media {
    background: transparent;
}

.exercise-card-content,
.exercise-section .exercise-card-content {
    min-height: 0;
    padding: 14px 0 18px;
}

.exercise-card .exercise-card-topline .exercise-level,
.exercise-card .exercise-tag {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.exercise-card .exercise-muscles {
    gap: 4px 10px;
}

.exercise-card .exercise-details {
    border-top: 0;
}

.exercise-card .exercise-details summary {
    justify-content: flex-start;
    gap: 8px;
    color: var(--accent-hover);
}

.exercise-card .exercise-details summary::after {
    color: currentColor;
}

.exercise-detail-page .exercise-demo-panel,
.exercise-detail-page .exercise-workout-panel {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.exercise-detail-page .exercise-demo-panel {
    padding: 0;
}

.exercise-detail-page .exercise-detail-media {
    border-radius: 8px;
}

.exercise-detail-page .exercise-workout-panel {
    padding: 0;
}

.exercise-detail-page .exercise-mode-tabs {
    gap: 20px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    background: transparent;
}

.exercise-detail-page .exercise-mode-tabs button,
.exercise-detail-page .exercise-mode-tabs button[aria-selected="true"] {
    min-height: 44px;
    padding: 8px 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.exercise-detail-page .exercise-mode-tabs button[aria-selected="true"] {
    color: var(--accent-hover);
    box-shadow: inset 0 -2px currentColor;
}

.exercise-detail-page .exercise-form-field input {
    padding-right: 2px;
    padding-left: 2px;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    background: transparent;
}

.exercise-detail-page .exercise-form-field input:focus {
    border-bottom-color: var(--accent);
    outline: 0;
    box-shadow: 0 1px 0 var(--accent);
}
:root body {
    background-color: var(--page-bg);
    color: var(--text-primary);
}

:root body :is(h1, h2, h3, h4, h5, h6, p, label, li, dt, dd, time, small) {
    color: inherit;
}

:root body :is(input, select, textarea) {
    color: var(--text-primary);
    border-color: var(--glass-border);
    color-scheme: dark;
}

:root body :is(input, select, textarea)::placeholder {
    color: var(--text-muted);
}

:root body :is(button, .main-button, .secondary-button) {
    color: var(--text-primary);
}

:root .bottom-navigation {
    border-color: var(--glass-border);
    background: rgba(20, 20, 20, 0.96);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.28);
}

:root .bottom-nav-item {
    color: var(--text-muted);
}

:root .bottom-nav-item.active {
    color: var(--accent-hover);
}

:root .desktop-navigation a:hover,
:root .desktop-navigation a.active,
:root .desktop-nav-more:hover {
    color: var(--accent-hover);
}

:root .topbar .mobile-login {
    color: var(--text-primary);
}

:root .topbar {
    background: var(--topbar-bg);
    border-color: var(--glass-border);
}

:root .workout-item,
:root .competition-result,
:root .profile-detail,
:root .profile-upload,
:root .public-workout,
:root .social-links a,
:root .google-button,
:root .exercise-card,
:root .exercise-details,
:root .exercise-form-field input {
    color: var(--text-primary);
    border-color: var(--glass-border);
    background-color: var(--glass-subtle);
}

:root .person-top,
:root .social-section,
:root .profile-header,
:root .profile-socials,
:root .public-profile-header {
    border-color: var(--glass-border);
}

:root .secondary-button {
    border-color: var(--glass-border);
    color: var(--text-primary);
    background: var(--glass-subtle);
}

:root .secondary-button:hover {
    color: var(--text-primary);
    background: var(--glass-panel);
}

:root .mobile-nav-panel {
    color: var(--text-primary);
    background: var(--glass-panel);
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.35);
}

:root .mobile-nav-heading {
    border-color: var(--glass-border);
}

:root .mobile-nav-brand,
:root .mobile-nav-links > a,
:root .mobile-nav-links > .mobile-nav-logout,
:root .mobile-nav-close {
    color: var(--text-primary);
}

:root .topbar .mobile-menu-toggle {
    border-color: var(--glass-border);
    color: var(--text-primary);
    background: var(--glass-subtle);
}

:root .mobile-nav-close {
    border: 0;
    color: var(--text-primary);
    background: transparent;
}

:root .mobile-nav-close:hover {
    background: var(--glass-subtle);
}

:root .topbar .mobile-menu-toggle:hover {
    background: var(--glass-panel);
}

:root .mobile-nav-links > a:hover,
:root .mobile-nav-links > .mobile-nav-logout:hover {
    color: var(--accent-hover);
    background: var(--accent-soft);
}

:root .auth-content a.google-oauth-button {
    color: #202124;
    background: #fff;
    border-color: #dadce0;
    opacity: 1;
    visibility: visible;
}

:root .exercise-card {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: #141414;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

:root .exercise-card-media {
    background: #141414;
}

:root .exercise-card:hover {
    border-color: #454545;
    background: #181818;
    transform: translateY(-2px);
}

:root .competition-result {
    border: 0;
    border-radius: 0;
    background: transparent;
}

:root .competition-result:hover {
    background: #161616;
}

:root .competition-user-info strong {
    color: var(--text-primary);
}

:root .competition-user-info span {
    color: var(--text-secondary);
}

:root .competition-avatar.placeholder {
    background: #303030;
}

:root .exercise-details {
    background: transparent;
}

:root .competition-search,
:root .competition-section,
:root .competition-search-area,
:root .competition-people,
:root .competition-results,
:root .competition-grid {
    background: transparent;
}

body.app-page .exercise-library-page .exercise-card,
body.app-page .exercise-library-page .exercise-card:hover {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

body.app-page .exercise-library-page .exercise-card-media {
    background: transparent;
}

:root .competition-search-area {
    width: 100%;
}

:root .competition-search-area .competition-result,
:root .competition-people .competition-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: background-color 160ms ease;
}

:root .competition-search-area .competition-result:hover,
:root .competition-people .competition-card:hover {
    background: #181818;
}

:root .competition-user-info strong,
:root .competition-card-profile h3 {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
}

:root .competition-user-info span,
:root .competition-card-header p,
:root .competition-card .recent-workouts {
    color: var(--text-secondary);
    font-size: 12px;
}

:root .competition-people .competition-card-header {
    flex: 1 1 50%;
    min-width: 0;
}

:root .competition-people .competition-card-profile {
    align-items: center;
}

:root .competition-people .today-workouts {
    flex: 1 1 35%;
    min-width: 0;
    padding: 0;
}

:root .competition-people .today-workouts p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

:root .competition-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border: 1px solid var(--glass-border);
}

:root .competition-avatar.placeholder {
    background: #242424;
    color: var(--text-primary);
}

:root .competition-results .add-competitor-button,
:root .competition-people .remove-competitor-button {
    display: inline-grid;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--accent-hover);
    background: transparent;
    box-shadow: none;
    font-size: 20px;
    line-height: 1;
}

:root .competition-results .add-competitor-button:hover,
:root .competition-people .remove-competitor-button:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    :root .competition-search-area .competition-result,
    :root .competition-people .competition-card {
        gap: 10px;
        padding: 12px 2px;
    }

    :root .competition-people .competition-card {
        flex-wrap: wrap;
    }

    :root .competition-people .competition-card-header {
        flex: 1 1 calc(100% - 48px);
    }

    :root .competition-people .today-workouts {
        flex: 1 1 100%;
        padding-left: 54px;
    }
}

:root body :is(
    .container,
    .app-page,
    .profile-container,
    .exercise-library,
    .exercise-library-groups,
    .exercise-section,
    .workout-section,
    .social-section,
    .competition-people,
    .competition-search-area,
    .competition-search,
    .competition-section
) {
    border: 0;
    background: transparent;
    box-shadow: none;
}

:root body :is(
    .card,
    .person-card,
    .profile-upload
) {
    border-color: var(--glass-border);
    background: #141414;
    box-shadow: none;
}

:root body :is(
    .person-top,
    .social-section,
    .profile-header,
    .profile-socials,
    .public-profile-header
) {
    border-color: var(--glass-border);
}

:root body :is(
    .competition-search,
    .competition-section,
    .competition-card,
    .profile-detail,
    .public-workout,
    .exercise-mode-tabs
) {
    border-color: var(--glass-border);
    background: transparent;
}

:root #firstSetupPage .setup-card {
    border-color: var(--glass-border);
    background: #141414;
    box-shadow: none;
}

:root .workout-item {
    border-color: var(--glass-border);
    background: transparent;
    box-shadow: none;
}

#signupResendStatus,
#loginOtpResendStatus {
    min-height: 0;
    margin: 0 0 12px;
    font-size: 13px;
    text-align: center;
}

.auth-footer #signupLink,
.auth-footer #loginLink {
    color: #60a5fa !important;
}
