/* --- VARIABLES --- */
:root {
    /* Brand Colors */
    --page-color: #800D00;
    --page-color-bright: #FF0C00;
    --primary-success: #00C70A;
 
        /* Section colours: same values as the iOS asset catalog */
        /* Heavy Bag - Deep Red to Bright Red */
        --HeavyBag: #800C00;
        --HeavyBag-bright: #FF0C00;

        /* Shadow Boxing - Magenta/Pink Tones */
        --ShadowBoxing: #752B40;
        --ShadowBoxing-bright: #D24F74;

        /* Weight Training - Warm Earthy Browns */
        --WeightTraining: #5E2C78;
        --WeightTraining-bright: #A25AD0;

        /* Pads or Mitts - Deep Blue to Sky Blue */
        --PadsorMitts: #3F3192;
        --PadsorMitts-bright: #7563F0;

        /* Sparring - Steel Blue to Light Blue */
        --Sparring: #3151A1;
        --Sparring-bright: #4A7EFF;

    /* Plan Start - Bright Blue to Dark Navy */
    --Plan-Free: #575757;
    --Plan-Free-bright: #8a8a8a;
    /* Plan Start - Bright Blue to Dark Navy */
        --Plan-Starter: #2577FA;
        --Plan-Starter-bright: #1E3E81;

        /* Plan Growth - Purple to Deep Violet */
        --Plan-Growth: #8200E8;
        --Plan-Growth-bright: #4F00C0;

        /* Plan Pro - Bronze to Golden Orange */
        --Plan-Pro: #C88C32;
        --Plan-Pro-bright: #FFD300;
    
    /* Neutrals */
    --white: #ffffff;
    --black: #000000;
    --gray-vlight: #a2a2ab;
    --gray-light: #8E8E93;
    --gray-mid: #333336;      /* Combined #333 and #333336 */
    --gray-dark: #2f2f2f;
    --gray-deep: #1c1c1e;     /* Combined #1c1c1e, #1a1a1a, and #171717 */
    --gray-black: #080808;
    
    /* Functional */
    --error: var(--page-color-bright);
    --success: var(--primary-success);
    --card-bg: #121212;
    --border: #2c2c2e;
    --input-focus-bg: #252528;
}

/* --- GLOBAL BASE --- */
*, *:before, *:after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    background-color: #0d0d0d;
}

body {
    background: linear-gradient(to bottom right, #1a1a1a, #0d0d0d); /* darker page background */
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* --- Mode Classes --- */

.HeavyBag {
    background-color: var(--HeavyBag);
    color: white;
}
.HeavyBag.bright {
    background-color: var(--HeavyBag-bright);
}

.ShadowBoxing {
    background-color: var(--ShadowBoxing);
    color: white;
}
.ShadowBoxing.active {
    background-color: var(--ShadowBoxing-bright);
}

.WeightTraining {
    background-color: var(--WeightTraining);
    color: white;
}
.WeightTraining.active {
    background-color: var(--WeightTraining-bright);
}

.PadsorMitts {
    background-color: var(--PadsorMitts);
    color: white;
}
.PadsorMitts.active {
    background-color: var(--PadsorMitts-bright);
}

.Sparring {
    background-color: var(--Sparring);
    color: white;
}
.Sparring.active {
    background-color: var(--Sparring-bright);
}

/* --- Plan Classes --- */

.home {
    color: var(--Plan-free);
}
.PlanFree {
    background-color: var(--Plan-Free);
    color: white;
}
.PlanFree.active {
    background-color: var(--Plan-Free-bright);
}
.PlanStarter {
    background-color: var(--Plan-Starter);
    color: white;
}
.PlanStarter.active {
    background-color: var(--Plan-Starter-bright);
}

.PlanGrowth {
    background-color: var(--Plan-Growth);
    color: white;
}
.PlanGrowth.active {
    background-color: var(--Plan-Growth-bright);
}

.PlanPro {
    background-color: var(--Plan-Pro);
    color: black;
}
.PlanPro.active {
    background-color: var(--Plan-Pro-bright);
}
/* --- Mode Text Colors --- */

.text-HeavyBag {
    color: var(--HeavyBag);
    text-decoration: none;
}
.text-HeavyBag.active {
    color: var(--HeavyBag-bright);
    text-decoration: none;
}

.text-ShadowBoxing {
    color: var(--ShadowBoxing);
    text-decoration: none;
}
.text-ShadowBoxing.active {
    color: var(--ShadowBoxing-bright);
    text-decoration: none;
}

.text-WeightTraining {
    color: var(--WeightTraining);
    text-decoration: none;
}
.text-WeightTraining.active {
    color: var(--WeightTraining-bright);
    text-decoration: none;
}

.text-PadsorMitts {
    color: var(--PadsorMitts);
    text-decoration: none;
}
.text-PadsorMitts.active {
    color: var(--PadsorMitts-bright);
    text-decoration: none;
}

.text-Sparring {
    color: var(--Sparring);
    text-decoration: none;
}
.text-Sparring.active {
    color: var(--Sparring-bright);
    text-decoration: none;
}

/* --- Plan Text Colors --- */

.text-PlanStarter {
    color: var(--Plan-Starter);
    text-decoration: none;
}
.text-PlanStarter.active {
    color: var(--Plan-Starter-bright);
    text-decoration: none;
}

.text-PlanGrowth {
    color: var(--Plan-Growth);
    text-decoration: none;
}
.text-PlanGrowth.active {
    color: var(--Plan-Growth-bright);
    text-decoration: none;
}

.text-PlanPro {
    color: var(--Plan-Pro);
    text-decoration: none;
}
.text-PlanPro.active {
    color: var(--Plan-Pro-bright);
    text-decoration: none;
}
/* --- LAYOUT UTILITIES --- */
.plan-locked {
    display:hidden;
}
.container {
    width: 100%;
    max-width: 800px;
    padding-bottom: 7.5rem;
}
.title {
    padding-top: 1.75rem;
    padding-left: 1.75rem;
}

.hidden {
    display: none !important;
}

.eye-stats {
    display: inline-flex;
    align-items: center;      /* Centers SVG and text vertically */
    justify-content: center;
    gap: 4px;                 /* Space between icon and numbers */
    
    color: var(--gray-light);
    font-size: 0.6em;        /* Exactly 12px based on 16px parent */
    line-height: 1;           /* Prevents extra vertical padding */
    vertical-align: middle;   /* Aligns the whole component with surrounding text */
}

.eye-stats svg {
    display: block;           /* Removes inline whitespace gaps */
    width: 1em;             /* Scales icon relative to font size */
    height: 1em;
}

.h-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

/* --- HEADER & NAVIGATION --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0.625rem 0.5rem 0.625rem;
    width: 100%;
}

.app-logo {
    height: 3rem;
    width: auto;
    display: block;
}

.number-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
    cursor: pointer;
    border-radius: 50%;
    background-color: #fff;
    font-weight: 600;
    line-height: 1;
}

.breadcrumb {
    display: flex;
    gap: 0.625rem;
    padding: 1.875rem 1.875rem 0.625rem 0.625rem;
    color: var(--gray-light);
    font-size: 0.9375rem;
}

.breadcrumb span {
    white-space: nowrap;
}

.header-title {
    font-size: 2rem;
    padding: 2rem 0.625rem 0.25rem 0.625rem;
}
.section-header-title {
    font-size: 1rem;
}
.section-sub-title {
    font-size: 0.75rem;
}

.user-greeting {
    font-size: 0.875rem;
    color: var(--gray-light);
    text-align: right;
}

.user-greeting p { margin: 0; }

.logout-link {
    text-decoration: none;
    margin-left: 0.5rem;
}

/* --- CUSTOM BUTTONS (Pick Type) --- */
.custom-button {
    position: relative;
    width: 100%;
    min-width: 25.625rem;
    max-width: 100rem;
    height: 7rem;
    border: none;
    border-radius: 0.625rem;
    overflow: hidden;
    padding: 0;
    margin-bottom: 0.625rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--black), transparent 80%);
}

