:root {
    --gym-gold:#e7bd55;
    --gym-gold-bright:#ffd978;
    --gym-ink:#080a0d;
    --gym-panel:#12161b;
    --gym-panel-2:#181d23;
    --gym-line:#2a3038;
    --gym-muted:#8f98a4;
    --gym-danger:#d85b5b;
    --gym-green:#61c78f;
}

* { box-sizing:border-box; }

body {
    background:
        radial-gradient(circle at 12% 8%, rgba(231,189,85,.08), transparent 25%),
        linear-gradient(180deg, #090b0e, #050608 65%);
    color:#f4f5f6;
}

.ec-gym-page {
    width:min(1500px, calc(100% - 40px));
    margin:32px auto 110px;
}

.ec-gym-hero {
    position:relative;
    overflow:hidden;
    min-height:230px;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:30px;
    padding:42px;
    border:1px solid #323942;
    border-radius:22px;
    background:
        linear-gradient(90deg, rgba(7,9,12,.98), rgba(7,9,12,.72)),
        repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.018) 14px 16px),
        #171b20;
    box-shadow:0 25px 70px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.04);
}

.ec-gym-hero::after {
    content:"";
    position:absolute;
    inset:auto -80px -170px auto;
    width:420px;
    height:420px;
    border:70px solid rgba(231,189,85,.045);
    border-radius:50%;
}

