/* GymSi 0.9 · transparent provenance, compact source chips, explicit imports. */
/* Secondary text must remain readable on white and tinted light panels. */
:root:not([data-theme="dark"]){--muted:#526b80}
/* Exercise directions must follow the active theme, including the light modal. */
.instructions,.modal .field{color:var(--text)}
.modal .info-note{background:var(--panel-2);color:var(--text)}
/* Keep the map light and anatomical; colour and selection remain functional. */
.anatomy .body-base{stroke-width:.45}
.anatomy .muscle-zone{stroke-width:.45;stroke-linejoin:round}
.anatomy .body-midline{opacity:.3}
.anatomy .body-detail{opacity:.45}
.source-badges{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:5px;line-height:1.4}.source-badge,.source-lang,.source-count{display:inline-flex;align-items:center;padding:2px 7px;font-size:10px;font-weight:650;border-radius:6px;letter-spacing:.01em;line-height:1.4;background:var(--panel,#edf3f8);color:var(--muted,#536d83);border:1px solid var(--border,#b2c8db)}
.source-badge[data-source-badge="repdb-free"]{color:#215d7a;background:#e2f2fa;border-color:#b2dbea}.source-badge[data-source-badge="exercises-dataset-mit"]{color:#52529a;background:#efedff;border-color:#d5d2f0}.source-badge[data-source-badge="gymsi-user"]{color:#536623;background:#f1f5e9;border-color:#d7e3c1}.source-count{color:var(--text,#172c41)}
.source-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 14px;padding:12px 14px;border:1px solid var(--border,#b2c8db);border-radius:16px;background:var(--surface,#fff);font-size:13px}.source-summary small{display:block;font-size:11px;color:var(--muted,#536d83);margin-top:3px}.source-summary button{flex-shrink:0;font-size:12px;min-height:36px}
.source-detail{margin:16px 0;padding:14px;border:1px solid var(--border,#b2c8db);border-radius:18px;font-size:13px;line-height:1.5;background:var(--panel,#f1f7fb)}.source-detail p{margin:9px 0}.source-detail-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.source-rule-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.source-rule-grid>span{padding:10px;border-radius:10px;background:var(--surface,#fff);color:var(--muted,#536d83);font-size:11px}.source-rule-grid strong{display:block;font-size:13px;color:var(--text,#172c41);margin-top:3px}.source-manual-only,.source-note{border-left:3px solid #d79c49;padding-left:10px}.source-attribution{display:block;color:var(--accent,#086f91);font-size:12px;margin:12px 0 4px;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}.source-media-note{color:var(--muted,#536d83);font-size:12px}.source-illustration{margin:12px 0}.source-illustration img{width:100%;max-height:280px;object-fit:contain;border-radius:12px;background:#eee}.source-illustration figcaption{font-size:11px;color:var(--muted,#536d83);margin-top:7px}
.source-manager{font-size:14px;line-height:1.45}.source-hero{display:flex;gap:12px;align-items:center;padding:15px 0}.source-hero-icon{display:grid;place-items:center;border-radius:15px;width:52px;height:52px;flex-shrink:0;background:#e6f5fb;color:#086f91;font-size:30px}.source-hero h3{font-size:25px;margin:2px 0}.source-hero h3 small{font-size:12px;font-weight:500;color:var(--muted,#536d83)}.source-hero p{font-size:12px;color:var(--muted,#536d83);margin:0}.source-help{font-size:12px;color:var(--muted,#536d83);margin:0 0 16px}.source-options{border:1px solid var(--border,#b2c8db);border-radius:16px;padding:0 12px;margin-bottom:18px}.source-options>label{display:flex;align-items:center;justify-content:space-between;padding:12px 0;gap:14px}.source-options>label+label{border-top:1px solid var(--border,#b2c8db)}.source-options small{display:block;font-size:11px;color:var(--muted,#536d83);font-weight:400;margin-top:4px}.source-options input,.source-card input[type=checkbox]{width:20px;height:20px;flex-shrink:0;accent-color:#086f91}
.source-cards{display:grid;gap:12px}.source-card{padding:15px;border:1px solid var(--border,#b2c8db);border-radius:18px;background:var(--surface,#fff)}.source-card header{display:flex;align-items:center;justify-content:space-between}.source-card header label{padding:4px;display:flex;align-items:center;min-height:36px}.source-card h3{margin:4px 0 9px;font-size:17px}.source-card p{font-size:12px;color:var(--muted,#536d83);margin:9px 0}.source-status{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px}.source-status>strong{font-size:24px}.source-status>span{font-size:12px;color:var(--muted,#536d83)}.source-status>b{font-size:10px;padding:3px 6px;border-radius:5px;margin-left:auto;background:#f8edd9;color:#805613}.source-status>b.complete{background:#e2f3ea;color:#276448}.source-facts{display:flex;flex-wrap:wrap;gap:6px;font-size:11px;color:var(--muted,#536d83)}.source-facts span{background:var(--panel,#edf3f8);padding:3px 6px;border-radius:5px}.source-source-warning{border-top:1px solid var(--border,#b2c8db);padding-top:10px}.source-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.source-actions>.btn{font-size:12px;flex:1;min-height:40px;padding:8px 10px}.source-file{position:relative;overflow:hidden;cursor:pointer;text-align:center}.source-file input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.source-file.disabled{opacity:.5;pointer-events:none}.source-fetch-disclosure{font-size:10px!important}.source-card details{font-size:12px;border-top:1px solid var(--border,#b2c8db);padding-top:8px;margin-top:10px}.source-card summary{cursor:pointer;min-height:32px}.source-report{display:grid;grid-template-columns:1fr auto;gap:5px}.source-report dd{margin:0;font-variant-numeric:tabular-nums;font-weight:650}.source-report dt{color:var(--muted,#536d83)}.source-footnote{font-size:12px;margin:20px 0 6px}.source-footnote p{color:var(--muted,#536d83)}.source-error,.source-success,.source-cache-warning{font-size:12px;line-height:1.5;border:1px solid;border-radius:12px;padding:11px}.source-error{color:#9a3434;background:#fff0f0}.source-success{color:#28694c;background:#eaf9f0}.source-cache-warning{color:var(--muted,#536d83);border-color:var(--border,#b2c8db);margin-bottom:12px}.source-loading{display:flex;align-items:center;gap:9px;min-height:50px;font-size:12px}.source-loading span:nth-child(2){flex:1}.source-loading b{display:block;font-variant-numeric:tabular-nums}.source-spinner{width:18px;height:18px;border:2px solid var(--border,#b2c8db);border-top-color:#086f91;border-radius:50%;animation:source-spin 1s linear infinite}@keyframes source-spin{to{transform:rotate(360deg)}}
.discovery-sources{display:grid;grid-template-columns:1fr 1fr;gap:7px}.discovery-sources label{display:flex;align-items:center;gap:7px;min-height:42px;padding:8px;border:1px solid var(--border,#b2c8db);border-radius:10px;font-size:12px}.discovery-sources label.on{border-color:#086f91;background:#e6f5fb}.discovery-sources input{width:17px;height:17px;accent-color:#086f91}.discovery-sources label>span{flex:1;min-width:0}.discovery-sources small{display:block;font-size:10px;color:var(--muted,#536d83)}.discovery-sources label.disabled{opacity:.55}.discovery-sources b{font-size:12px;font-variant-numeric:tabular-nums}.source-filter-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0;font-size:12px}.source-filter-caption button{min-height:32px;font-size:12px}.source-hint{margin:4px 0 12px;font-size:11px;color:var(--muted,#536d83)}
[data-theme="dark"] .source-badge[data-source-badge="repdb-free"]{background:#173647;color:#9fd8f4;border-color:#315569}[data-theme="dark"] .source-badge[data-source-badge="exercises-dataset-mit"]{background:#302d48;color:#ceccfa;border-color:#474263}[data-theme="dark"] .source-badge[data-source-badge="gymsi-user"]{background:#303a25;color:#cbdba9;border-color:#4e5c3c}[data-theme="dark"] .source-card,[data-theme="dark"] .source-detail,[data-theme="dark"] .source-summary{background:#22272e;color:#edf4fb;border-color:#3a4857}[data-theme="dark"] .source-rule-grid>span{background:#19212a}[data-theme="dark"] .source-rule-grid strong{color:#eef5fb}[data-theme="dark"] .source-facts span,[data-theme="dark"] .source-lang,[data-theme="dark"] .source-count{background:#29333f;color:#bcd0e0;border-color:#3a4857}[data-theme="dark"] .discovery-sources label.on{background:#173647;color:#d6edfa}[data-theme="dark"] .source-error{background:#381f25;color:#ffc0c0}[data-theme="dark"] .source-success{background:#1b342d;color:#a9dfc6}
@media(prefers-reduced-motion:reduce){.source-spinner{animation:none}}
.source-options{margin-top:18px}.source-fetch-disclosure a{display:inline-block;color:var(--accent,#086f91);margin-bottom:6px;text-decoration:underline;text-underline-offset:2px}.source-card .source-actions .btn{white-space:normal}

/* Android review A3/A4: readable metadata and real, non-overlapping touch areas. */
.library-row{--catalog-secondary:#526b80}
[data-theme="dark"] .library-row{--catalog-secondary:#aec2d1}
.library-row .exercise-name small{font-size:12px;line-height:1.45;color:var(--catalog-secondary)}
.library-discovery .library-row .favourite.on,
.library-discovery .library-row .pill-button:not([aria-pressed="true"]):hover{background:var(--accent-dim);color:var(--accent)}
.library-discovery .library-row .favourite,.library-discovery .library-row .pill-button,
.node-actions .node-favourite,.node-actions .node-add,
.atlas-exercise-row .atlas-add,.atlas-exercise-row .atlas-train,
.session-card-head>.icon-btn{
 display:inline-flex;align-items:center;justify-content:center;
 width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;padding:8px;
 touch-action:manipulation;
}
.library-row .exercise-name,.session-exercise-name{min-width:0;overflow-wrap:anywhere}
.node-actions{gap:4px}
.session-card-head{gap:8px}
.sets-table .set-head,.sets-table .set-row{grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 44px;gap:8px}
.sets-table.with-rir .set-head,.sets-table.with-rir .set-row{grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 44px 44px;gap:6px}
.sets-table .set-number,.sets-table .set-check,.sets-table.with-rir .set-check{
 width:44px;height:44px;min-width:44px;min-height:44px;touch-action:manipulation;
}
.workout-mode-bar{flex-wrap:wrap;row-gap:8px}
.workout-mode-bar .compact-position{min-width:0;flex-wrap:wrap}
.workout-mode-bar .segmented{flex-shrink:0}
.workout-mode-bar .segmented>button,.workout-mode-bar .compact-position>button,
.exercise-view-tabs>button{
 min-width:44px;min-height:44px;height:auto;touch-action:manipulation;
}
@media(max-width:360px){
 .library-row{gap:6px}
 .sets-table .set-head,.sets-table .set-row{gap:6px}
 .sets-table.with-rir .set-row input{padding-inline:4px;font-size:17px}
 .workout-mode-bar .segmented{margin-left:auto}
}