.button-bg-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.12;
}

.button-content {
    position: relative;
    z-index: 2;
    width: 100%;
    color: var(--white);
    padding-left: 1.875rem;
    display: flex;
    flex-direction: column;
}

.button-title {
    color: var(--white);
    font-family: sans-serif;
    font-size: 1.25rem;
    text-transform: uppercase;
    font-weight: bold;
}



    
.box-container {
    display: inline-flex; /* Changed from flex to inline-flex to sit next to text */
    align-items: flex-end;
    gap: 4px;
    height: 0.6225rem;       /* Set height relative to your text size */
    vertical-align: middle; /* This centers the container with the text line */
    margin-left: 8px;     /* Optional: space between text and boxes */
}

.box {
    width: 0.9375rem; 
    height: 0.9375rem;
    border-radius: 0.1875rem;
}

.box-1 { background-color: var(--white); }
.box-2 { background-color: var(--white); opacity: 0.5; }

.lock-icon {
    font-size: 1rem;      /* Scaled to match text height better */
    line-height: 1;
    filter: brightness(0) invert(1);
    /* Ensure the lock doesn't have extra margin */
    display: block;
}

/* --- CONTENT SECTIONS & TABLES --- */
.section-header-block {
    padding: 1em 1.25em;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1em;
}
.section-block {
    background: var(--card-bg);
    padding: 1em 1.25em;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1em;
}
.section-top{
    padding: 0 0 0 0.625em;
}
.category-header {
    padding: 0.9375rem 1.25rem;
    font-size: 1.125rem;
    color: var(--gray-light);
    font-weight: bold;
    background: var(--gray-deep);
}

.item-category {
    padding: 1.275rem 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-category span { color: var(--white); font-size: 1.2rem; }
.item-title, .sub-text { color: var(--gray-vlight); font-size: 0.75rem;}
.item-row {
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- EXPANDED INFO & SUB-ROWS --- */
.expanded-info {
    background: var(--gray-black);
    padding: 0.9375rem 1.25rem 1.25rem 1.25rem;
    border-top: 1px solid var(--gray-deep);
    display: none;
}

.info-content {
    display: flex;
    gap: 0.9375rem;
    margin-bottom: 0.9375rem;
    align-items: flex-start;
}

.video-placeholder {
    width: 10rem;
    height: 5.625rem;
    background: var(--gray-deep);
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.info-text {
    font-size: 0.75rem;
    color: var(--gray-light);
    line-height: 1.4;
    flex: 1;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    padding-left: 0.9375rem;
}

.sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 2.75rem;
    border-bottom: 1px solid var(--gray-deep);
    position: relative;
}

.sub-row::before {
    content: "•";
    position: absolute;
    left: -0.9375rem;
    color: var(--page-color-bright);
    font-size: 1.25rem;
}

/* --- FORMS & AUTH --- */
.auth-footer{
    color: var(--gray-vlight);
font-size: 0.8rem;
    margin-left: 10px;

    }
.auth-footer a {
    color: var(--gray-vlight);
    margin-right: 20px;
        text-decoration: none;


}
.auth-container {
    width: 95%;
    border-radius: 0.75rem;
    margin: 2rem auto;
}

.auth-container h2 {
    color: var(--page-color-bright);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-container input {
    width: 100%;
    background: var(--gray-deep);
    color: var(--white);
    padding: 0.9rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.auth-container input:focus {
    outline: none;
    border-color: var(--page-success);
    background: var(--input-focus-bg);
}

.form-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}



.form-row input { flex: 1; min-width: 0; }

.scroll-view {
    margin-top: 1rem;
}
.address-section {
    background: color-mix(in srgb, var(--black), transparent 70%);
    padding: 1.25rem;
    border-radius: 0.625rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.address-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--gray-light);
    margin: 0 0 1rem 0;
    letter-spacing: 1px;
}

/* --- CONTROLS & BUTTONS --- */
.filter-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.625rem;
    overflow-x: auto;
}

.filter-btn, .btn-begin, .btn-normal{
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: var(--white);
    border-radius: 0.50rem;
    transition: all 0.2s;
}
.btn-register {
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: var(--white);
    background: var(--page-color);
    border-radius: 0.50rem;
    transition: all 0.2s;
}
.btn-info {
    border: none;
    font-weight: bold;
    font-size: 1.25rem;
    padding: 0rem 0.75rem 0.2rem 0.75rem;
    cursor: pointer;
    color: var(--white);
    background: var(--page-color);
    border-radius: 0.50rem;
    transition: all 0.2s;
}
.card-btn{
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: var(--white);
    margin:1rem;
    padding:1rem;
    border-radius: 0.50rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--black), transparent 90%);
}
.confirm-btn{
    border: none;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--white);
    background: var(--page-color-bright);
    margin:1rem;
    padding:1.2rem;
    border-radius: 0.50rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--black), transparent 60%);
}
.filter-btn { padding: 0.75rem; }
//.filter-btn.active { background: var(--page-color-bright); }
.btn-info.active { background: var(--page-color-bright); }

.btn-normal, .btn-begin { padding: 0.75rem 1.5625rem; }
.btn-begin { animation: pulse 2s infinite; }

.btn-register {
    width: 100%;
    padding: 1rem;
    text-transform: uppercase;
}
.btn-register:hover {
    background: var(--page-color-bright);
    transform: translateY(-1px);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 2.875rem;
    height: 1.5rem;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--gray-mid);
    transition: 0.2s;
    border-radius: 1.25rem;
}
.toggle-track:before {
    position: absolute;
    content: "";
    height: 1.25rem; width: 1.25rem;
    left: 0.125rem; bottom: 0.125rem;
    background-color: var(--white);
    transition: 0.2s;
    border-radius: 50%;
}
input:checked + .toggle-track { background-color: var(--page-color); }
input:checked + .toggle-track:before { transform: translateX(1.375rem); }