.ec-gym-hero h1 { margin:6px 0 12px; font-size:clamp(38px, 5vw, 72px); letter-spacing:-.045em; }
.ec-gym-hero p { max-width:720px; margin:0; color:#aeb5bd; font-size:17px; line-height:1.65; }
.ec-kicker { color:var(--gym-gold); font-size:11px; font-weight:900; letter-spacing:.22em; text-transform:uppercase; }

.ec-hero-gym {
    position:relative;
    z-index:1;
    min-width:310px;
    display:flex;
    align-items:center;
    gap:16px;
    padding:18px 20px;
    border:1px solid rgba(231,189,85,.35);
    border-radius:16px;
    background:rgba(8,10,13,.8);
    backdrop-filter:blur(10px);
}
.ec-hero-gym > span { font-size:34px; }
.ec-hero-gym small,.ec-hero-gym em { display:block; color:var(--gym-muted); font-style:normal; font-size:10px; letter-spacing:.12em; }
.ec-hero-gym strong { display:block; margin:3px 0; color:#fff; }

.ec-gym-resource-strip {
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
    margin:18px 0;
}
.ec-gym-resource-strip article {
    display:flex;
    gap:13px;
    align-items:center;
    min-height:94px;
    padding:16px;
    border:1px solid var(--gym-line);
    border-radius:15px;
    background:linear-gradient(180deg, #171b20, #11151a);
}
.ec-gym-resource-strip article > span { font-size:18px; display:grid; place-items:center; }.ec-gym-resource-strip .ec-resource-icon-image { width:24px; height:24px; }
.ec-gym-resource-strip small,.ec-gym-resource-strip em { display:block; color:var(--gym-muted); font-size:10px; font-style:normal; letter-spacing:.08em; }
.ec-gym-resource-strip strong { display:block; margin:4px 0; font-size:17px; }
.ec-mini-track,.ec-progress-track { height:6px; overflow:hidden; border-radius:99px; background:#080a0c; }
.ec-mini-track i,.ec-progress-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg, #b98f30, var(--gym-gold-bright)); box-shadow:0 0 14px rgba(231,189,85,.35); }

.ec-panel {
    margin-top:18px;
    padding:26px;
    border:1px solid var(--gym-line);
    border-radius:20px;
    background:linear-gradient(180deg, rgba(20,24,29,.98), rgba(13,16,20,.98));
    box-shadow:0 18px 50px rgba(0,0,0,.28);
}
.ec-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; }
.ec-panel-heading h2 { margin:4px 0 0; font-size:27px; }
.ec-battle-power { text-align:right; }
.ec-battle-power small { display:block; color:var(--gym-muted); font-size:10px; letter-spacing:.15em; }
.ec-battle-power strong { color:var(--gym-gold-bright); font-size:30px; }

.ec-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.ec-stat-card { padding:10px; border:1px solid #2b323a; border-radius:11px; background:#0e1216; }
.ec-stat-card header { display:flex; align-items:center; gap:6px; }
.ec-stat-card header > span { font-size:15px; }
.ec-stat-card-icon { width:24px; height:24px; display:grid; place-items:center; flex:0 0 24px; border-radius:7px; background:rgba(255,255,255,.035); overflow:hidden; }
.ec-stat-card-icon img { width:15px !important; height:15px !important; }
.ec-stat-card header small { display:block; color:var(--gym-muted); font-size:8px; letter-spacing:.1em; }
.ec-stat-card header strong { font-size:15px; }
.ec-stat-card p { min-height:0; color:#9da6b0; font-size:10.5px; line-height:1.45; }
.ec-progress-label { display:flex; justify-content:space-between; margin-bottom:3px; font-size:9px; color:var(--gym-muted); }
.ec-progress-label b { color:#dbe0e5; }
.ec-stat-card footer { display:flex; justify-content:space-between; gap:8px; margin-top:5px; color:#87909a; font-size:8.5px; }
.ec-stat-card footer span:last-child { text-align:right; color:var(--gym-gold); }

.ec-two-column { display:grid; grid-template-columns:1.3fr .7fr; gap:18px; }
.ec-gym-list,.ec-focus-list { display:grid; gap:10px; }
.ec-gym-option { position:relative; padding:16px; border:1px solid #293039; border-radius:15px; background:#0d1115; }
.ec-gym-option.active { border-color:var(--gym-gold); box-shadow:inset 3px 0 var(--gym-gold); }
.ec-gym-option.locked { opacity:.62; }
.ec-gym-tier { position:absolute; top:12px; right:12px; color:var(--gym-gold); font-size:11px; font-weight:900; }
.ec-gym-option-main { display:flex; gap:9px; padding-right:34px; }
.ec-gym-option-main > span { font-size:20px; }
.ec-gym-option-main strong,.ec-gym-option-main small { display:block; font-size:12.5px; }
.ec-gym-option-main small { color:var(--gym-muted); margin-top:1px; font-size:10.5px; }
.ec-gym-option-main p { margin:5px 0 0; color:#929ca6; font-size:10.5px; line-height:1.4; }
.ec-gym-multipliers { display:flex; gap:6px; margin:7px 0; }
.ec-gym-multipliers span { padding:4px 6px; border-radius:6px; background:#181d22; color:#b6bec7; font-size:9px; }
.ec-gym-option button,.ec-focus-option,.ec-train-row button,.ec-filter-row button {
    border:1px solid #3a424c;
    color:#e9edf1;
    background:#20262d;
    cursor:pointer;
    transition:.18s ease;
}
.ec-gym-option button { width:100%; padding:10px; border-radius:9px; font-weight:800; }
.ec-gym-option button:not(:disabled):hover,.ec-train-row button:not(:disabled):hover { border-color:var(--gym-gold); background:var(--gym-gold); color:#111; }
button:disabled { cursor:not-allowed; opacity:.55; }

.ec-focus-option { width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; padding:6px 8px; border-radius:8px; text-align:left; }
.ec-focus-option strong,.ec-focus-option small { display:block; font-size:11px; }
.ec-focus-option small { margin-top:1px; color:#929ba5; line-height:1.25; font-size:9.5px; }
.ec-focus-option em { color:var(--gym-muted); font-size:8px; font-style:normal; font-weight:900; }
.ec-focus-option.active { border-color:var(--gym-gold); background:rgba(231,189,85,.08); }
.ec-focus-option.active em { color:var(--gym-gold); }

.ec-exercise-heading { align-items:flex-end; }
.ec-filter-row { display:flex; flex-wrap:wrap; gap:7px; }
.ec-filter-row button { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 12px; border-radius:8px; }
.ec-filter-row button.active { border-color:var(--gym-gold); color:#17130b; background:var(--gym-gold); }
.ec-exercise-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.ec-exercise-card { display:flex; flex-direction:column; min-height:390px; padding:19px; border:1px solid #2b323a; border-radius:16px; background:#0d1115; transition:.2s ease; }
.ec-exercise-card:hover { transform:translateY(-3px); border-color:#4a535e; }
.ec-exercise-card.locked { opacity:.58; filter:saturate(.55); }
.ec-exercise-card header { display:grid; grid-template-columns:38px 1fr auto; gap:11px; align-items:center; }
.ec-exercise-card header > span { font-size:29px; }
.ec-exercise-card header small { color:var(--gym-gold); font-size:9px; letter-spacing:.13em; text-transform:uppercase; }
.ec-exercise-card h3 { margin:2px 0 0; }
.ec-exercise-card header > b { color:var(--gym-muted); font-size:11px; }
.ec-exercise-card > p { min-height:54px; color:#9aa3ad; line-height:1.5; font-size:13px; }
.ec-impact { padding:11px; border-left:2px solid var(--gym-gold); background:#151a20; }
.ec-impact strong,.ec-impact span { display:block; }
.ec-impact strong { color:var(--gym-gold); font-size:10px; text-transform:uppercase; letter-spacing:.12em; }
.ec-impact span { margin-top:5px; color:#b1b8c0; font-size:12px; line-height:1.4; }
.ec-exercise-numbers { display:grid; grid-template-columns:repeat(2,1fr); gap:7px; margin:14px 0; }
.ec-exercise-numbers span { padding:9px; border:1px solid #252c33; border-radius:8px; background:#12171c; }
.ec-exercise-numbers small,.ec-exercise-numbers b { display:block; }
.ec-exercise-numbers small { color:#7f8994; font-size:8px; letter-spacing:.1em; }
.ec-exercise-numbers b { margin-top:3px; font-size:12px; }
.ec-train-row { display:grid; grid-template-columns:minmax(64px,80px) auto minmax(80px,1fr); gap:8px; margin-top:auto; }
.ec-train-row input { min-width:0; padding:10px; border:1px solid #343c45; border-radius:9px; color:#fff; background:#090c0f; }
.ec-train-row button { padding:10px; border-radius:9px; font-weight:900; }
.ec-train-row .ec-max-train-button { border-color:rgba(231,189,85,.38); color:var(--gym-gold-bright); background:rgba(231,189,85,.08); white-space:nowrap; }

.ec-history { display:grid; gap:8px; }
.ec-history article { display:grid; grid-template-columns:35px 1fr auto auto auto; gap:12px; align-items:center; padding:12px 14px; border:1px solid #252c33; border-radius:11px; background:#0d1115; }
.ec-history article > span { font-size:22px; }
.ec-history strong,.ec-history small { display:block; }
.ec-history small { margin-top:3px; color:#77818c; }
.ec-history em { color:#9da6af; font-style:normal; }
.ec-history b { color:var(--gym-gold); }
.ec-history i { color:#8a949e; font-style:normal; font-size:11px; }
.ec-empty,.ec-error { padding:30px; text-align:center; color:var(--gym-muted); }

.ec-result-overlay { position:fixed; inset:0; z-index:200000; display:none; place-items:center; padding:20px; background:radial-gradient(circle at 50% 40%,rgba(30,26,15,.4),rgba(0,0,0,.85) 70%); backdrop-filter:blur(7px); }
.ec-result-overlay.open { display:grid; }
.ec-result-card {
    --stat-accent:var(--gym-gold);
    position:relative;
    overflow:hidden;
    width:min(560px,100%);
    padding:30px;
    border:1px solid color-mix(in srgb,var(--stat-accent) 55%,transparent);
    border-radius:20px;
    background:
        radial-gradient(circle at 15% 0%,color-mix(in srgb,var(--stat-accent) 14%,transparent),transparent 55%),
        radial-gradient(circle at 100% 100%,color-mix(in srgb,var(--stat-accent) 8%,transparent),transparent 60%),
        linear-gradient(180deg,#181d24,#0c0f13);
    box-shadow:0 40px 120px rgba(0,0,0,.7),inset 0 1px rgba(255,255,255,.06),0 0 60px -20px color-mix(in srgb,var(--stat-accent) 35%,transparent);
    text-align:center;
}
.ec-result-card[data-stat="strength"] { --stat-accent:#ef7a68; }
.ec-result-card[data-stat="defense"] { --stat-accent:#66aee1; }
.ec-result-card[data-stat="speed"] { --stat-accent:#6dd5b0; }
.ec-result-card[data-stat="accuracy"] { --stat-accent:#c39ae8; }
.ec-result-card > * { position:relative; z-index:1; }
.ec-result-close {
    position:absolute; right:10px; top:8px; z-index:2; display:grid; place-items:center; width:28px; height:28px;
    border:1px solid rgba(255,255,255,.12); border-radius:50%; color:#aaa; background:rgba(255,255,255,.04);
    font-size:18px; cursor:pointer; transition:.15s ease;
}
.ec-result-close:hover { color:#fff; border-color:rgba(255,255,255,.3); background:rgba(255,255,255,.1); }
.ec-result-icon-badge {
    display:grid; place-items:center; width:72px; height:72px; margin:0 auto; border-radius:50%;
    border:1px solid color-mix(in srgb,var(--stat-accent) 45%,transparent);
    background:linear-gradient(145deg,color-mix(in srgb,var(--stat-accent) 22%,transparent),rgba(5,7,9,.4));
    box-shadow:inset 0 1px color-mix(in srgb,var(--stat-accent) 30%,transparent),0 0 30px -6px color-mix(in srgb,var(--stat-accent) 55%,transparent);
}
.ec-result-icon-badge.is-exceptional { border-color:rgba(255,193,66,.6); box-shadow:inset 0 1px rgba(255,215,120,.35),0 0 40px -4px rgba(255,193,66,.65); animation:ecResultPulse 1.4s ease-in-out infinite; }
@keyframes ecResultPulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.06); } }
.ec-result-icon { display:block; font-size:34px; }
.ec-result-card .ec-kicker { display:block; margin-top:14px; }
.ec-result-card h2 { margin:7px 0 8px; text-shadow:0 4px 16px rgba(0,0,0,.5); }
.ec-result-card p { color:#adb5be; line-height:1.55; }
.ec-result-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:18px; }
.ec-result-stat {
    position:relative; overflow:hidden; padding:12px; border:1px solid #2b333c; border-radius:10px;
    background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.006)),#0c1014;
    box-shadow:inset 0 1px rgba(255,255,255,.04);
}
.ec-result-stat::after { content:""; position:absolute; inset:0 auto 0 0; width:2px; background:var(--metric-accent,var(--gym-gold)); opacity:.7; }
.ec-result-stat.is-progress,.ec-result-stat.is-points { --metric-accent:var(--gym-gold); }
.ec-result-stat.is-energy { --metric-accent:#f3d348; }
.ec-result-stat.is-momentum { --metric-accent:#4bc4dc; }
.ec-result-stat.is-fatigue { --metric-accent:#ef6a72; }
.ec-result-stat.is-exceptional { --metric-accent:#87909a; }
.ec-result-stat.is-exceptional.has-value { --metric-accent:#ffc142; box-shadow:inset 0 1px rgba(255,255,255,.06),0 0 16px -4px rgba(255,193,66,.5); }
.ec-result-grid small,.ec-result-grid strong { display:block; }
.ec-result-grid small { color:#7d8792; font-size:8px; letter-spacing:.12em; }
.ec-result-grid strong { margin-top:5px; color:var(--gym-gold-bright); font-size:15px; }
.ec-result-stat.is-exceptional.has-value strong { color:#ffc142; text-shadow:0 0 12px rgba(255,193,66,.6); }
.ec-result-extras { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin-top:14px; }
.ec-result-pill {
    padding:5px 10px; border:1px solid rgba(128,203,162,.35); border-radius:999px;
    background:linear-gradient(145deg,rgba(128,203,162,.14),rgba(128,203,162,.03));
    color:#9fe0bd; font-size:10.5px; font-weight:700;
}
.ec-injury-result {
    margin-top:14px; padding:9px 12px; border:1px solid rgba(233,139,139,.4); border-radius:10px;
    background:linear-gradient(145deg,rgba(233,139,139,.14),rgba(233,139,139,.03));
    color:#ffb3b3; font-size:11.5px; font-weight:700;
}
.ec-training-busy .ec-train-row button { pointer-events:none; opacity:.55; }

@media (max-width:1180px) {
    .ec-gym-resource-strip { grid-template-columns:repeat(3,1fr); }
    .ec-stat-grid,.ec-exercise-grid { grid-template-columns:repeat(2,1fr); }
    .ec-two-column { grid-template-columns:1fr; }
}

@media (max-width:720px) {
    .ec-gym-page { width:min(100% - 20px,1500px); margin-top:16px; }
    .ec-gym-hero { min-height:0; padding:24px; flex-direction:column; align-items:stretch; }
    .ec-hero-gym { min-width:0; }
    .ec-gym-resource-strip,.ec-stat-grid,.ec-exercise-grid { grid-template-columns:1fr; }
    .ec-panel { padding:18px; }
    .ec-panel-heading,.ec-exercise-heading { align-items:flex-start; flex-direction:column; }
    .ec-history article { grid-template-columns:30px 1fr auto; }
    .ec-history article b,.ec-history article i { grid-column:2 / -1; }
    .ec-result-grid { grid-template-columns:repeat(2,1fr); }
}
.ec-gym-route{display:flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;border:1px solid rgba(70,167,255,.38);border-radius:10px;background:rgba(70,167,255,.09);color:#9ed1ff;font-weight:800;text-decoration:none}.ec-gym-route:hover{background:rgba(70,167,255,.16)}.ec-gym-location{border-color:rgba(70,167,255,.28)!important}

/* Stat-specific training bonuses */
.ec-active-gym-boost {
    grid-column: span 2;
}
.ec-stat-boost-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    margin-top: .4rem;
}
.ec-stat-boost {
    display: grid;
    gap: .1rem;
    padding: .4rem .5rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: .55rem;
    background: rgba(0,0,0,.18);
}
.ec-stat-boost b { display:flex; align-items:center; gap:.36rem; font-size: .7rem; }
.ec-stat-boost small { opacity: .72; line-height: 1.3; font-size: .64rem; }
@media (max-width: 700px) {
    .ec-active-gym-boost { grid-column: span 1; }
    .ec-stat-boost-list { grid-template-columns: 1fr; }
}

/* Compact exercise cards while retaining all exercise information */
.ec-exercise-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.ec-exercise-card{min-height:315px;padding:13px;border-radius:13px}.ec-exercise-card header{grid-template-columns:31px 1fr auto;gap:8px}.ec-exercise-card header>span{font-size:23px}.ec-exercise-card h3{font-size:15px}.ec-exercise-card>p{min-height:42px;margin:10px 0;font-size:10px;line-height:1.4}.ec-impact{padding:8px;font-size:10px}.ec-exercise-numbers{gap:5px;margin:9px 0}.ec-exercise-numbers span{padding:6px}.ec-exercise-numbers b{font-size:10px}@media(max-width:1320px){.ec-exercise-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.ec-exercise-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:590px){.ec-exercise-grid{grid-template-columns:1fr}}

/* Compact Gym access cards */
.ec-gym-list { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.ec-gym-option { padding:12px; border-radius:13px; }
.ec-gym-tier { top:9px; right:9px; font-size:10px; }
.ec-gym-option-main { gap:10px; padding-right:32px; }
.ec-gym-option-main > span { font-size:23px; }
.ec-gym-option-main strong { font-size:.94rem; }
.ec-gym-option-main small { font-size:.72rem; }
.ec-gym-option-main p { margin-top:5px; font-size:11px; line-height:1.35; }
.ec-gym-multipliers { gap:5px; margin:8px 0; flex-wrap:wrap; }
.ec-gym-multipliers span { padding:4px 6px; font-size:9px; }
.ec-gym-option button { padding:8px; font-size:.78rem; }
@media(max-width:760px){.ec-gym-list{grid-template-columns:1fr}}


/* Balanced two-row resource dashboard: four resources above boost + location. */
.ec-gym-resource-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
}
.ec-gym-resource-strip article {
    min-width: 0;
    height: 100%;
}
.ec-gym-resource-strip article > div { min-width: 0; }
.ec-active-gym-boost { grid-column: span 1 !important; }
.ec-stat-boost-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
    .ec-gym-resource-strip { grid-template-columns: 1fr; }
    .ec-active-gym-boost { grid-column: span 2 !important; }
    .ec-gym-location { grid-column: span 2; }
    .ec-stat-boost-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .ec-gym-resource-strip { grid-template-columns: 1fr; }
    .ec-active-gym-boost,
    .ec-gym-location { grid-column: span 1 !important; }
    .ec-stat-boost-list { grid-template-columns: 1fr; }
}


/* Combat-stat change animation */
.ec-stat-card--changed{animation:ecStatCardPulse .9s ease both}
.ec-stat-card header strong{position:relative;display:inline-flex;align-items:center;gap:7px}
.ec-stat-delta{display:inline-flex;padding:2px 6px;border-radius:999px;color:#9bf0b6;background:rgba(65,210,116,.12);font-size:.66rem;font-style:normal;font-weight:900;animation:ecStatDelta .95s ease both}
@keyframes ecStatCardPulse{0%{border-color:inherit}38%{border-color:rgba(105,226,145,.62);box-shadow:0 0 0 3px rgba(105,226,145,.08)}100%{border-color:inherit;box-shadow:none}}
@keyframes ecStatDelta{0%{opacity:0;transform:translateY(8px)}35%{opacity:1;transform:translateY(-2px)}100%{opacity:0;transform:translateY(-10px)}}
@media(prefers-reduced-motion:reduce){.ec-stat-card--changed,.ec-stat-delta{animation:none}}

/* Temporary caffeine combat penalty */
.ec-caffeine-penalty{margin-top:5px;color:#ff6b78;font-size:.72rem;font-weight:850;letter-spacing:.01em}.ec-caffeine-penalty[hidden]{display:none}.ec-stat-temporary-loss{display:inline-flex;margin-left:5px;color:#ff6674;font-size:.72em;font-style:normal;font-weight:900}

/* Denser exercise catalogue. Battle impact is no longer shown on exercise cards. */
.ec-exercise-grid{gap:8px}
.ec-exercise-card{min-height:270px;padding:11px;border-radius:12px}
.ec-exercise-card>p{min-height:34px;margin:8px 0;font-size:9.5px}
.ec-exercise-numbers{margin:7px 0}

/* =====================================================
   TRAINING NETWORK VISUAL OVERHAUL
   ===================================================== */
:root {
    --gym-gold:#e8b84d;
    --gym-gold-bright:#ffdb75;
    --gym-panel:#11161c;
    --gym-panel-2:#171d24;
    --gym-line:rgba(173,190,207,.16);
    --gym-muted:#98a5b3;
    --gym-steel:#9bb1c5;
}

body {
    background:
        radial-gradient(circle at 8% 1%,rgba(232,184,77,.095),transparent 25rem),
        radial-gradient(circle at 92% 24%,rgba(66,136,187,.055),transparent 30rem),
        linear-gradient(180deg,#080b0f 0,#06080b 48%,#040507 100%);
}

.ec-gym-page {
    width:min(1480px,calc(100% - 24px));
    margin:14px auto 50px;
}

.ec-gym-hero {
    isolation:isolate;
    min-height:120px;
    align-items:center;
    padding:16px 22px;
    border-color:rgba(232,184,77,.27);
    border-radius:16px;
    background:
        linear-gradient(105deg,rgba(5,8,11,.98) 0%,rgba(8,12,16,.93) 48%,rgba(13,17,21,.72) 100%),
        repeating-linear-gradient(118deg,transparent 0 19px,rgba(255,255,255,.018) 19px 20px),
        #11161c;
    box-shadow:0 26px 70px rgba(0,0,0,.5),inset 0 1px rgba(255,255,255,.055);
}
.ec-gym-hero::before {
    content:"";
    position:absolute;
    z-index:-1;
    inset:-28% 3% -32% auto;
    width:min(44vw,520px);
    background:url("../images/city-navigation/gym.webp") center/58% auto no-repeat;
    opacity:.08;
    filter:drop-shadow(0 0 45px rgba(105,200,255,.52));
    transform:rotate(-7deg);
}
.ec-gym-hero::after {
    z-index:-1;
    inset:auto -8% -145px 42%;
    width:70%;
    height:230px;
    border:0;
    border-radius:50%;
    background:radial-gradient(ellipse,rgba(232,184,77,.13),transparent 68%);
    transform:rotate(-7deg);
}
.ec-gym-hero-copy { position:relative; z-index:1; max-width:760px; }
.ec-gym-hero h1 {
    margin:3px 0 5px;
    font-size:clamp(22px,3vw,32px);
    line-height:1.05;
    letter-spacing:-.03em;
    text-shadow:0 8px 20px rgba(0,0,0,.65);
}
.ec-gym-hero p { max-width:680px; color:#b4bec8; font-size:12.5px; line-height:1.4; }
.ec-gym-hero-points { display:flex; flex-wrap:wrap; gap:5px 12px; margin-top:9px; }
.ec-gym-hero-points span { display:inline-flex; align-items:center; gap:6px; color:#c6cdd4; font-size:10px; font-weight:750; }
.ec-gym-hero-points span::before { content:""; width:5px; height:5px; border-radius:50%; background:var(--gym-gold); box-shadow:0 0 10px rgba(232,184,77,.7); }
.ec-kicker { color:var(--gym-gold-bright); letter-spacing:.2em; }

.ec-hero-gym {
    min-width:min(100%,260px);
    gap:10px;
    padding:9px 11px;
    border-color:rgba(232,184,77,.32);
    border-radius:12px;
    background:linear-gradient(145deg,rgba(18,23,29,.93),rgba(7,10,13,.88));
    box-shadow:0 18px 45px rgba(0,0,0,.38),inset 0 1px rgba(255,255,255,.05);
}
.ec-hero-gym-icon {
    width:34px;
    height:34px;
    flex:0 0 34px;
    display:grid;
    place-items:center;
    border:1px solid rgba(232,184,77,.29);
    border-radius:10px;
    background:rgba(232,184,77,.075);
    font-size:17px!important;
}
.ec-hero-gym > div { min-width:0; flex:1; }
.ec-hero-gym > i { color:var(--gym-gold); font-size:14px; font-style:normal; opacity:.7; }
.ec-hero-gym small { color:var(--gym-gold); font-weight:850; font-size:9px; }
.ec-hero-gym strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.ec-hero-gym em { overflow:hidden; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }

.ec-gym-resource-strip { gap:7px; margin:6px 0; }
.ec-gym-resource-strip article {
    position:relative;
    overflow:hidden;
    min-height:0;
    padding:7px 8px;
    border-color:var(--gym-line);
    border-radius:11px;
    background:linear-gradient(145deg,rgba(22,28,35,.96),rgba(12,16,21,.96));
    box-shadow:0 12px 30px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.035);
    transition:transform .18s ease,border-color .18s ease;
}
.ec-gym-resource-strip article::after { content:""; position:absolute; inset:auto 0 0; height:2px; background:var(--resource-accent,var(--gym-gold)); opacity:.62; }
.ec-gym-resource-strip article:hover { transform:translateY(-2px); border-color:rgba(232,184,77,.26); }
.ec-gym-resource-strip article > span { width:28px; height:28px; flex:0 0 28px; border-radius:9px; background:rgba(255,255,255,.045); }
.ec-gym-resource--energy { --resource-accent:#f3d348; }
.ec-gym-resource--momentum { --resource-accent:#4bc4dc; }
.ec-gym-resource--fatigue { --resource-accent:#ef6a72; }
.ec-gym-resource--focus { --resource-accent:#b691f0; }
.ec-gym-location { --resource-accent:#5aa9e4; }
.ec-active-gym-boost { --resource-accent:#72d69b; }
.ec-gym-resource-strip strong { color:#f4f7fa; font-size:13px; }
.ec-gym-resource-strip small { color:#8694a3; font-weight:800; font-size:9px; }
.ec-mini-track { margin-top:5px; background:rgba(0,0,0,.52); }

.ec-panel {
    position:relative;
    overflow:hidden;
    margin-top:6px;
    padding:9px 11px;
    border-color:var(--gym-line);
    border-radius:12px;
    background:
        radial-gradient(circle at 100% 0%,color-mix(in srgb,var(--panel-accent,var(--gym-gold)) 10%,transparent),transparent 55%),
        linear-gradient(152deg,rgba(18,23,29,.98),rgba(10,13,17,.98));
    box-shadow:0 18px 48px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.045),inset 0 0 0 1px rgba(255,255,255,.02);
}
.ec-panel::before { content:""; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg,var(--panel-accent,var(--gym-gold)),transparent 55%); opacity:.8; box-shadow:0 0 12px 0 color-mix(in srgb,var(--panel-accent,var(--gym-gold)) 55%,transparent); }
.ec-panel::after { content:""; position:absolute; z-index:0; right:-70px; bottom:-90px; width:200px; height:200px; border-radius:50%; background:radial-gradient(circle,color-mix(in srgb,var(--panel-accent,var(--gym-gold)) 10%,transparent),transparent 70%); pointer-events:none; }
.ec-panel > * { position:relative; z-index:1; }
.ec-panel--disciplines { --panel-accent:#70bce6; }
.ec-panel--exercises { --panel-accent:#e8b84d; }
.ec-panel--facilities { --panel-accent:#80cf9f; }
.ec-panel--focus { --panel-accent:#b895e7; }
.ec-panel--history { --panel-accent:#7c94a8; }
.ec-panel-heading { margin-bottom:6px; }
.ec-panel-heading h2 { margin-top:1px; color:#f3f6f8; font-size:14px; letter-spacing:-.02em; text-shadow:0 2px 8px rgba(0,0,0,.4); }
.ec-battle-power { min-width:95px; padding:5px 8px; border:1px solid rgba(232,184,77,.28); border-radius:9px; background:linear-gradient(145deg,rgba(232,184,77,.12),rgba(232,184,77,.02)); box-shadow:inset 0 1px rgba(255,255,255,.06),0 4px 14px rgba(232,184,77,.08); }
.ec-battle-power strong { display:block; margin-top:1px; font-size:15px; line-height:1; text-shadow:0 0 16px rgba(255,217,120,.45); }

.ec-stat-grid { gap:6px; }
.ec-stat-card {
    --stat-accent:#72bce6;
    position:relative;
    overflow:hidden;
    padding:7px;
    border-color:rgba(255,255,255,.11);
    border-radius:9px;
    background:
        radial-gradient(circle at 6% 0%,color-mix(in srgb,var(--stat-accent) 13%,transparent),transparent 42%),
        linear-gradient(145deg,rgba(19,24,30,.97),rgba(8,11,15,.97));
    box-shadow:inset 0 1px rgba(255,255,255,.04),0 8px 20px rgba(0,0,0,.18);
    transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.ec-stat-card::after { content:""; position:absolute; inset:0 auto 0 0; width:2px; background:linear-gradient(180deg,transparent,var(--stat-accent) 25%,var(--stat-accent) 75%,transparent); opacity:.85; box-shadow:0 0 10px color-mix(in srgb,var(--stat-accent) 60%,transparent); }
.ec-stat-card:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--stat-accent) 42%,transparent); box-shadow:inset 0 1px rgba(255,255,255,.05),0 15px 35px rgba(0,0,0,.32),0 0 0 1px color-mix(in srgb,var(--stat-accent) 18%,transparent); }
.ec-stat-strength { --stat-accent:#ef7a68; }
.ec-stat-defense { --stat-accent:#66aee1; }
.ec-stat-speed { --stat-accent:#6dd5b0; }
.ec-stat-accuracy { --stat-accent:#c39ae8; }
.ec-stat-card-icon { background:linear-gradient(145deg,color-mix(in srgb,var(--stat-accent) 22%,transparent),color-mix(in srgb,var(--stat-accent) 4%,transparent)); border:1px solid color-mix(in srgb,var(--stat-accent) 32%,transparent); box-shadow:inset 0 1px color-mix(in srgb,var(--stat-accent) 30%,transparent),0 2px 8px rgba(0,0,0,.25); }
.ec-stat-card header strong { color:#f8fafb; font-size:15px; text-shadow:0 2px 10px rgba(0,0,0,.5); }
.ec-stat-card p { min-height:0; margin:4px 0; color:#9ca8b4; font-size:10px; }
.ec-progress-track { height:4px; border:1px solid rgba(255,255,255,.03); background:#05070a; box-shadow:inset 0 1px 3px rgba(0,0,0,.5); }
.ec-stat-card .ec-progress-track i { background:linear-gradient(90deg,color-mix(in srgb,var(--stat-accent) 72%,#111),var(--stat-accent)); box-shadow:0 0 13px color-mix(in srgb,var(--stat-accent) 34%,transparent); }

.ec-filter-row { padding:5px; border:1px solid rgba(255,255,255,.08); border-radius:12px; background:rgba(0,0,0,.18); }
.ec-filter-row button { min-height:34px; padding:7px 11px; border-color:transparent; border-radius:8px; background:transparent; color:#9da8b3; font-size:11px; font-weight:750; }
.ec-filter-row button:hover { color:#fff; background:rgba(255,255,255,.055); }
.ec-filter-row button.active { border-color:rgba(232,184,77,.72); background:linear-gradient(135deg,#f0c55c,#dca737); color:#171108; box-shadow:0 5px 14px rgba(232,184,77,.18); }

.ec-exercise-grid { gap:9px; }
.ec-exercise-card {
    --stat-accent:var(--gym-gold);
    position:relative;
    overflow:hidden;
    min-height:284px;
    padding:13px;
    border-color:rgba(255,255,255,.11);
    border-radius:15px;
    background:linear-gradient(155deg,rgba(18,23,29,.98),rgba(8,11,15,.98));
    box-shadow:inset 0 1px rgba(255,255,255,.03);
}
.ec-exercise-card[data-stat="strength"] { --stat-accent:#ef7a68; }
.ec-exercise-card[data-stat="defense"] { --stat-accent:#66aee1; }
.ec-exercise-card[data-stat="speed"] { --stat-accent:#6dd5b0; }
.ec-exercise-card[data-stat="accuracy"] { --stat-accent:#c39ae8; }
.ec-exercise-card::before { content:""; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg,var(--stat-accent),transparent 66%); opacity:.62; }
.ec-exercise-card:hover { border-color:color-mix(in srgb,var(--stat-accent) 36%,transparent); box-shadow:0 17px 34px rgba(0,0,0,.28); }
.ec-exercise-card header > span { width:34px; height:34px; display:grid; place-items:center; border:1px solid color-mix(in srgb,var(--stat-accent) 24%,transparent); border-radius:10px; background:color-mix(in srgb,var(--stat-accent) 9%,transparent); }
.ec-exercise-card header small { color:var(--stat-accent); font-weight:850; }
.ec-exercise-card h3 { color:#f2f5f7; }
.ec-exercise-card header > b { padding:3px 6px; border-radius:6px; background:rgba(255,255,255,.04); }
.ec-exercise-card > p { color:#9ba7b3; }
.ec-exercise-numbers span { border-color:rgba(255,255,255,.085); border-radius:9px; background:rgba(255,255,255,.025); }
.ec-exercise-numbers small { color:#7f8d9b; }
.ec-exercise-numbers b { color:#dfe4e8; }
.ec-train-row { grid-template-columns:minmax(54px,72px) auto minmax(72px,1fr); gap:6px; }
.ec-train-row input { min-height:39px; border-color:rgba(255,255,255,.15); border-radius:9px; background:#070a0d; text-align:center; font-weight:800; }
.ec-train-row button { min-height:39px; border-radius:9px; }
.ec-train-row button:last-child:not(:disabled) { border-color:color-mix(in srgb,var(--stat-accent) 45%,transparent); background:color-mix(in srgb,var(--stat-accent) 10%,#151a20); color:#f1f4f6; }
.ec-train-row button:last-child:not(:disabled):hover { border-color:var(--stat-accent); background:var(--stat-accent); color:#080a0c; }
.ec-train-row--locked { align-items:start; }
.ec-train-row--locked > * { height:40px; min-height:40px; }
.ec-train-row--locked button:last-child { overflow:hidden; padding:5px 7px; font-size:10px; line-height:1.15; }

.ec-two-column { grid-template-columns:1.2fr .8fr; gap:8px; }
.ec-two-column--single { grid-template-columns:1fr; }
.ec-gym-list { gap:6px; }
.ec-gym-option {
    overflow:hidden;
    padding:9px;
    border-color:rgba(255,255,255,.1);
    border-radius:11px;
    background:linear-gradient(145deg,rgba(15,20,25,.96),rgba(8,11,14,.96));
    transition:transform .18s ease,border-color .18s ease;
}
.ec-gym-option:hover { transform:translateY(-2px); border-color:rgba(232,184,77,.25); }
.ec-gym-option.active { border-color:rgba(232,184,77,.55); background:linear-gradient(145deg,rgba(41,34,18,.72),rgba(10,12,14,.98)); box-shadow:inset 3px 0 var(--gym-gold),0 10px 24px rgba(0,0,0,.2); }
.ec-gym-tier { padding:2px 6px; border:1px solid rgba(232,184,77,.22); border-radius:6px; background:rgba(232,184,77,.07); font-size:10px; }
.ec-gym-option-main > span { width:26px; height:26px; display:grid; place-items:center; flex:0 0 26px; border-radius:8px; background:rgba(255,255,255,.045); font-size:16px; }
.ec-gym-multipliers span { border:1px solid rgba(255,255,255,.065); background:rgba(255,255,255,.03); }
.ec-gym-option button,.ec-gym-route { min-height:30px; padding:6px; border-radius:8px; background:rgba(255,255,255,.045); font-size:11.5px; }

.ec-focus-list { gap:5px; }
.ec-focus-option { position:relative; overflow:hidden; min-height:0; padding:6px 8px; border-color:rgba(255,255,255,.1); background:linear-gradient(145deg,rgba(17,22,28,.96),rgba(9,12,16,.96)); }
.ec-focus-option::before { content:""; position:absolute; inset:6px auto 6px 0; width:2px; border-radius:2px; background:var(--gym-gold); opacity:0; }
.ec-focus-option:hover:not(:disabled) { border-color:rgba(232,184,77,.28); background:rgba(232,184,77,.055); }
.ec-focus-option.active { border-color:rgba(232,184,77,.4); background:linear-gradient(100deg,rgba(232,184,77,.11),rgba(232,184,77,.025)); }
.ec-focus-option.active::before { opacity:1; }
.ec-focus-option em { padding:2px 5px; border-radius:5px; background:rgba(255,255,255,.04); font-size:8px; }

.ec-history { gap:5px; }
.ec-history article { min-height:0; padding:7px 9px; border-color:rgba(255,255,255,.085); border-radius:9px; background:rgba(8,11,15,.72); transition:background .15s ease,border-color .15s ease; }
.ec-history article:hover { border-color:rgba(232,184,77,.18); background:rgba(232,184,77,.025); }
.ec-history article > span { width:26px; height:26px; display:grid; place-items:center; border-radius:8px; background:rgba(255,255,255,.04); }

.ec-result-overlay.open .ec-result-card { animation:ecGymResultIn .24s ease both; }
.ec-result-card { border-radius:23px; }
.ec-result-card::before { content:""; position:absolute; z-index:1; inset:0 0 auto; height:2px; background:linear-gradient(90deg,transparent,var(--stat-accent),transparent); opacity:.85; }
@keyframes ecGymResultIn { from { opacity:0; transform:translateY(12px) scale(.97); } to { opacity:1; transform:none; } }

@media (max-width:1180px) {
    .ec-gym-hero { min-height:245px; }
    .ec-two-column { grid-template-columns:1fr; }
}

@media (max-width:760px) {
    .ec-gym-page { width:min(100% - 18px,1480px); margin-top:12px; }
    .ec-gym-hero { min-height:0; align-items:stretch; gap:26px; padding:27px 21px; border-radius:20px; }
    .ec-gym-hero::before { inset:0 -12% 18% auto; width:70%; background-size:74% auto; }
    .ec-gym-hero h1 { font-size:clamp(38px,13vw,56px); }
    .ec-gym-hero p { font-size:13px; }
    .ec-gym-hero-points { gap:7px 13px; margin-top:17px; }
    .ec-gym-hero-points span { font-size:9px; }
    .ec-hero-gym { min-width:0; }
    .ec-panel { padding:17px 14px; border-radius:17px; }
    .ec-panel-heading { gap:12px; }
    .ec-battle-power { width:100%; text-align:left; }
    .ec-filter-row { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .ec-filter-row button:first-child { grid-column:1/-1; }
    .ec-exercise-card { min-height:278px; }
    .ec-history article { grid-template-columns:34px minmax(0,1fr) auto; gap:9px; }
}

@media (max-width:440px) {
    .ec-gym-resource-strip { grid-template-columns:1fr; }
    .ec-stat-grid,.ec-exercise-grid,.ec-gym-list { grid-template-columns:1fr; }
    .ec-train-row { grid-template-columns:58px 1fr; }
    .ec-train-row button:last-child { grid-column:1/-1; }
    .ec-result-card { padding:25px 16px 20px; }
}

@media (prefers-reduced-motion:reduce) {
    .ec-gym-resource-strip article,.ec-stat-card,.ec-exercise-card,.ec-gym-option,.ec-result-card { animation:none!important; transition:none!important; }
}

/* Dense exercise workspace: filter sidebar + data table + detail panel */
.ec-exercise-workspace {
    display:grid;
    grid-template-columns:168px minmax(0,1fr) 260px;
    gap:12px;
    align-items:start;
}

.ec-exercise-detail-column { display:flex; flex-direction:column; gap:8px; min-width:0; }
.ec-focus-panel { margin-top:0; padding:10px; }
.ec-focus-panel .ec-panel-heading { margin-bottom:7px; }
.ec-focus-panel .ec-panel-heading h2 { font-size:13px; }
.ec-focus-panel .ec-kicker { font-size:9px; }

.ec-exercise-sidebar-column { display:flex; flex-direction:column; gap:8px; min-width:0; }
.ec-gym-quick-panel {
    padding:8px;
    border:1px solid var(--gym-line);
    border-radius:14px;
    background:linear-gradient(165deg,rgba(255,255,255,.035),rgba(255,255,255,.006)),linear-gradient(152deg,rgba(15,19,24,.98),rgba(8,10,13,.98));
    box-shadow:inset 0 1px rgba(255,255,255,.04),0 10px 26px rgba(0,0,0,.22);
}
.ec-gym-quick-panel__label {
    display:block;
    margin:2px 0 7px 2px;
    color:#7f8994;
    font-size:9px;
    font-weight:900;
    letter-spacing:.1em;
    text-transform:uppercase;
}
.ec-gym-quick-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; }
.ec-gym-quick-tile {
    position:relative;
    display:grid;
    place-items:center;
    aspect-ratio:1;
    min-width:0;
    min-height:0;
    overflow:hidden;
    padding:0;
    border:1px solid rgba(255,255,255,.1);
    border-radius:8px;
    background:linear-gradient(145deg,rgba(255,255,255,.06),rgba(255,255,255,.008));
    box-shadow:inset 0 1px rgba(255,255,255,.05),0 2px 6px rgba(0,0,0,.2);
    font-size:13px;
    line-height:1;
    cursor:pointer;
    transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.ec-gym-quick-tile span { display:block; line-height:1; }
.ec-gym-quick-tile:hover { transform:translateY(-2px); border-color:rgba(232,184,77,.45); box-shadow:inset 0 1px rgba(255,255,255,.06),0 8px 18px rgba(0,0,0,.35); }
.ec-gym-quick-tile.active { border-color:var(--gym-gold); background:linear-gradient(145deg,rgba(232,184,77,.26),rgba(232,184,77,.05)); box-shadow:inset 0 1px rgba(255,255,255,.08),inset 0 0 0 1px rgba(232,184,77,.3),0 0 14px rgba(232,184,77,.2); }
.ec-gym-quick-tile.owned:not(.active) { border-color:rgba(114,190,150,.4); }
.ec-gym-quick-tile.locked { opacity:.45; filter:saturate(.5); }
.ec-gym-quick-tile.is-open { border-color:#fff; box-shadow:inset 0 1px rgba(255,255,255,.08),0 0 0 1px rgba(255,255,255,.3); }

.ec-gym-quick-info {
    margin-top:8px;
    padding-top:8px;
    border-top:1px solid var(--gym-line);
    animation:ecGymQuickInfoIn .15s ease both;
}
@keyframes ecGymQuickInfoIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.ec-gym-quick-info__head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.ec-gym-quick-info__head span { font-size:18px; }
.ec-gym-quick-info__head strong { display:block; font-size:12px; color:#f2f5f7; }
.ec-gym-quick-info__head small { display:block; margin-top:1px; color:#828d97; font-size:9.5px; }
.ec-gym-quick-info p { margin:0 0 7px; color:#9ba7b3; font-size:10.5px; line-height:1.4; }
.ec-gym-quick-info__stats { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
.ec-gym-quick-info__stats span { padding:3px 6px; border-radius:6px; background:rgba(255,255,255,.05); color:#b6bec7; font-size:9px; }
.ec-gym-quick-info button,.ec-gym-quick-info a.ec-gym-route {
    display:flex; align-items:center; justify-content:center; width:100%; min-height:30px; padding:6px;
    border:1px solid rgba(232,184,77,.35); border-radius:8px; background:rgba(232,184,77,.1); color:var(--gym-gold-bright);
    font-size:11px; font-weight:800; text-decoration:none; cursor:pointer;
}
.ec-gym-quick-info button:hover:not(:disabled),.ec-gym-quick-info a.ec-gym-route:hover { border-color:var(--gym-gold); background:var(--gym-gold); color:#111; }
.ec-gym-quick-info button:disabled { opacity:.5; cursor:not-allowed; }

.ec-exercise-sidebar {
    display:flex;
    flex-direction:column;
    gap:5px;
    padding:8px;
    border:1px solid var(--gym-line);
    border-radius:14px;
    background:linear-gradient(165deg,rgba(255,255,255,.035),rgba(255,255,255,.006)),linear-gradient(152deg,rgba(15,19,24,.98),rgba(8,10,13,.98));
    box-shadow:inset 0 1px rgba(255,255,255,.04),0 10px 26px rgba(0,0,0,.22);
}
.ec-exercise-sidebar button {
    display:flex;
    align-items:center;
    gap:7px;
    min-height:28px;
    padding:6px 8px;
    border:1px solid transparent;
    border-left:2px solid transparent;
    border-radius:8px;
    background:transparent;
    color:#9da8b3;
    font-size:11px;
    font-weight:750;
    text-align:left;
    cursor:pointer;
    transition:.16s ease;
}
.ec-exercise-sidebar button img { width:14px; height:14px; opacity:.85; }
.ec-exercise-sidebar button svg { width:13px; height:13px; }
.ec-exercise-sidebar button:hover { color:#fff; background:rgba(255,255,255,.05); }
.ec-exercise-sidebar button.active {
    border-color:rgba(232,184,77,.32);
    border-left-color:var(--gym-gold);
    background:linear-gradient(135deg,rgba(240,197,92,.16),rgba(240,197,92,.04));
    color:var(--gym-gold-bright);
    box-shadow:inset 0 1px rgba(255,255,255,.05),0 0 12px rgba(232,184,77,.12);
}

.ec-exercise-table-wrap {
    min-width:0;
    border:1px solid var(--gym-line);
    border-radius:14px;
    overflow:hidden;
    background:linear-gradient(152deg,rgba(15,19,24,.98),rgba(8,10,13,.98));
    box-shadow:inset 0 1px rgba(255,255,255,.04),inset 0 0 0 1px rgba(255,255,255,.02),0 16px 38px rgba(0,0,0,.32);
}
.ec-exercise-table-head {
    position:sticky;
    top:0;
    z-index:2;
    display:grid;
    grid-template-columns:minmax(0,1.9fr) 82px 1.1fr 82px 100px 118px;
    gap:6px;
    padding:7px 10px;
    border-bottom:1px solid var(--gym-line);
    background:linear-gradient(180deg,#1a1f26,#12161b);
    box-shadow:0 4px 12px rgba(0,0,0,.3);
    color:#7f8994;
    font-size:9px;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
}
.ec-exercise-table-head .col-qty,.ec-exercise-table-head .col-action { text-align:center; }
.ec-exercise-table { max-height:600px; overflow-y:auto; }
.ec-exercise-table-rows { display:flex; flex-direction:column; }
.ec-exercise-row {
    --stat-accent:var(--gym-gold);
    position:relative;
    display:grid;
    flex:0 0 auto;
    grid-template-columns:minmax(0,1.9fr) 82px 1.1fr 82px 100px 118px;
    gap:6px;
    align-items:center;
    min-height:0;
    padding:6px 10px;
    border-bottom:1px solid rgba(255,255,255,.05);
    border-left:3px solid transparent;
    background:rgba(255,255,255,.008);
    cursor:pointer;
    transition:background .15s ease,border-color .15s ease;
}
.ec-exercise-row:nth-child(even) { background:rgba(255,255,255,.016); }
.ec-exercise-row:hover { background:color-mix(in srgb,var(--stat-accent) 7%,rgba(255,255,255,.02)); }
.ec-exercise-row.is-selected {
    border-left-color:var(--stat-accent);
    background:linear-gradient(90deg,color-mix(in srgb,var(--stat-accent) 15%,transparent),color-mix(in srgb,var(--stat-accent) 3%,transparent) 60%);
    box-shadow:inset 0 1px rgba(255,255,255,.06),0 4px 16px rgba(0,0,0,.28),inset 3px 0 8px -4px color-mix(in srgb,var(--stat-accent) 60%,transparent);
}
.ec-exercise-row.locked { opacity:.5; filter:saturate(.6); cursor:default; }
.ec-exercise-row[data-stat="strength"] { --stat-accent:#ef7a68; }
.ec-exercise-row[data-stat="defense"] { --stat-accent:#66aee1; }
.ec-exercise-row[data-stat="speed"] { --stat-accent:#6dd5b0; }
.ec-exercise-row[data-stat="accuracy"] { --stat-accent:#c39ae8; }
.ec-exercise-row__name { display:flex; align-items:center; gap:8px; min-width:0; }
.ec-exercise-row__name > div { display:flex; flex-direction:column; gap:1px; min-width:0; }
.ec-exercise-row__icon {
    display:grid; place-items:center; flex:0 0 auto; width:26px; height:26px;
    border:1px solid color-mix(in srgb,var(--stat-accent) 34%,transparent); border-radius:8px;
    background:linear-gradient(145deg,color-mix(in srgb,var(--stat-accent) 22%,transparent),rgba(5,7,9,.45));
    box-shadow:inset 0 1px color-mix(in srgb,var(--stat-accent) 26%,transparent),0 3px 8px rgba(0,0,0,.3),0 0 10px -3px color-mix(in srgb,var(--stat-accent) 45%,transparent);
    font-size:13px;
}
.ec-exercise-row__name strong { display:block; overflow:hidden; color:#f2f5f7; font-size:12px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.ec-exercise-row__name small { display:block; overflow:hidden; color:#828d97; font-size:9.5px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.ec-type-tag {
    display:inline-flex; align-items:center; padding:3px 7px; border-radius:999px;
    border:1px solid color-mix(in srgb,var(--stat-accent) 50%,transparent);
    background:linear-gradient(145deg,color-mix(in srgb,var(--stat-accent) 18%,rgba(0,0,0,.3)),color-mix(in srgb,var(--stat-accent) 6%,rgba(0,0,0,.3)));
    box-shadow:inset 0 1px color-mix(in srgb,var(--stat-accent) 25%,transparent);
    color:var(--stat-accent); font-size:9.5px; font-weight:900; letter-spacing:.03em; text-transform:uppercase; white-space:nowrap;
}
.ec-type-tag--strength { --stat-accent:#ef7a68; }
.ec-type-tag--defense { --stat-accent:#66aee1; }
.ec-type-tag--speed { --stat-accent:#6dd5b0; }
.ec-type-tag--accuracy { --stat-accent:#c39ae8; }
.ec-exercise-row__effect { overflow:hidden; color:#c3cbd2; font-size:11.5px; text-overflow:ellipsis; white-space:nowrap; }
.ec-exercise-row__gain { color:var(--gym-gold-bright); font-size:12px; font-weight:800; font-variant-numeric:tabular-nums; text-shadow:0 0 12px rgba(255,217,120,.35); }
.ec-exercise-row__qty { display:flex; align-items:center; justify-content:center; gap:3px; }
.ec-exercise-row__qty input {
    width:28px; min-height:22px; padding:0 2px; border:1px solid rgba(255,255,255,.15); border-radius:6px;
    background:#070a0d; color:#fff; font-size:10.5px; font-weight:800; text-align:center;
    -moz-appearance:textfield;
}
.ec-exercise-row__qty input::-webkit-outer-spin-button,
.ec-exercise-row__qty input::-webkit-inner-spin-button {
    -webkit-appearance:none; margin:0;
}
.ec-qty-btn {
    display:grid; place-items:center; width:19px; height:19px; padding:0; border:1px solid rgba(255,255,255,.14);
    border-radius:5px; background:rgba(255,255,255,.04); color:#c3cbd2; font-size:12px; font-weight:900; line-height:1; cursor:pointer;
}
.ec-qty-btn:hover:not(:disabled) { border-color:var(--stat-accent); color:var(--stat-accent); }
.ec-qty-btn:disabled { opacity:.4; cursor:not-allowed; }
.ec-exercise-row__action { display:flex; align-items:center; justify-content:center; gap:5px; }
.ec-exercise-row__action button {
    min-height:22px; padding:0 7px; border-radius:6px; font-size:9.5px; font-weight:900; letter-spacing:.02em; cursor:pointer;
}
.ec-exercise-row__action .ec-max-train-button { border:1px solid rgba(232,184,77,.4); background:linear-gradient(145deg,rgba(232,184,77,.16),rgba(232,184,77,.04)); color:var(--gym-gold-bright); box-shadow:inset 0 1px rgba(255,255,255,.08); }
.ec-exercise-row__action .ec-max-train-button:hover:not(:disabled) { border-color:var(--gym-gold); background:rgba(232,184,77,.22); box-shadow:0 0 12px rgba(232,184,77,.25); }
.ec-exercise-row__action .ec-train-button {
    border:1px solid color-mix(in srgb,var(--stat-accent) 50%,transparent);
    background:linear-gradient(145deg,color-mix(in srgb,var(--stat-accent) 20%,#151a20),color-mix(in srgb,var(--stat-accent) 6%,#151a20)); color:#f1f4f6;
    box-shadow:inset 0 1px rgba(255,255,255,.06);
}
.ec-exercise-row__action .ec-train-button:hover:not(:disabled) { border-color:var(--stat-accent); background:var(--stat-accent); color:#080a0c; box-shadow:0 0 14px color-mix(in srgb,var(--stat-accent) 45%,transparent); }
.ec-exercise-row__action button:disabled { opacity:.45; cursor:not-allowed; }

.ec-exercise-detail {
    --stat-accent:var(--gym-gold);
    position:relative;
    overflow:hidden;
    padding:10px;
    border:1px solid var(--gym-line);
    border-left:3px solid color-mix(in srgb,var(--stat-accent) 55%,transparent);
    border-radius:12px;
    background:linear-gradient(165deg,rgba(255,255,255,.035),rgba(255,255,255,.006)),linear-gradient(152deg,rgba(15,19,24,.98),rgba(8,10,13,.98));
    box-shadow:inset 0 1px rgba(255,255,255,.05),0 14px 34px rgba(0,0,0,.32);
    transition:border-color .2s ease;
}
.ec-exercise-detail::after { content:""; position:absolute; z-index:0; right:-50px; top:-60px; width:150px; height:150px; border-radius:50%; background:radial-gradient(circle,color-mix(in srgb,var(--stat-accent) 12%,transparent),transparent 70%); pointer-events:none; }
.ec-exercise-detail > * { position:relative; z-index:1; }
.ec-exercise-detail[data-stat="strength"] { --stat-accent:#ef7a68; }
.ec-exercise-detail[data-stat="defense"] { --stat-accent:#66aee1; }
.ec-exercise-detail[data-stat="speed"] { --stat-accent:#6dd5b0; }
.ec-exercise-detail[data-stat="accuracy"] { --stat-accent:#c39ae8; }
.ec-exercise-detail__head { display:flex; align-items:center; gap:9px; margin-bottom:7px; }
.ec-exercise-detail__icon {
    display:grid; place-items:center; flex:0 0 auto; width:34px; height:34px; border-radius:10px;
    border:1px solid color-mix(in srgb,var(--stat-accent) 35%,transparent);
    background:linear-gradient(145deg,color-mix(in srgb,var(--stat-accent) 20%,transparent),rgba(5,7,9,.4));
    box-shadow:inset 0 1px color-mix(in srgb,var(--stat-accent) 25%,transparent),0 3px 10px rgba(0,0,0,.3);
    font-size:17px;
}
.ec-exercise-detail__head h3 { margin:0 0 4px; color:#f3f6f8; font-size:13px; text-shadow:0 2px 8px rgba(0,0,0,.5); }
.ec-exercise-detail__description { margin:0 0 8px; color:#9ba7b3; font-size:10.5px; line-height:1.45; }
.ec-exercise-detail__stats { display:grid; gap:4px; margin:0; }
.ec-exercise-detail__stats > div {
    display:flex; justify-content:space-between; gap:8px; padding:5px 7px; border-radius:7px;
    background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.01)); border:1px solid rgba(255,255,255,.07);
    box-shadow:inset 0 1px rgba(255,255,255,.04);
}
.ec-exercise-detail__stats dt { color:#7f8994; font-size:9px; letter-spacing:.05em; text-transform:uppercase; }
.ec-exercise-detail__stats dd { margin:0; color:#eef1f3; font-size:10.5px; font-weight:700; text-align:right; }

@media (max-width:1150px) {
    .ec-exercise-workspace { grid-template-columns:150px minmax(0,1fr); }
    .ec-exercise-detail-column { grid-column:1/-1; }
    .ec-exercise-detail-column { flex-direction:row; align-items:start; }
    .ec-exercise-detail-column > * { flex:1 1 0; min-width:0; }
}
@media (max-width:860px) {
    .ec-exercise-workspace { grid-template-columns:1fr; }
    .ec-exercise-sidebar { flex-direction:row; flex-wrap:wrap; }
    .ec-exercise-sidebar button { flex:1 1 auto; justify-content:center; }
    .ec-exercise-detail-column { flex-direction:column; }
    .ec-exercise-detail-column > * { flex:0 0 auto; width:100%; }
    .ec-exercise-table-head { display:none; }
    .ec-exercise-row {
        grid-template-columns:auto 1fr;
        grid-template-areas:
            "name name"
            "type effect"
            "qty action";
        gap:4px 10px;
        padding:8px 10px;
    }
    .ec-exercise-row__name { grid-area:name; }
    .ec-exercise-row__type { grid-area:type; justify-self:start; }
    .ec-exercise-row__effect { grid-area:effect; justify-self:end; text-align:right; }
    .ec-exercise-row__gain { display:none; }
    .ec-exercise-row__qty { grid-area:qty; justify-content:flex-start; justify-self:start; }
    .ec-exercise-row__action { grid-area:action; justify-content:flex-end; justify-self:end; }
    .ec-exercise-row__name strong,.ec-exercise-row__name small { white-space:normal; }
    .ec-exercise-row__qty input {
        width:34px; min-height:34px; padding:0 2px !important; font-size:16px !important;
    }
}

/* Gym training network visual revision: 2026-09-13-v2 */
