/* Gym-Planer – nutzt Karte, Kennzahl (.kpi), Liste (.list-group/.list-row) und Tabs aus komponenten.css */
.back-link {
    color: inherit;
    text-decoration: none;
}

.gym-column {
    display: grid;
    gap: 16px;
    max-width: 720px;
}

.gym-column > .card {
    margin: 0;
}

/* Personen-Umschalter (wie im Hub) */
.gym-person {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.gym-person-option {
    padding: 7px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.gym-person-option[aria-checked="true"] {
    background: var(--accent);
    color: var(--surface);
}

.gym-person-option:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.gym-big {
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    font-size: 16px;
}

/* Start-Ansicht */
.gym-today h2,
.gym-empty h2 {
    margin-bottom: 12px;
}

.gym-today .eyebrow {
    margin: 0 0 4px;
}

.gym-today-day + .gym-today-day {
    margin-top: 18px;
}

.gym-today-list {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.gym-today-list li,
.gym-history-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.gym-today-target,
.gym-history-sets {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.gym-empty {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.gym-free {
    justify-self: start;
}

.gym-row {
    width: 100%;
    padding: 9px 14px;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.gym-row:hover {
    background: var(--surface-soft);
}

.gym-row:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

.gym-row-text {
    display: grid;
    flex: 1;
    gap: 1px;
    min-width: 0;
}

.gym-row-text small {
    color: var(--muted);
    font-size: 13px;
}

.gym-chevron {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Laufendes Training */
.gym-session-head h2 {
    margin: 0;
}

.gym-session-head .hint {
    margin: 2px 0 0;
}

.gym-live {
    margin: 0 0 2px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gym-exercise {
    display: grid;
    gap: 8px;
}

.gym-exercise-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.gym-exercise-head h3 {
    margin: 0;
    font-size: 18px;
}

.gym-target {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.gym-hint {
    margin: 0;
    padding: 7px 10px;
    border-radius: 10px;
    background: var(--surface-soft);
    font-size: 13px;
}

.gym-hint.mehr_gewicht {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.gym-last {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.gym-sets {
    display: grid;
    gap: 6px;
}

.gym-set {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 12px;
    transition: background 0.15s;
}

.gym-set.done {
    background: var(--accent-soft);
}

.gym-set-no {
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

.gym-set-field {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.gym-set-field:focus-within {
    border-color: var(--accent);
}

.gym-set-field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}

.gym-set-field input:focus-visible {
    outline: none;
}

.gym-set-field input::-webkit-outer-spin-button,
.gym-set-field input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.gym-set-field span {
    color: var(--muted);
    font-size: 12px;
}

.gym-check {
    width: 44px;
    height: 44px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--surface);
    font: inherit;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
}

.gym-check[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent);
}

.gym-check:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.gym-exercise > .btn {
    justify-self: start;
}

.gym-extra {
    display: flex;
    gap: 8px;
}

.gym-finish {
    display: grid;
    gap: 10px;
}

.gym-finish textarea {
    margin: 0;
}

.gym-finish .danger {
    justify-self: center;
}

/* Plan */
.gym-day {
    display: grid;
    gap: 12px;
}

.gym-day-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gym-day-name {
    flex: 1;
    min-width: 0;
    padding: 4px 0;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
}

.gym-day-name:hover,
.gym-day-name:focus {
    border-bottom-color: var(--line);
}

.gym-weekdays {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gym-weekday {
    width: 40px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.gym-weekday.on {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--surface);
}

.gym-weekday:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.gym-add-exercise {
    justify-self: start;
}

.gym-form {
    display: grid;
    gap: 12px;
}

.gym-form .hint {
    margin: 0;
}

.gym-dialog-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.gym-dialog-actions .btn[hidden] + .btn {
    margin-left: auto;
}

/* Verlauf */
.gym-history {
    display: grid;
    gap: 8px;
}

.gym-history-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gym-history-head > div {
    display: grid;
    flex: 1;
}

.gym-history-head .hint {
    margin: 0;
}

.gym-volume {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.gym-history-list {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Statistik */
.gym-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.gym-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.gym-stat-grid > * {
    min-width: 0;
    margin: 0;
}

.gym-wide {
    grid-column: 1 / -1;
}

@media (max-width: 860px) {
    .gym-stat-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.gym-chart figcaption {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.gym-chart-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.gym-chart-head figcaption {
    margin: 0;
}

.gym-chart-head select {
    min-width: 0;
    max-width: 100%;
}

.gym-line {
    display: block;
    width: 100%;
    height: auto;
}

.gym-grid {
    stroke: var(--line);
    stroke-width: 1;
}

.gym-axis {
    fill: var(--muted);
    font-size: 11px;
}

.gym-path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.gym-dot {
    fill: var(--surface);
    stroke: var(--accent);
    stroke-width: 2;
}

.gym-dot.last {
    fill: var(--accent);
}

.gym-hit {
    fill: transparent;
    cursor: pointer;
}

.gym-record {
    padding: 9px 14px;
}

.gym-record-value {
    display: grid;
    justify-items: end;
    white-space: nowrap;
}

.gym-record-value small {
    color: var(--muted);
    font-size: 12px;
}

/* Dialog „Trainingstag anlegen“: gewählte Übungen + Katalog */
.gym-form .list-caption {
    margin: 4px 4px 0;
}

.gym-count {
    color: var(--accent);
    font-weight: 700;
}

.gym-picked-row {
    padding: 4px 6px 4px 14px;
}

.gym-catalog {
    display: grid;
    gap: 6px;
    max-height: 38vh;
    overflow-y: auto;
    padding-right: 4px;
}

.gym-catalog > .btn-add {
    justify-self: start;
}

.gym-catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gym-catalog-chip {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.gym-catalog-chip:hover {
    border-color: var(--accent);
}

.gym-catalog-chip.on {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--surface);
}

.gym-catalog-chip:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.gym-empty .btn {
    text-decoration: none;
}

/* Training nachtragen */
.gym-session-date {
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 14px;
}

.gym-history-add {
    justify-self: start;
}