/* --- SYSTEM UI (Toast / Bottom Bar) --- */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 350px;
}

.toast {
    background: var(--gray-mid);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--black), transparent 70%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out;
    border-left: 5px solid var(--primary-success);
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 800px;
    background: color-mix(in srgb, var(--gray-deep), transparent 5%);
    display: flex;
    justify-content: space-between;
    padding: 1.25rem;
    border-top: 1px solid var(--gray-mid);
    z-index: 100;
}

/* --- ANIMATIONS --- */
@keyframes pulse {
    0%, 100% { transform: scale(0.98); }
    50% { transform: scale(1.04); background: var(--page-color-bright); }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    body {
        background: linear-gradient(to bottom right, #1a1a1a, #0d0d0d) !important; /* darker page background */
        background-attachment: scroll !important;
    }
    html { background-color: #0d0d0d !important; }
}

@media (max-width: 480px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .app-logo { height: 2.5rem; }
    .header-title { font-size: 1.5rem; padding-top: 1rem; }
    
    .auth-container { padding: 1.25rem; margin-top: 1rem; }
    .auth-container input { font-size: 16px !important; padding: 0.8rem; }
    
    .button-content { padding-left: 1rem; }
    .button-title { font-size: 1.1rem; }
}

input { transition: border-color 0.3s ease; }
.success-border { border-color: var(--success) !important; }
.error-border { border-color: var(--error) !important; }



/* Sliders without the browser's white outline: thin dark track, solid round thumb in the page colour. */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  background: transparent; height: 22px; border: none; outline: none;
  accent-color: var(--page-color-bright, #800000);
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: #3a3a3a; border: none; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: #3a3a3a; border: none; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -7px;
  border-radius: 50%; border: none; box-shadow: none; background: var(--page-color-bright, #800000);
}
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; border: none; background: var(--page-color-bright, #800000); }
input[type="range"]:focus { outline: none; }
.opts input[type="range"]::-webkit-slider-thumb, .timer-controls input[type="range"]::-webkit-slider-thumb { background: #800000; }
.opts input[type="range"]::-moz-range-thumb { background: #800000; }


/* 1. Full-Width Carousel Logic */
.plan-carousel {
    display: flex;
    gap: 20px;
    padding: 30px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.plan-carousel::-webkit-scrollbar { display: none; }

/* Spacer to prevent first/last card from sticking to screen edge */
.plan-carousel::before, .plan-carousel::after {
    content: '';
    flex: 0 0 20px;
}

/* 2. Individual Card Styling */
.plan-card-ui {
    flex: 0 0 280px;
    scroll-snap-align: center;
    background: #1c1c1e;
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.1);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* Header & Price Styling */
.plan-header {
    padding: 25px 20px;
    border-radius: 14px 14px 0 0;
    text-align: center;
}
.plan-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin: 0;
    text-transform: uppercase;
}

.price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: white;
    margin-top: 10px;
}
.p-sym { font-size: 1.2rem; opacity: 0.7; transform: translateY(-12px); }
.p-amt { font-size: 3.5rem; font-weight: bold; line-height: 1; }
.p-dec { font-size: 3.5rem; font-weight: bold; line-height: 1; }
.p-per { font-size: 1rem; opacity: 0.7; }

/* 3. Floating Label Feature Box */
.feature-box {
    position: relative;
    border: 2px solid #444; /* Fallback */
    border-radius: 12px;
    margin: 30px 20px 15px 20px;
    padding: 20px 15px;
}
.extra-features {
    padding: 0 20px 20px 20px;
    }
.features {
    position: relative;
    flex-grow: 1;
    margin: 0;
    padding: 0;
}

.float-label {
    position: absolute;
    top: -11px;
    left: 12px;
    background: #1c1c1e; /* Matches card bg */
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: 900;
}

.feat-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: #eee;
    margin-bottom: 8px;
}

.feat-item i { font-size: 0.75rem; margin-top: 4px; }

/* 4. Action Buttons */
.stats-wrapper { --accent: ; color: #fff; padding: 1.2rem; border-radius: 12px; margin-top: 20px; font-family: sans-serif; }
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr); /* 5 items per row */
        gap: 15px;
        margin-bottom: 20px;
    }
    .stat-tile { background: #1a1a1a; padding: 10px 2px; border-radius: 8px; text-align: center; border-bottom: 2px solid #333; }
    .stat-tile.total { border-bottom-color: var(--accent); }
    .stat-tile.today { border-bottom-color: #444; background: #151515; }
    .stat-tile small { color: #666; font-size: 0.55rem; text-transform: uppercase; display: block; margin-bottom: 4px; }
    .stat-tile h2 { margin: 0; font-size: 1rem; }
    .grid-label { grid-column: span 5; font-size: 0.7rem; color: #888; margin: 10px 0 5px 0; text-transform: uppercase; letter-spacing: 1px;}

        /* --- VERIFICATION BANNER --- */
        .verify {
            width: 100vw;
            position: relative;
            left: 50%;
            right: 50%;
            margin-top: 1rem;
            margin-bottom: 1rem;
            margin-left: -50vw;
            margin-right: -50vw;
            
            background: var(--HeavyBag); /* Subtle version of --Plan-pro */
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-top: 1px solid var(--HeavyBag-bright);
            padding: 1.25rem 1rem;
            text-align: center;
            z-index: 1000;
        }

        .verify h3 {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--white);
            line-height: 1.5;
        }

        .verify strong {
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-right: 5px;
        }

        .verify a {
            color: var(--white);
            font-weight: bold;
            text-decoration: none;
            display: inline-block;
            margin-top: 5px;
            padding: 2px 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            transition: all 0.2s ease;
        }

        .verify a:hover {
            background: var(--Plan-free);
            color: var(--black);
        }

        /* For Mobile: Ensure text doesn't feel cramped */
        @media (max-width: 480px) {
            .verify h3 { font-size: 0.85rem; }
            .verify a { display: block; margin: 10px auto 0; width: fit-content; }
        }

        .plan-expiring {
            background: #3a3a3c !important; /* Darker, neutral color */
            color: #aeaeae !important;
            border: 1px solid #48484a !important;
            cursor: default;
            pointer-events: none; /* Prevents clicking while in grace period */
        }

/* --- iOS parity additions (skills page, modals, wrap tutorial, timer, home) --- */
.level-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 20px 0; }
.level-label { color: var(--gray-light); margin-right: 4px; }
.level-btn, .preset-btn {
    background: var(--card-bg); color: var(--white); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.75rem 0.9rem; cursor: pointer; font-size: 0.9rem;
}
.level-btn.active { background: var(--page-color); border-color: var(--page-color-bright); }
.level-hint { color: var(--gray-light); font-size: 0.8rem; padding: 4px 20px 0; margin: 0; }
.fitness-presets { padding: 10px 20px 20px; }
.preset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.preset-btn { background: var(--page-color); border: none; border-radius: 8px; font-size: 0.75rem; padding: 15px 4px; }
.preset-btn.active { background: var(--card-bg); }
.equipment-prompt { display: flex; justify-content: space-between; align-items: center; gap: 10px;
    margin-top: 12px; padding: 12px 16px; background: var(--black); border-radius: 15px; }
.equipment-prompt.hidden, .modal.hidden { display: none; }

.modal { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { background: var(--gray-deep); border: 1px solid var(--border); border-radius: 16px;
    padding: 20px 22px; max-width: 420px; width: 100%; text-align: center; }
.modal-card h3 { margin: 0 0 10px; }
.modal-card p { color: var(--gray-vlight); }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

.wrap-card { max-width: 600px; text-align: left; }
.wrap-head { display: flex; justify-content: space-between; align-items: center; }
.wrap-close { background: none; border: none; color: var(--gray-vlight); font-size: 2rem; cursor: pointer; }
.wrap-video-box { position: relative; display: flex; justify-content: center; margin: 10px 0; }
.wrap-video-box video { width: 100%; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; background: #000; }
.wrap-next { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem;
    background: rgba(255,12,0,0.5); color: #fff; border: none; border-radius: 50%; width: 80px; height: 80px; cursor: pointer; }
.wrap-next.hidden { display: none; }
.wrap-step { position: absolute; right: 12%; bottom: 12px; color: #fff; }
.wrap-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--white); }
.wrap-row input[type=range] { flex: 1; }
.wrap-choices { justify-content: space-between; text-align: center; }
.wrap-hand { font-size: 2rem; background: var(--HeavyBag); border: none; border-radius: 15px; padding: 6px 10px; margin: 8px 2px; cursor: pointer; }
.wrap-hand.adv { background: var(--PadsorMitts); }
.wrap-hand.flip { transform: scaleX(-1); }

/* Home page */
.home-title { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px 5px; }
.home-title h2 { margin: 0; color: var(--gray-light); font-weight: 400; font-size: 1.9rem; }
.home-title.collapsed h3 { margin: 0; color: var(--gray-mid); font-weight: 400; }
.eye-btn { background: none; border: none; color: var(--gray-light); font-size: 1.2rem; cursor: pointer; }
.guide-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 8px 15px; }
.guide-card { position: relative; text-align: left; background: var(--gray-black); color: var(--gray-vlight);
    border: none; border-radius: 15px; padding: 40px 20px 20px; font-size: 1.2rem; cursor: pointer; display: flex; flex-direction: column; }
.guide-card i { position: absolute; top: 18px; right: 15px; color: var(--white); }
.custom-button.locked { background: var(--gray-black); filter: grayscale(1); }
.custom-button { position: relative; }
.custom-button.short { min-height: 50px; height: 50px; }
.custom-button.Timer { background: #517C51; }
.locked-plan { position: absolute; top: 14px; right: 18px; font-size: 0.9rem; }
.library-card, .message-card { margin: 8px; padding: 14px 16px; border-radius: 16px; background: var(--gray-black); }
.library-card p { color: var(--gray-light); margin: 0 0 6px; font-size: 0.9rem; }
.library-card ul { margin: 0; padding-left: 18px; color: var(--gray-vlight); }
.library-link { display: inline-block; margin-top: 8px; color: var(--Plan-Pro); }
.messages-box { margin: 20px 8px; padding: 8px 0; border-radius: 16px; background: #202020; }
.messages-box .message-card { background: transparent; margin: 0; }
.message-card h3 { margin: 4px 0 8px; color: var(--gray-light); font-weight: 400; }
.message-card.offer { background: var(--Plan-Pro); }
.message-card.offer h3 { color: var(--white); }
.message-body { display: flex; gap: 14px; align-items: flex-start; }
.message-body img { width: 100px; border-radius: 6px; }
.msg-text { margin: 0 0 6px; color: var(--gray-vlight); font-size: 0.9rem; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--white); padding: 4px 0; list-style: none;
    display: flex; justify-content: space-between; }
.faq p { color: var(--gray-vlight); font-size: 0.9rem; }
/* Buttons used a 410px minimum width, wider than most phones; let them shrink to the screen. */
.custom-button { min-width: 0; }

/* Round timer page and the timer circle (also used by the player) */
/* Circle centred in the space above; controls at the bottom of the page, clear of the edge */
.round-timer { position: relative; max-width: 600px; margin: 0 auto; padding: 10px 0 20px; display: flex; flex-direction: column;
    min-height: calc(100vh - 120px); min-height: calc(100dvh - 120px); }
.round-timer .timer-holder { margin: auto; }
/* Circle as big as the space allows: the page width, or the screen height left after the header and the controls. */
.timer-holder { width: max(220px, min(calc(100vw - 20px), 580px, calc(100vh - 430px))); margin: 15px auto 0; }
.timer-circle { width: 100%; height: auto; display: block; overflow: visible; }
.timer-circle .timer-clock { fill: #BFBFBF; font-size: 77px; font-variant-numeric: tabular-nums; transition: font-size 1s, y 1s; }
.timer-circle .timer-clock.small { font-size: 20px; }
.timer-circle .timer-glow { fill-opacity: 0.3; transform-origin: 175px 175px; transform: scale(1.1); }
.timer-circle .timer-glow.pulse { animation: timerGlow 1.3s ease-out infinite alternate; }
@keyframes timerGlow { from { transform: scale(1.1); } to { transform: scale(1.3); } }
.timer-controls { padding: 30px 40px 10px; }
.timer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #BFBFBF; font-size: 1.2rem; min-height: 50px; }
.timer-controls input[type=range] { width: 100%; accent-color: #808080; }
.timer-home { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px;
    border-radius: 15px; background: #101010; color: #BFBFBF; text-decoration: none; }
/* Same side padding on Reset / Options / Start (at least 80 wide) */
.timer-btn { min-width: 72px; height: 50px; padding: 0 14px; border: none; border-radius: 15px; color: #fff; font-size: 1rem; cursor: pointer; }
/* Round / rest length under the timer (click = options) */
.timer-lengths { padding: 12px 0 0; gap: 12px; }   /* inside the controls: same edges as the slider */
#rounds-slider, .timer-controls > .timer-row:first-child { position: relative; top: -20px; }   /* rounds line and slider 20 px higher */
.length-pill { flex: 1; height: 50px; border-radius: 15px; background: none; color: #BFBFBF; font-size: 0.95rem; cursor: pointer; }
.length-pill.green { border: 2px solid #00FF00; }
.length-pill.red { border: 2px solid #FF0000; }
/* Timer options panel (iOS TimerOptionsSheet) */
.timer-options { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: #101010; color: #fff; padding: 25px;
    max-width: 640px; margin: 0 auto; }
.timer-options.hidden { display: none; }
.timer-options .opt-head { display: flex; justify-content: space-between; align-items: center; font-size: 20px; color: #BFBFBF; }
.timer-options .opt-head button { background: none; border: none; color: #BFBFBF; opacity: 0.85; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 8px; }
.timer-options .opt-note { color: #808080; font-size: 13px; margin: 8px 0 0; }
.timer-options .opt-title { color: #808080; font-size: 13px; margin: 22px 0 8px; }
.timer-options button { font-family: inherit; }
.opt-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt-presets button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: none;
    border-radius: 5px; background: #3A3A3A; color: #fff; font-size: 15px; cursor: pointer; }
.opt-presets button small { font-size: 12px; opacity: 0.75; }
.opt-stepper { display: flex; gap: 8px; align-items: center; }
.opt-stepper button { width: 60px; height: 44px; border: none; border-radius: 5px; background: #3A3A3A; color: #fff; font-size: 22px; cursor: pointer; }
.opt-stepper span { flex: 1; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 26px;
    border: 2px solid #808080; border-radius: 5px; font-variant-numeric: tabular-nums; }
.opt-stepper span.green { border-color: #00FF00; }
.opt-stepper span.red { border-color: #FF0000; }
.opt-choices { display: flex; gap: 3px; }
.opt-choices button { flex: 1; padding: 10px 0; border: none; border-radius: 5px; background: #3A3A3A; color: #fff; font-size: 14px; cursor: pointer; }
.opt-presets button.on, .opt-choices button.on { background: #008000; }
/* New timer layout: full-width Start, Reset / Plans / Options bar, Home and Sounds (black, like the dashboard Home) */
.timer-controls { display: flex; flex-direction: column; gap: 10px; }
.timer-controls #rounds-slider, .timer-controls > .timer-row:first-child { top: 0; }
.timer-startrow { gap: 8px; }
.timer-reset { width: 100px; min-height: 56px; border: none; border-radius: 15px; background: #808080; color: #fff; font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.timer-reset.hidden { display: none; }
.timer-start { flex: 1; width: 100%; min-height: 56px; border: none; border-radius: 15px; color: #fff; font-size: 1.25rem; font-weight: 600; cursor: pointer; }
.timer-bar button { flex: 1; height: 50px; border: none; border-radius: 15px; color: #fff; font-size: 1rem; cursor: pointer; }
.timer-black { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 15px;
    background: #000; color: #fff; text-decoration: none; font-size: 0.95rem; }
.timer-sound select { background: transparent; color: #fff; border: none; font-size: 0.95rem; cursor: pointer; }
.timer-sound select option { background: #1c1c1e; }
.length-pill.yellow { border: 2px solid #C9B400; }
.timer-lengths.hidden { display: none; }
.opt-stepper span.yellow { border-color: #C9B400; font-size: 16px; }
.plan-step { background: #1c1c1e; border-radius: 10px; padding: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.plan-step-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.plan-step-head b.green, .plan-warn b { color: #00FF00; }
.plan-step-head b.red { color: #FF0000; }
.plan-step-head button, .plan-warn > button { background: none; border: none; color: #808080; cursor: pointer; font-size: 16px; }
.plan-warn { display: flex; align-items: center; gap: 8px; }
.plan-warn b { color: #C9B400; font-size: 12px; width: 70px; }
.plan-warn .opt-stepper { flex: 1; }
.plan-step .opt-stepper button { width: 50px; height: 40px; }
.plan-step .opt-stepper span { height: 40px; font-size: 22px; }
.plan-add { display: flex; gap: 8px; margin-top: 16px; }
.plan-add button { flex: 1; height: 46px; border-radius: 10px; background: none; color: #fff; font-size: 15px; cursor: pointer; }
.plan-add .green { border: 2px solid #00FF00; } .plan-add .red { border: 2px solid #FF0000; } .plan-add .yellow { border: 2px solid #C9B400; }
.plan-add button:disabled { opacity: .4; cursor: default; }
.plan-summary { color: #BFBFBF; font-size: 15px; margin: 14px 0 10px; }
.plan-use { width: 100%; height: 50px; border: none; border-radius: 10px; background: #008000; color: #fff; font-size: 17px; font-weight: 600; cursor: pointer; }
.plan-use:disabled { opacity: .4; cursor: default; }
.timer-toggles { padding: 20px 40px; font-size: 0.95rem; }
.timer-toggles label { display: flex; align-items: center; gap: 8px; }
.toggle-switch.green .toggle-track { box-shadow: 0 0 0 2px #00FF00; }
.toggle-switch.red .toggle-track { box-shadow: 0 0 0 2px #FF0000; }
.round-card { position: absolute; left: 0; right: 0; top: 30px; width: 325px; height: 375px; max-width: 90vw; margin: 0 auto;
    border-radius: 25px; background: #fff; color: #101010; text-align: center; font-size: 65px;
    opacity: 0; transform: scale(0.3); transition: opacity 1s, transform 1s; pointer-events: none; }
.round-card.show { opacity: 1; transform: scale(1); }
.round-card hr { width: 175px; border: 0; border-top: 1px solid #404040; }
.round-card .num { font-size: 150px; line-height: 1.1; }
.no-basics { display: none !important; }
.timer-toggles label > span:first-child { white-space: nowrap; }
.modal-actions button[data-answer="no"] { background: var(--gray-mid); color: var(--white); border: none; }
.btn-wrap { background: #101010 !important; color: var(--white) !important; border: none; }
.btn-normal:not(.HeavyBag):not(.ShadowBoxing):not(.WeightTraining):not(.PadsorMitts):not(.Sparring) { background: var(--gray-mid); }

/* ===== iOS look for the skills / options pages (matches the iPhone screens) ===== */
.ios-title { color: var(--page-color-bright); font-size: 2.1rem; padding: 1.4rem 1.2rem 0.6rem; text-shadow: 5px 5px 20px #000; }
.level-controls { padding: 0.8rem 1.2rem 1.6rem; gap: 10px; }
.level-btn { background: #101010; border: none; border-radius: 8px; padding: 20px 10px; font-size: 1rem; }
.level-btn.active { background: var(--page-color); border: none; }
.ios-band { background: var(--page-color); border-radius: 0; margin: 0 -0.625rem; padding: 1.4rem 1.5rem; color: #BFBFBF; }
.ios-band .section-header-title { font-size: 1.15rem; margin: 0 0 1.2rem; }
.ios-band .section-sub-title { font-size: 0.8rem; margin: 0 0 1rem; }
.ios-band .number-icon { background: #BFBFBF; color: var(--page-color); }
.show-hide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0; margin: 0 -0.625rem; }
/* Hide Beginner/...: bright page colour while that level is shown, page colour when hidden (iOS) */
.show-btn { background: var(--page-color); color: #fff; border: none; border-radius: 5px; padding: 15px 4px; font-size: 0.65rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.show-btn.off { background: #000; } /* shown: dark page colour, hidden: black */

/* Switches: red track, white knob with a checkmark when on (iOS Toggle + checkmark overlay) */
.toggle-switch { width: 3.2rem; height: 1.9rem; }
.toggle-track { background-color: #3a3a3c; box-shadow: 0 0 0 1px var(--page-color); }
.toggle-track:before { height: 1.6rem; width: 1.6rem; left: 0.15rem; bottom: 0.15rem; }
input:checked + .toggle-track { background-color: var(--page-color-bright); }
input:checked + .toggle-track:before { transform: translateX(1.3rem); content: "\2713"; color: var(--page-color);
    font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Options step: fitness level + "Adjust Fitness Options" band */
.fitness-presets { padding: 3.25rem 0 0.6rem; }   /* +20px under Southpaw / Orthodox */
.presets-title { text-align: center; color: #BFBFBF; font-size: 1.3rem; margin: 0 0 1.11rem; }   /* +5px above the buttons */
.preset-row { margin: 0 -0.625rem; gap: 3px; }
/* Fitness level: page colour, bright when selected (iOS) */
.preset-btn { background: var(--page-color); border-radius: 5px; padding: 15px 4px; font-size: 0.75rem; }
.preset-btn.active { background: var(--page-color-bright); }
.adjust-band { display: flex; align-items: center; gap: 12px; background: var(--page-color); color: #BFBFBF; font-size: 1.2rem;
    margin: 0.6rem -0.625rem 0.6rem; padding: 1.25rem 1.9rem; cursor: pointer; }
.adjust-band .toggle-track { background-color: #101010; box-shadow: 0 0 0 1px #808080; }
.adjust-band input:checked + .toggle-track { background-color: #101010; }
.adjust-band input:checked + .toggle-track:before { content: ""; }

/* Skills step: "NO experience click NEXT / - OR -" and the "Modify Skills" bar */
#modify-skills { padding: 0; }
#modify-skills .next-line { color: #BFBFBF; font-size: 1.15rem; margin: 2.2rem 0 1.71rem; padding: 0 1.2rem; }   /* +5px above "- OR -" */
#modify-skills .or-line { color: #808080; font-size: 1.4rem; margin: 0 0 3.76rem; padding: 0 1.2rem; }   /* +25px before Modify Skills */
/* bar keeps the default .adjust-band side margins, the same as the info box (.ios-band) under it, so both are equally wide */
#modify-skills .adjust-band { margin-bottom: 0; }
/* The bar fills with the page colour up to the % learned of the current level (dark behind) */
#modify-skills .adjust-band { position: relative; overflow: hidden; background: #101010; }
#modify-skills .adjust-band::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--learned, 0%);
    background: var(--page-color); transition: width 1s ease-out 0.15s; }
#modify-skills .adjust-band > * { position: relative; z-index: 1; }
#modify-skills.level-all { display: none; }
#hasskills .ios-band.info-band { margin-top: 8px; } /* gap under the Modify Skills bar, like the options page */
body.skills-collapsed #hasskills,
body.skills-collapsed .filter-controls,
body.skills-collapsed #data-container .Skills { display: none !important; }
/* Info boxes under the bars: dark grey instead of the page colour */
.ios-band.info-band { background: rgba(128, 128, 128, 0.2); }
.ios-band.info-band .number-icon { background: #BFBFBF; color: #333333; }
/* Level and % learned on the right of the Modify Skills bar (replaces the bar under the level buttons) */
.skill-level-info { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.3; }

/* Bottom bar: dark square buttons left, pulsing page-colour action right */
.ios-bar { background: #2b2b2b; border-top: none; align-items: flex-end; padding: 15px; }
.ios-bar .bar-left > span { display: flex; gap: 12px; }
.ios-bar .bar-left > span.hidden { display: none; }
.bar-square { width: 66px; height: 62px; border: none; border-radius: 15px; background: #101010; color: #fff; font-size: 1.6rem; cursor: pointer; }
.bar-square.bar-home { width: auto; padding: 0 22px; font-size: 1rem; display: inline-flex; align-items: center; gap: 8px; } /* Home with its label */
.bar-action { border: none; border-radius: 15px; padding: 20px 26px; color: #fff; font-size: 1rem; cursor: pointer;
    background: var(--page-color); animation: iosPulse 2s ease-in-out infinite; }
.bar-action i { margin-left: 10px; }
@keyframes iosPulse { 0%, 100% { transform: scale(0.97); background: var(--page-color); } 50% { transform: scale(1.05); background: var(--page-color-bright); } }

/* Home: SUBSCRIPTION carousel (iOS SpecificProductsView / PlanFeatureSection) */
.plan-badge { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 4px 20px 0; cursor: pointer; }
.plan-badge small { color: #808080; font-size: 0.9rem; }
.plan-badge .pill { display: inline-block; padding: 6px 20px; border-radius: 6px; color: #BFBFBF; font-weight: 700; font-size: 0.9rem; }
.plan-intro { color: #808080; font-size: 0.9rem; margin: 0 25px 10px; }
.plan-carousel-ios { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    background: #101010; border-radius: 16px; margin: 0 8px; }
.plan-carousel-ios::-webkit-scrollbar { display: none; }
.plan-slide { flex: 0 0 100%; scroll-snap-align: start; padding: 28px 16px 46px; color: #BFBFBF; font-size: 0.95rem; }
.plan-box { position: relative; border: 2px solid var(--plan); border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.plan-label { position: absolute; top: -11px; right: 15px; background: #101010; padding: 0 8px; color: var(--plan);
    filter: brightness(1.3); font-size: 0.85rem; }
.feature { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; }
.feature.below { padding: 0 16px; }
.feature i { color: var(--plan); font-size: 0.8rem; margin-top: 3px; }
.plan-dots { display: flex; justify-content: center; gap: 12px; margin: -34px auto 14px; position: relative;
    width: max-content; padding: 6px 14px; background: rgba(60,60,60,0.8); border-radius: 20px; }
.plan-dots span { width: 8px; height: 8px; border-radius: 50%; background: #8E8E93; cursor: pointer; }
.plan-dots span.on { background: #fff; }
.plan-button { display: block; margin: 0 8px 10px; padding: 13px; border-radius: 10px; text-align: center; color: #BFBFBF;
    font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.main-header { position: relative; }
/* fit the phone width: no negative side margins; four level buttons on one row like iOS */
.ios-band, .show-hide, .preset-row, .adjust-band { margin-left: 0; margin-right: 0; }
.show-hide { margin-top: 10px; }
.level-controls { flex-wrap: nowrap; gap: 6px; padding-left: 0.8rem; padding-right: 0.8rem; }
.level-btn { flex: 0 1 auto; white-space: nowrap; padding: 20px 9px; font-size: clamp(0.8rem, 3.6vw, 1.05rem); }
.ios-band .section-header-title { font-size: 1.3rem; }
.bar-action { white-space: nowrap; padding: 20px 22px; }
.section-top { padding: 0 1.2rem; }
/* Bottom bar must fit a 375px phone like iOS: 2 squares + action with margins */
.ios-bar { box-sizing: border-box; left: 0; right: 0; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); gap: 10px; }
.ios-bar .bar-left > span { gap: 10px; }
.bar-square { width: 58px; height: 56px; font-size: 1.4rem; flex: 0 0 auto; }
.bar-action { padding: 18px 18px; font-size: 0.9rem; min-width: 0; max-width: 100%; transform-origin: right center; }
.bar-action i { margin-left: 8px; }

/* Login: device picker when the device limit is reached */
.device-picker .device-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border); }
.device-picker small { color: var(--gray-light); }
/* Bottom bar spans the whole screen edge to edge, like iOS (the page content stays max 800px wide). */
.ios-bar { max-width: none; width: auto; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; }
.plan-carousel-wrap { position: relative; }
.plan-carousel-ios { cursor: grab; user-select: none; }
.plan-carousel-ios.dragging { cursor: grabbing; scroll-snap-type: none; }
.plan-arrow { display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px;
    border: none; border-radius: 50%; background: rgba(60,60,60,0.85); color: #fff; cursor: pointer; }
.plan-arrow.prev { left: 14px; } .plan-arrow.next { right: 14px; }
@media (hover: hover) and (pointer: fine) { .plan-arrow { display: block; } }

/* --- HEADER MENU: three-line button on small screens --- */
.main-nav { display: inline; }
.menu-toggle { display: none; background: none; border: none; color: var(--gray-light); padding: 6px; margin-left: 0.5rem;
    cursor: pointer; line-height: 0; border-radius: 6px; }
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: rgba(255,255,255,0.08); color: #fff; }
@media (max-width: 768px) {
    .main-header { flex-direction: row !important; align-items: center !important; flex-wrap: wrap; gap: 0.5rem; }
    .main-header .logo-wrapper { margin-right: auto; }
    .main-header .user-greeting { display: none; }   /* no "Hello, name!" on small screens */
    .main-header .home { order: 1; margin-left: 0; }
    .menu-toggle { display: inline-block; order: 2; margin-left: 0; } /* right edge of the header */
    .main-nav { display: none; position: absolute; top: 100%; right: 0.625rem; z-index: 50; min-width: 180px;
        flex-direction: column; padding: 6px; background: #161616; border: 1px solid rgba(255,255,255,0.1);
        border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.6); }
    .main-nav.open { display: flex; }
    .main-nav .logout-link { margin: 0; padding: 12px 14px; border-radius: 6px; font-size: 1rem; }
    .main-nav .logout-link:hover { background: rgba(255,255,255,0.06); }
}

/* Option rows: divider line 2px lower, so it doesn't sit on the switches. */
.item-row { padding-bottom: calc(0.3rem + 2px); }

/* Skill level: the four buttons with the progress bar underneath, exactly as wide as the buttons. */
.level-group { display: inline-flex; flex-direction: column; max-width: 100%; }
.level-row { display: flex; gap: 6px; }
.level-bar { position: relative; height: 15px; margin-top: 8px; background: #101010; border-radius: 4px; overflow: hidden;
    display: flex; justify-content: space-between; align-items: center; padding: 0 6px;
    color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }
.level-bar span { position: relative; z-index: 1; }
.level-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--page-color);
    transition: width 1s ease-out 0.15s; }

/* Select Your Discipline: page-colour tab on the left that grows to the share of skills learned (iOS SkillFill). */
.custom-button .skill-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 30px; z-index: 1;
    background: var(--page-color-bright); opacity: 0.55; transition: width 1s ease-out 0.15s; }
.custom-button .skill-fill ~ .button-content { position: relative; z-index: 2; }

/* Home: "Return to last workout", plain (no picture) in the workout's colour (class HeavyBag etc.), above its button. */
/* NEW (the workout button) and a black RETURN side by side, when there is a last workout of that type */
.new-return-row { display: flex; gap: 2px; }   /* 2 px between the two halves of the original button */
.new-return-row > .button-link-wrapper { flex: 2 1 0; min-width: 0; }               /* RETURN 40 % */
.new-return-row > .button-link-wrapper:first-child { flex: 3 1 0; }                  /* NEW 60 % */
.new-return-row .custom-button { min-width: 0; border-radius: 0.625rem 0 0 0.625rem; }   /* only the outer corners round */
.return-button { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; height: 7rem;
    margin-bottom: 0.625rem; background: #000; color: var(--white); border-radius: 0 0.625rem 0.625rem 0; font-size: 20px; }
.return-button span { position: relative; z-index: 1; }
/* The workout picture runs across both halves: each is drawn as wide as the whole row (two halves + 8px gap),
   from the left edge on NEW and from the right edge on RETURN, so together they show the original button's picture. */
/* picture drawn as wide as the whole row: NEW is 60 % of it (100/60), RETURN 40 % (100/40) */
.new-return-row .custom-button .button-bg-image { width: 166.667%; }
.new-return-row .return-button .button-bg-image { width: 250%; left: auto; right: 0; }
.return-button:hover { filter: brightness(1.15); }


/* Header page links (Account, Membership, Stats, Logout) in white, in the row and in the small-screen menu. */
.main-nav .logout-link, .main-nav .logout-link.active { color: #fff !important; }

/* Header: logo on the left; greeting, Home icon and page links grouped together on the right. */
.main-header { justify-content: flex-start; gap: 0.75rem; }
.main-header .logo-wrapper { margin-right: auto; }
.main-header .logout-link.home { margin-left: 0; }

/* Stats: Today's three boxes spread across the whole width (the other periods keep six columns). */
.stats-grid.today-grid { grid-template-columns: repeat(3, 1fr) !important; }


/* ---- Workout Planner (home row + planner page) ---- */
.planner-row { display: flex; gap: 2px; margin: 0 0 15px; }   /* 2 px between Today's Workout and Planner */
.planner-row a { text-decoration: none; color: #fff; height: 7rem; display: flex; align-items: center; gap: 12px; overflow: hidden; }
.planner-row .today-btn { flex: 3 1 0; min-width: 0; padding: 0 8px 0 30px; border-radius: 0.625rem 0 0 0.625rem; }
.planner-row .today-btn span { display: flex; flex-direction: column; min-width: 0; }
.planner-row .today-btn b { font-weight: 400; font-size: 1.15rem; white-space: nowrap; }
.planner-row .today-btn small { opacity: .85; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planner-btn { flex: 1 1 100%; border-radius: 0.625rem; padding-left: 45px; }
.planner-btn.compact { flex: 2 1 0; min-width: 0; padding-left: 16px; border-radius: 0 0.625rem 0.625rem 0; }
.planner-btn i { font-size: 26px; color: #fff; width: 34px; text-align: center; }   /* red, same width as the dashboard icon */
.planner-btn span { display: flex; flex-direction: column; min-width: 0; }
.planner-btn b { font-family: sans-serif; font-weight: bold; font-size: 1.25rem; white-space: nowrap; }   /* same as .button-title */
#plannerSlot .planner-row { margin-bottom: 0.625rem; }   /* same gap as the dashboard button below */
.planner-btn small { color: var(--gray-vlight); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planner-row a:hover { filter: brightness(1.15); }
.planner { max-width: 760px; margin: 0 auto; padding-bottom: 60px; }
.planner-h1 { font-weight: 400; font-size: 1.9rem; color: #fff; margin: 20px 15px; }
.pl-card { background: var(--gray-deep); border-radius: 10px; padding: 16px; margin: 0 15px 15px; display: flex; flex-direction: column; gap: 10px; }
.pl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-name { color: #fff; font-size: 1.15rem; }
.pl-sub { color: var(--gray-vlight); font-size: .85rem; margin: 0; }
.pl-muted { color: var(--gray-light); font-size: .9rem; margin: 0; }
.pl-note { color: var(--gray-light); font-size: .75rem; margin: -6px 15px 15px; }
.pl-stop { background: #000; color: var(--gray-vlight); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.pl-banner { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: #000; color: #fff; }
.pl-banner.pl-go { cursor: pointer; }
.pl-banner-text { display: flex; flex-direction: column; flex: 1; }
.pl-banner-text b { font-weight: 400; }
.pl-banner-text span { color: #ddd; font-size: .85rem; }
.pl-banner i { font-size: 1.8rem; }
.pl-month span { color: #fff; font-size: 1.1rem; }
.pl-month button { background: none; border: 0; color: var(--gray-vlight); font-size: 1.2rem; cursor: pointer; padding: 6px 10px; }
.pl-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pl-wd { text-align: center; color: var(--gray-light); font-size: .75rem; }
.pl-day { background: none; border: 1px solid transparent; border-radius: 8px; color: #fff; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; padding: 4px 0; }
.pl-day.sel { background: #000; }
.pl-day.today { border-color: var(--gray-vlight); font-weight: 700; }
.pl-mark { height: 14px; display: flex; align-items: center; }
.pl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.pl-done { color: #199E70; font-size: .85rem; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--gray-light); font-size: .7rem; }
.pl-legend span { display: flex; align-items: center; gap: 4px; }
.pl-legend .pl-dot { width: 8px; height: 8px; }
.pl-program { margin-bottom: 10px; }
.pl-toggle { cursor: pointer; color: var(--gray-light); }
.pl-active { background: #199E70; color: #000; font-size: .65rem; font-weight: 700; border-radius: 4px; padding: 2px 6px; vertical-align: middle; }
.pl-tags { display: flex; gap: 6px; margin-top: 4px; }
.pl-tags span { font-size: .7rem; color: #fff; border-radius: 5px; padding: 3px 8px; }
.pl-dayrow { display: flex; align-items: center; gap: 8px; color: #fff; font-size: .9rem; }
.pl-wdname { width: 38px; color: var(--gray-light); font-size: .8rem; }
.pl-big { border: 0; border-radius: 10px; min-height: 48px; color: #fff; font-size: 1.05rem; cursor: pointer; width: 100%; }
.pl-big:disabled { opacity: .5; cursor: default; }
.pl-big.pl-saved { background: var(--gray-mid); }
.pl-own-day { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.pl-dname { color: #fff; }
.pl-type { border-radius: 8px; background: #000; }
.pl-type select, .pl-chips select { background: transparent; color: #fff; border: 0; padding: 8px 10px; font-size: .9rem; cursor: pointer; }
.pl-type select option, .pl-chips select option { background: #1c1c1e; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-chips select { background: #000; color: var(--gray-vlight); border-radius: 8px; font-size: .8rem; }

/* Brushed metal like the apps' page background (PLAN & TRACK buttons): a lighter diagonal band across the button. */
.sheen, .planner-btn { background: linear-gradient(135deg, #142D67 0%, #173373 15%, #204698 50%, #173373 85%, #142D67 100%) !important; }   /* deep blue + sheen */

.planner-home { position: fixed; left: 15px; bottom: 15px; z-index: 21; padding: 0 22px; height: 60px; }   /* planner Home, like the dashboard */
.planner-bar { position: fixed; left: 0; right: 0; bottom: 0; height: 90px; z-index: 20; background: #141414; }   /* bottom bar behind it */
.planner { padding-bottom: 100px; }
.timer-bar + .timer-row { margin-top: 16px; }   /* Home / Sounds clear of Preset Plans / Make My Own */

/* Big view (timer): only the time left, full screen while running */
.round-timer { position: relative; }
.big-btn { position: absolute; top: 8px; right: 16px; z-index: 5; width: 44px; height: 44px; border: none; border-radius: 12px;
    background: rgba(0,0,0,.6); color: #BFBFBF; font-size: 18px; cursor: pointer; }
.big-btn.on { color: #00E600; }
.big-view { position: fixed; inset: 0; z-index: 70; background: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.big-view.hidden { display: none; }
.big-view span { font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
/* Workout Planner + Training Dashboard (no plan): one sheen band across both (112 px buttons, 10 px apart) */
#plannerSlot .planner-btn { background-size: 100% 234px !important; background-position: 0 0 !important; }
#plannerSlot:not(.hidden) + a .stats-button { background-size: 100% 234px !important; background-position: 0 -122px !important; }
.return-button { background: linear-gradient(135deg, #050506 0%, #0c0c0d 15%, #222224 50%, #0c0c0d 85%, #050506 100%) !important; }   /* RETURN: black with a soft sheen */

/* Belt bar at the top of the home page: belt name over a thin bar in the belt's colour (the dim part = the way to the next belt). */
.belt-bar { display: block; text-decoration: none; margin: 10px 0 14px; }
.belt-bar .belt-text { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.belt-bar .belt-text b { color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.belt-bar .belt-text span { color: #BFBFBF; font-size: 11px; }
.belt-bar .belt-track { position: relative; height: 6px; border-radius: 3px; overflow: hidden;
    background: color-mix(in srgb, var(--belt) 30%, transparent); }
.belt-bar .belt-track.black { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6); } /* black on black */
.belt-bar .belt-fill { height: 100%; border-radius: 3px; background: var(--belt); }

/* Home SUBSCRIPTION card: as wide as the workout buttons (no side inset), with more room below it */
.plan-carousel-ios { margin-left: 0; margin-right: 0; }
.plan-button { margin-left: 0; margin-right: 0; margin-bottom: 30px; }

/* Home: the belt bar sits above the logo, with room below it */
.belt-bar.belt-top { margin: 12px 0 22px; }
