.auth-maintenance-notice {
    width: 100%;
    min-width: 0;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-left: 4px solid #a34e24;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.auth-maintenance-notice[hidden] {
    display: none;
}

.auth-maintenance-notice strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.auth-maintenance-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.drift-monitor-panel .drift-monitor-login-control {
    display: grid;
    grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.drift-monitor-panel .drift-monitor-login-summary {
    min-width: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.drift-monitor-panel {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
}

.drift-monitor-panel .drift-monitor-toolbar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.drift-monitor-panel label {
    display: grid;
    gap: 5px;
    min-width: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.drift-monitor-panel .drift-monitor-toggle {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
    margin-right: auto;
}

.drift-monitor-panel input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex: 0 0 20px;
}

.drift-monitor-panel button,
.drift-monitor-panel select {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0;
    border-radius: 4px;
}

.drift-monitor-panel .drift-monitor-refresh {
    width: 44px;
    flex: 0 0 44px;
    font-size: 22px;
}

.drift-monitor-panel .drift-monitor-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 16px 0;
}

.drift-monitor-panel .drift-monitor-check {
    min-width: 0;
    padding: 12px 0;
    border-top: 2px solid var(--line);
    overflow-wrap: anywhere;
}

.drift-monitor-panel .drift-monitor-check[data-overdue="true"] {
    border-top-color: #b84931;
}

.drift-monitor-panel h4 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.4;
}

.drift-monitor-panel dl {
    display: grid;
    grid-template-columns: minmax(90px, 0.6fr) minmax(0, 1fr);
    gap: 6px 12px;
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.4;
}

.drift-monitor-panel dt,
.drift-monitor-panel dd {
    margin: 0;
}

.drift-monitor-panel .drift-monitor-configuration,
.drift-monitor-panel .drift-monitor-summary,
.drift-monitor-panel .drift-monitor-message {
    margin: 8px 0;
    min-height: 20px;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .drift-monitor-panel .drift-monitor-login-control {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .drift-monitor-panel .drift-monitor-checks {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .drift-monitor-panel .drift-monitor-toggle {
        width: 100%;
    }

    .drift-monitor-panel .drift-monitor-toolbar label:not(.drift-monitor-toggle) {
        flex: 1 1 140px;
    }
}

.user-settings-panel {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
}

.user-settings-panel .user-settings-filters {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(160px, 220px);
    gap: 12px;
    margin-bottom: 16px;
}

.user-settings-panel label {
    display: grid;
    min-width: 0;
    gap: 5px;
    font-size: 13px;
    line-height: 1.4;
}

.user-settings-panel label input,
.user-settings-panel label select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.user-settings-panel .user-settings-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(300px, 1.2fr);
    align-items: start;
    gap: 24px;
}

.user-settings-panel .user-settings-list {
    display: grid;
    max-height: 520px;
    overflow-y: auto;
    min-width: 0;
}

.user-settings-panel .user-settings-account {
    display: grid;
    width: 100%;
    min-height: 76px;
    gap: 3px;
    margin: 0;
    padding: 10px 12px;
    text-align: left;
    font: inherit;
    overflow-wrap: anywhere;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.user-settings-panel .user-settings-account:hover,
.user-settings-panel .user-settings-account[aria-pressed="true"] {
    background: var(--surface-muted);
}

.user-settings-panel .user-settings-account span {
    font-size: 12px;
    line-height: 1.4;
}

.user-settings-panel .user-settings-account-status {
    color: var(--muted);
}

.user-settings-panel .user-settings-form {
    display: grid;
    min-width: 0;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.user-settings-panel .user-settings-form[hidden] {
    display: none;
}

.user-settings-panel .user-settings-form h4 {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.user-settings-panel .user-settings-meta,
.user-settings-panel .user-settings-status {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.user-settings-panel .user-settings-passwords {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.user-settings-panel .user-settings-save {
    justify-self: start;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.4;
}

.user-settings-panel .user-settings-status {
    margin-top: 14px;
    min-height: 20px;
}

@media (max-width: 760px) {

    .user-settings-panel .user-settings-filters,
    .user-settings-panel .user-settings-layout,
    .user-settings-panel .user-settings-passwords {
        grid-template-columns: minmax(0, 1fr);
    }

    .user-settings-panel .user-settings-layout {
        gap: 16px;
    }

    .user-settings-panel .user-settings-list {
        max-height: 240px;
    }
}

html {
    box-sizing: border-box;
}

body {
    background: #121212;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.logo {
    height: 90px;
    width: auto;
}

.logo-home {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.logo-home:hover,
.logo-home:focus-visible {
    background: transparent;
    outline: none;
}

.header-countdown {
    display: none;
}

@media (min-width: 761px) {
    .header-countdown {
        display: grid;
        flex: 0 0 auto;
        align-content: center;
        gap: 1px;
        width: 320px;
        max-height: 88px;
        margin-left: 19px;
        padding: 5px 8px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: var(--surface-muted);
        color: var(--ink);
        font: 10px/1.2 Arial, sans-serif;
    }

    .header-countdown strong {
        color: var(--nav);
        font-size: 11px;
        line-height: 1.2;
    }

    .header-countdown span {
        white-space: nowrap;
    }

    .header-countdown-line {
        display: flex;
        align-items: baseline;
        width: 100%;
        overflow: hidden;
        color: var(--ink);
        font: inherit;
        text-align: left;
        white-space: nowrap;
    }

    .header-countdown-activity {
        min-width: 0;
        overflow: hidden;
        margin-left: 4px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--teal);
        font: inherit;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
        cursor: pointer;
    }

    .header-countdown-activity:hover,
    .header-countdown-activity:focus-visible {
        color: var(--teal);
        text-decoration: underline;
        outline: none;
    }

    .header-countdown-line>span:last-child {
        margin-left: 4px;
    }

    .header-countdown-empty {
        color: var(--muted);
        font-style: italic;
    }
}

@media print {
    .header-countdown {
        display: none !important;
    }
}

.jss-logo {
    height: 60px;
    width: auto;
}

.club-website-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.club-website-link img {
    display: block;
    height: 100%;
    width: auto;
    object-fit: contain;
}

.club-website-link:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

.title-block {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.title-block h1 {
    display: inline-block;
    text-align: left;
}

.subtitle {
    color: #888;
    font-size: 14px;
    margin-top: 5px;
}

h1 {
    margin: 0;
    color: #4da3ff;
}

.app-version-mark {
    display: inline-block;
    margin-left: 5px;
    color: #8aa8b0;
    font: 600 10px/1 Arial, sans-serif;
    letter-spacing: 0;
    vertical-align: super;
}

.subtitle {
    color: #888;
    font-size: 14px;
    margin-top: 5px;
}

.container {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.question-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-left: auto;
}

input {
    flex: 1 1 260px;
    min-width: 0;
    padding: 12px;
    background: #1e1e1e;
    color: white;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 16px;
}

button {
    padding: 12px 20px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background: #1565c0;
}

.manual-link {
    padding: 12px 20px;
    color: #e0e0e0;
    background: #444;
    border-radius: 6px;
    text-decoration: none;
}

.manual-link:hover {
    background: #555;
}

pre {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.answer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.answer-header h2 {
    margin: 0;
}

.answer-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
}

.answer-action {
    padding: 8px 12px;
    background: #444;
    font-size: 14px;
}

.answer-action:hover {
    background: #555;
}

.answer-status {
    min-height: 1.3em;
    color: #aaa;
    font-size: 13px;
    margin-top: -8px;
    text-align: right;
}

.answer-status[data-success="true"],
.graph-status[data-success="true"],
.graph-chart-status[data-success="true"] {
    color: #0f766e !important;
}

.answer-status[data-error="true"],
.graph-status[data-error="true"],
.graph-chart-status[data-error="true"] {
    color: #b91c1c !important;
}

.answer-source {
    min-height: 1.2em;
    color: #888;
    font-size: 12px;
    margin-top: -8px;
    text-align: right;
}

#result.is-loading {
    color: transparent;
    min-height: 1.55em;
    position: relative;
}

#result.is-loading::before {
    color: #aaa;
    content: attr(data-loading-label);
}

#result.is-loading::after {
    animation: answer-loading-dots 1.2s steps(1, end) infinite;
    color: #aaa;
    content: ".";
}

@keyframes answer-loading-dots {

    0%,
    24% {
        content: ".";
    }

    25%,
    49% {
        content: "..";
    }

    50%,
    74% {
        content: "...";
    }

    75%,
    100% {
        content: ".";
    }
}

.result-line {
    min-height: 1.35em;
}

.command-example {
    display: inline-block;
    margin: 2px 0;
    padding: 3px 7px;
    background: #26384d;
    color: #eaf3ff;
    border: 1px solid #3f638d;
    border-radius: 5px;
    font: inherit;
    text-align: left;
}

.qualification-time-editor {
    overflow: hidden;
}

.qualification-time-editor>p {
    max-width: 900px;
}

.qualification-time-tabs {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    gap: 8px;
    margin: 16px 0;
}

.qualification-time-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: stretch;
}

.qualification-time-action-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    height: 68px;
    margin-top: 16px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-muted);
    font-size: 12px !important;
}

.qualification-time-action-box.is-tree-mode {
    height: 68px;
}

.qualification-time-action-box .qualification-import-header,
.qualification-time-action-box .qualification-time-tree-toggle {
    font-size: 12px !important;
}

.qualification-import-header {
    display: flex;
    align-items: center;
    height: 32px;
    gap: 10px;
    color: var(--muted);
    font-weight: 700;
}

.qualification-import-header .qualification-import-menu-wrap {
    order: 0;
    margin-left: 0;
    align-self: center;
    position: relative;
    top: 0;
}

.qualification-time-card-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.qualification-time-card {
    display: grid;
    gap: 3px;
    min-width: 131px;
    min-height: 68px;
    border: 1px solid #48637c;
    border-radius: 7px;
    background: #26384d;
    color: #eaf3ff;
    text-align: left;
    cursor: pointer;
}

.qualification-time-card span {
    color: #b7c8d8;
    font-size: 12px;
    font-weight: normal;
}

.qualification-time-card.is-active,
.qualification-time-card:hover {
    background: #147d76;
    border-color: #147d76;
}

.qualification-time-tab {
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid #48637c;
    border-radius: 5px;
    background: #26384d;
    color: #eaf3ff;
    font-weight: 700;
    cursor: pointer;
}

.qualification-time-tab.is-active,
.qualification-time-tab:hover {
    background: #147d76;
    border-color: #147d76;
}

.qualification-import-menu-wrap {
    position: relative;
    display: inline-flex;
}

.qualification-import-menu-button {
    width: 32px;
    height: 32px;
    color: #9d352a;
}

.qualification-import-menu {
    top: 38px;
    right: 0;
    min-width: 190px;
}

.qualification-import-action,
.qualification-import-action:hover,
.qualification-import-action:disabled {
    color: #9d352a !important;
}

.qualification-import-action:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.qualification-time-view-toggle {
    display: inline-flex;
    margin: 0 0 14px;
    border: 1px solid #48637c;
    border-radius: 5px;
    overflow: hidden;
}

.qualification-time-tree-toggle,
.qualification-time-grouping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.qualification-time-action-box .qualification-time-tree-toggle,
.qualification-time-action-box .qualification-import-header,
.qualification-time-action-box .qualification-time-grouping {
    justify-content: flex-start;
}

.qualification-time-action-box .qualification-time-grouping {
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
}

.qualification-time-action-box .qualification-time-grouping select {
    max-width: 190px;
    min-height: 32px;
    font-size: 11px;
}

.qualification-time-tree-toggle {
    white-space: nowrap;
}

.qualification-time-tree-toggle input {
    flex: 0 0 16px;
    width: 16px !important;
    height: 16px !important;
    margin: 0;
    min-height: 16px !important;
}

.qualification-time-grouping select {
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid #48637c;
    border-radius: 4px;
    background: #fff;
    color: #172033;
    font: inherit;
}

.qualification-time-grouping[hidden],
.qualification-time-tree[hidden] {
    display: none !important;
}

.qualification-time-view-button {
    min-height: 36px;
    padding: 7px 14px;
    border: 0;
    border-right: 1px solid #48637c;
    background: #26384d;
    color: #eaf3ff;
    cursor: pointer;
}

.qualification-time-view-button:last-child {
    border-right: 0;
}

.qualification-time-view-button.is-active,
.qualification-time-view-button:hover {
    background: #147d76;
}

.qualification-time-tree {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-height: 0;
    padding: 8px 12px;
    background: var(--surface, #fff);
    border: 1px solid var(--line, #c5d7d3);
    border-radius: 5px;
}

.qualification-tree-section {
    min-width: 0;
    margin: 2px 0 10px;
}

.qualification-tree-section h4 {
    margin: 0 0 8px;
    color: var(--teal-dark, #05635e);
}

.qualification-time-tree-panel {
    min-height: 0;
    padding: 2px 6px;
    background: var(--surface, #fff);
    border: 1px solid var(--line, #c5d7d3);
    border-radius: 5px;
}

.qualification-time-tree .fancytree-container {
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

html[data-system-theme="dark"] body .qualification-time-tree,
html[data-system-theme="dark"] body .qualification-time-tree-panel {
    background: #182326 !important;
    border-color: #3a4b4d !important;
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body .qualification-time-tree .fancytree-container,
html[data-system-theme="dark"] body .qualification-time-tree .fancytree-node,
html[data-system-theme="dark"] body .qualification-time-tree .fancytree-title {
    background: transparent !important;
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body .qualification-time-tree .fancytree-node:hover,
html[data-system-theme="dark"] body .qualification-time-tree .fancytree-active>.fancytree-node,
html[data-system-theme="dark"] body .qualification-time-tree .fancytree-focused>.fancytree-node {
    background: #263a3d !important;
    color: #ffffff !important;
}

html[data-system-theme="dark"] body .qualification-time-tree .qualification-time-input {
    background: #263238 !important;
    border-color: #78909c !important;
    color: #f5fbfa !important;
}

@media (max-width: 760px) {
    .qualification-time-topbar {
        grid-template-columns: 1fr;
    }

    .qualification-time-action-box {
        width: 100%;
        height: auto;
        margin-top: 0;
        flex-wrap: wrap;
    }

    .qualification-time-tree {
        grid-template-columns: 1fr;
    }
}

.qualification-tree-editor {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    min-height: 24px;
    vertical-align: middle;
}

.qualification-time-tree .qualification-tree-input {
    box-sizing: border-box;
    width: 104px;
    height: 24px !important;
    min-height: 0 !important;
    padding: 1px 7px 0 !important;
    line-height: 20px !important;
    vertical-align: middle;
}

.qualification-time-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.qualification-time-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 13px;
}

.qualification-time-table th,
.qualification-time-table td {
    padding: 8px 9px;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
    text-align: left;
    vertical-align: middle;
}

.qualification-time-table th {
    position: sticky;
    top: 0;
    background: #18283b;
    color: #f8fafc;
    white-space: nowrap;
}

.qualification-time-input {
    width: 112px;
    min-height: 35px;
    padding: 6px 8px;
    border: 2px solid #6b86a0;
    border-radius: 4px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-variant-numeric: tabular-nums;
}

.qualification-time-input:focus {
    border-color: #147d76;
    outline: 2px solid rgba(20, 125, 118, .25);
}

.qualification-time-status {
    min-width: 125px;
    color: #64748b;
    font-size: 12px;
}

.qualification-time-status.is-saved {
    color: #087f78;
    font-weight: 700;
}

.qualification-time-status.is-error {
    color: #b91c1c;
    font-weight: 700;
}

.audit-panel {
    overflow-x: auto;
}

.audit-panel-header {
    position: relative;
    display: flex;
    flex: 1 1 100%;
    width: 100%;
    align-items: center;
    gap: 0.6rem;
    min-height: 36px;
    flex-wrap: wrap;
}

.audit-panel-header .analysis-mode-title {
    flex: 0 0 auto;
    margin-right: auto;
}

.audit-panel-header .training-dashboard-menu-wrap {
    position: absolute;
    top: 50%;
    right: 0;
    margin-left: 0;
    transform: translateY(-50%);
}

.audit-panel-header .training-dashboard-group {
    display: inline-block !important;
    margin-left: 0 !important;
    padding: 4px 10px !important;
    border: 1px solid var(--teal) !important;
    border-radius: 999px !important;
    background: rgba(8, 126, 120, 0.08) !important;
    color: var(--teal) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.audit-status {
    color: var(--muted);
}

.audit-period-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.audit-period-filter select {
    min-height: 36px;
    padding: 6px 28px 6px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 600 13px Arial, sans-serif;
}

.app-slogan {
    font-style: italic;
}

.auth-gate-slogan {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.2;
    text-align: center;
}

.audit-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.audit-table th,
.audit-table td {
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.audit-table th {
    background: var(--surface-muted);
    color: var(--ink);
}

.backup-panel {
    max-width: 980px;
}

.backup-introduction,
.backup-list-status {
    color: var(--muted);
}

.backup-form {
    display: grid;
    gap: 14px;
    margin: 18px 0 24px;
}

.backup-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.backup-mode {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--ink);
    cursor: pointer;
}

.backup-mode input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--nav);
}

.backup-mode span {
    display: grid;
    gap: 4px;
}

.backup-mode small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.backup-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.backup-create {
    min-height: 38px;
}

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

.backup-list-title {
    margin: 0 0 8px;
    font-size: 16px;
}

.backup-list-status {
    margin: 0 0 10px;
    font-size: 13px;
}

.backup-list-wrap {
    overflow-x: auto;
}

.backup-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 13px;
}

.backup-table th,
.backup-table td {
    padding: 9px 10px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.backup-table th {
    background: var(--surface-muted);
}

.backup-download {
    color: var(--teal);
    font-weight: 700;
    white-space: nowrap;
}

.backup-table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
    flex-wrap: wrap;
}

.backup-delete {
    min-height: 32px;
    padding: 5px 8px;
    border-color: var(--danger);
    background: transparent;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.backup-delete:disabled {
    cursor: wait;
    opacity: 0.65;
}

.backup-protection {
    max-width: 190px;
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
}

.club-record-report {
    margin-top: 18px;
}

.club-record-report .audit-table {
    min-width: 0;
    font-size: 0.8rem;
}

.club-record-report .audit-table th,
.club-record-report .audit-table td {
    padding: 0.45rem;
    text-align: center;
}

.club-record-report .audit-table th:first-child,
.club-record-report .audit-table td:first-child {
    text-align: left;
}

.command-example:hover,
.command-example:focus-visible {
    background: #315177;
    outline: none;
}

#history {
    margin-top: 20px;
}

.history-item {
    background: #1e1e1e;
    padding: 8px;
    margin: 4px 0;
    border-radius: 5px;
    cursor: pointer;
}

.history-item:hover {
    background: #2c2c2c;
}

.answer-print {
    display: none;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    color: #888;
    font-size: 12px;
    margin-top: 15px;
}

.footer-text {
    min-width: 0;
}

.club-logo-upload-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.club-logo-settings-preview {
    display: block;
    width: min(260px, 100%);
    height: 82px;
    object-fit: contain;
    object-position: left center;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.club-maintenance-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    width: min(760px, 100%);
    margin: 0;
}

.club-maintenance-form .club-maintenance-field {
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 6px;
    min-width: 0;
    margin: 0;
}

.club-maintenance-form .club-maintenance-name,
.club-maintenance-form .club-maintenance-website,
.club-maintenance-form .club-maintenance-save,
.club-maintenance-form .club-maintenance-status {
    grid-column: 1 / -1;
}

.club-maintenance-form .club-maintenance-field input {
    width: 100%;
}

.club-maintenance-form .club-maintenance-website {
    font-size: 13px;
    line-height: 1.4;
}

.club-maintenance-form .club-maintenance-website input {
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0;
}

.club-maintenance-form .club-logo-upload-picker {
    align-items: center;
    min-height: 40px;
}

.club-maintenance-form .club-logo-settings-preview {
    width: min(100%, 260px);
    margin-top: 2px;
}

.club-maintenance-form .club-maintenance-save {
    justify-self: start;
    margin-top: 2px;
}

.club-maintenance-form .club-maintenance-status {
    min-height: 18px;
    margin: -8px 0 0;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(23, 50, 58, 0.28);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.modal-backdrop[hidden] {
    display: none;
}

#admin-modal,
#planning-confirm-modal,
#planning-info-modal {
    z-index: 70;
}

.birthday-backdrop {
    z-index: 40;
    background: rgba(12, 35, 50, 0.55);
}

.birthday-modal {
    width: min(520px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.56);
    border-radius: 8px;
    background: #f8fbf7;
    color: #12323a;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.birthday-scene {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: url("https://images.unsplash.com/photo-1470252649378-9c29740c9fa8?auto=format&fit=crop&w=1200&q=85") center 56% / cover no-repeat;
}

.birthday-sun {
    display: none;
}

.birthday-island {
    display: block;
    display: none;
}

#birthday-modal[data-scene="day"] .birthday-scene {
    background-image: url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1200&q=85");
    background-position: center 54%;
}

#birthday-modal[data-scene="sunset"] .birthday-scene {
    background-image: url("https://images.unsplash.com/photo-1472120435266-53107fd0c44a?auto=format&fit=crop&w=1200&q=85");
    background-position: center 50%;
}

.birthday-message {
    padding: 22px 24px 6px;
    text-align: center;
}

.birthday-kicker {
    margin: 0 0 5px;
    color: #486b64;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

.birthday-message h2 {
    margin: 0;
    color: #173c3d;
    font-size: 27px;
}

.birthday-name {
    margin: 8px 0 4px;
    font-size: 22px;
    font-weight: 700;
}

.birthday-copy {
    margin: 0;
    color: #49635f;
}

.birthday-dismiss-choice {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    align-items: center;
    padding: 14px 24px 4px;
    color: #49635f;
    font-size: 14px;
}

.birthday-dismiss-choice input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
}

.birthday-modal .modal-actions {
    padding: 12px 24px 22px;
}

@media (max-width: 600px) {
    .birthday-scene {
        height: 190px;
    }

    .birthday-message h2 {
        font-size: 23px;
    }

    .birthday-name {
        font-size: 19px;
    }
}

#admin-modal {
    background: rgba(23, 50, 58, 0.42);
    backdrop-filter: blur(3px);
}

.modal {
    width: min(420px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    padding: 24px;
}

.modal h2 {
    margin: 0 0 12px;
    color: var(--nav);
}

#admin-modal .modal {
    width: min(480px, calc(100vw - 32px));
    border-top: 4px solid var(--teal);
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(23, 50, 58, 0.24);
}

#admin-modal .modal h2 {
    margin-bottom: 8px;
    font-size: 21px;
    letter-spacing: 0;
}

#admin-modal .modal-command {
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f4f8f7;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.45;
}

.modal-command {
    margin: 0 0 18px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.modal-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 14px;
}

.modal-label[hidden],
.modal-input[hidden] {
    display: none;
}

.modal-input {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 20px;
}

#admin-modal .modal-input {
    min-height: 44px;
    margin-bottom: 22px;
    border-color: #aebfbd;
    border-radius: 5px;
    background: #fbfdfc;
    color: var(--ink);
}

#admin-modal select.modal-input {
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.35;
}

#admin-modal .modal-input:focus {
    border-color: var(--teal);
    outline: 3px solid rgba(8, 126, 120, 0.16);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.event-save-status {
    flex: 1 1 auto;
    min-width: 160px;
    color: var(--muted);
    font-size: 12px;
}

.modal-cancel {
    background: #f3f5f7;
    color: #111827;
    border: 1px solid #a8b4c1;
}

.modal-cancel:hover {
    background: #e5ebf1;
    color: #111827;
}

.lifesaving-import-modal {
    z-index: 75;
}

.lifesaving-import-dialog {
    box-sizing: border-box;
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 20px;
    border: 1px solid #9cb3b0;
    border-radius: 7px;
    background: #fbfdfc;
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.lifesaving-import-dialog h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
}

.lifesaving-import-summary,
.lifesaving-import-detail {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.45;
}

.lifesaving-import-detail {
    color: var(--muted);
}

.lifesaving-import-events {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.lifesaving-import-event {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #bdcdca;
    border-radius: 6px;
}

.lifesaving-import-event legend {
    padding: 0 4px;
    font-size: 14px;
    font-weight: 700;
}

.lifesaving-import-event label,
.lifesaving-import-event select,
.lifesaving-import-event input {
    box-sizing: border-box;
    min-width: 0;
    font-size: 14px;
}

.lifesaving-import-event select,
.lifesaving-import-event input:not([type="checkbox"]) {
    width: 100%;
    min-height: 38px;
    margin-top: 4px;
}

.lifesaving-import-event-details {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr) minmax(90px, 0.6fr);
    gap: 10px;
    align-items: end;
}

.lifesaving-import-event-details label:nth-last-child(-n + 2) {
    display: flex;
    gap: 7px;
    align-items: center;
}

.lifesaving-import-error {
    margin: 0 0 12px;
    color: #a11f17;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 620px) {
    .lifesaving-import-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        padding: 16px;
    }

    .lifesaving-import-event-details {
        grid-template-columns: minmax(0, 1fr);
    }
}

.training-schedule-group-modal .modal-actions button {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
}

.training-schedule-group-create {
    border: 1px solid var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.training-schedule-group-create:hover,
.training-schedule-group-create:focus-visible {
    border-color: #06655f;
    background: #06655f;
}

#admin-modal .modal-actions button {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
}

#admin-modal .modal-actions button[type="button"]:last-child {
    background: var(--teal);
}

#admin-modal .modal-actions button[type="button"]:last-child:hover {
    background: #06655f;
}

.modal-wide {
    width: min(920px, calc(100vw - 40px));
}

.modal-close-x {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 11px;
    background: #444;
    border-radius: 6px;
}

.modal-close-x:hover {
    background: #555;
}

.polar-pairing-dialog {
    width: min(520px, calc(100vw - 32px));
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(12, 35, 50, 0.38);
}

.polar-pairing-dialog::backdrop {
    background: rgba(13, 39, 48, 0.46);
    backdrop-filter: blur(2px);
}

.polar-pairing-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
}

.polar-pairing-eyebrow {
    margin: 0 0 4px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.polar-pairing-header h3 {
    margin: 0;
    color: var(--nav);
    font-size: 22px;
}

.polar-pairing-description {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.polar-pairing-close {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f4f8f7;
    color: var(--ink);
    font-size: 27px;
    line-height: 1;
}

.polar-pairing-close:hover,
.polar-pairing-close:focus-visible {
    border-color: var(--teal);
    background: #e6f2f0;
}

.polar-pairing-list {
    display: grid;
    gap: 8px;
    max-height: min(560px, calc(100dvh - 220px));
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 16px 24px;
}

.polar-pairing-device-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.polar-pairing-device {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    width: 100%;
    min-height: 76px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfdfc;
    color: var(--ink);
    text-align: left;
}

.polar-pairing-device-row .polar-pairing-device {
    min-width: 0;
}

.polar-pairing-hide-device {
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
}

.polar-pairing-hide-device:hover,
.polar-pairing-hide-device:focus-visible {
    border-color: var(--teal);
    color: var(--teal-dark);
}

.polar-pairing-device:hover,
.polar-pairing-device:focus-visible {
    border-color: var(--teal);
    background: #f0f8f6;
}

.polar-pairing-device.is-selected {
    border-color: var(--teal);
    box-shadow: inset 0 0 0 1px var(--teal);
    background: #e7f4f1;
}

.polar-pairing-device:disabled {
    border-color: var(--line);
    background: var(--surface-muted);
    color: var(--muted);
    cursor: not-allowed;
    opacity: .78;
}

.polar-pairing-device-id {
    color: var(--nav);
    font-size: 17px;
    font-weight: 800;
}

.polar-pairing-device-details {
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.polar-pairing-device-technical {
    grid-column: 1 / -1;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
}

.polar-pairing-device-assignment {
    grid-column: 1 / -1;
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
}

.polar-pairing-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 22px;
    border-top: 1px solid var(--line);
}

.polar-pairing-restore {
    margin-right: auto;
}

@media (max-width: 520px) {
    .polar-pairing-device-row {
        grid-template-columns: 1fr;
    }

    .polar-pairing-hide-device {
        justify-self: start;
    }
}

.polar-pairing-actions button {
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 5px;
    font-weight: 700;
}

.polar-pairing-confirm {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
}

.polar-pairing-confirm:hover:not(:disabled),
.polar-pairing-confirm:focus-visible:not(:disabled) {
    border-color: #06655f;
    background: #06655f;
}

.polar-pairing-confirm:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

@media (max-width: 600px) {
    .polar-pairing-header {
        padding: 18px 18px 15px;
    }

    .polar-pairing-list {
        max-height: 52vh;
        padding: 12px 18px;
    }

    .polar-pairing-device {
        grid-template-columns: 1fr;
        min-height: 84px;
    }

    .polar-pairing-device-details {
        text-align: left;
    }

    .polar-pairing-actions {
        padding: 14px 18px 18px;
    }

    .polar-pairing-actions button {
        flex: 1 1 0;
    }
}

.graph-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.graph-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.graph-field[hidden] {
    display: none;
}

.graph-field label {
    color: #aaa;
    font-size: 13px;
}

.graph-field select,
.graph-field input {
    padding: 9px 10px;
    background: #262626;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 14px;
}

.graph-field select[multiple] {
    min-height: 92px;
}

.graph-field-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: auto;
}

.graph-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-size: 14px;
    white-space: nowrap;
}

.graph-year-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.graph-year-fields[hidden] {
    display: none;
}

.graph-status {
    min-height: 1.3em;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 10px;
}

.graph-charts {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.graph-chart-block {
    display: flex;
    flex-direction: column;
}

.graph-chart-title {
    margin: 0 0 4px;
    color: #4da3ff;
    font-size: 15px;
}

.graph-chart-status {
    min-height: 1.2em;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 8px;
}

.answer-status[data-success="true"],
.answer-status[data-error="true"],
.graph-status[data-success="true"],
.graph-status[data-error="true"],
.graph-chart-status[data-success="true"],
.graph-chart-status[data-error="true"] {
    font-weight: 600;
}

.graph-canvas-wrap {
    position: relative;
    background: #161616;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    font-size: 13px;
    color: #ccc;
}

.graph-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.graph-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.graph-tooltip {
    position: absolute;
    pointer-events: none;
    background: #262626;
    border: 1px solid #4da3ff;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: #e0e0e0;
    max-width: 240px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 5;
}

.graph-point {
    cursor: pointer;
}

.graph-point:hover,
.graph-point.active {
    stroke: #fff;
    stroke-width: 2;
}

:root {
    --app-bg: #edf1f3;
    --surface: #ffffff;
    --surface-muted: #f5f8f8;
    --ink: #17323a;
    --muted: #62747a;
    --line: #d5dfe0;
    --teal: #087e78;
    --teal-dark: #06655f;
    --nav: #14363d;
    --nav-hover: #1c4a53;
    --accent: #ef8c31;
}

body {
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--app-bg);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
}

body.auth-locked .app-shell {
    display: none;
}

body.auth-locked .header {
    display: none;
}

body.auth-locked .footer {
    display: none;
}

.auth-gate {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(239, 140, 49, 0.12) 0 1px, transparent 1px 28px),
        linear-gradient(135deg, #102f36 0%, #087e78 100%);
}

.auth-gate[hidden] {
    display: none;
}

.auth-gate-panel {
    display: grid;
    gap: 0;
    width: min(500px, 100%);
    padding: 36px;
    background: #ffffff;
    border-top: 5px solid #ef8c31;
    box-shadow: 0 20px 60px rgba(6, 41, 46, 0.3);
}

.auth-gate-logos {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    align-items: center;
    gap: 14px;
}

.auth-gate-logos img {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.auth-gate-logos img+img {
    width: 76px;
    height: 52px;
}

.auth-gate-club-logo>img {
    width: 64px;
    height: 64px;
}

.auth-gate-logos h1 {
    min-width: 0;
    margin: 0;
    color: #17323a;
    font-size: 25px;
    font-weight: normal;
    text-align: left;
    overflow-wrap: anywhere;
}

.auth-gate-title-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.auth-gate-title-block h1 {
    display: inline-block;
    margin: 0;
    line-height: 1.1;
    text-align: center;
}

.auth-gate-panel p {
    margin: 0 0 26px;
    color: #62747a;
    font: 14px/1.5 Arial, sans-serif;
}

.auth-gate-title-block .auth-gate-club-name,
.auth-gate-title-block .auth-gate-slogan {
    margin: 0;
    text-align: center;
}

.auth-gate-title-block .auth-gate-club-name {
    color: #49636a;
    font-size: 13px;
    line-height: 1.2;
}

.auth-gate-title-block .auth-gate-slogan {
    margin-top: 2px;
    color: #62747a;
    font-size: 12px;
    line-height: 1.2;
}

.auth-gate-brand .auth-gate-intro {
    margin: 32px 0 0;
    color: #62747a;
    font: 14px/1.45 Arial, sans-serif;
    text-align: center;
}

.auth-gate-fields {
    display: grid;
    gap: 7px;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #d5dfe0;
    background: #f5f8f8;
}

.auth-weather-mood {
    position: relative;
    display: inline-block;
    margin-left: 4px;
    cursor: default;
    font-size: inherit;
    line-height: inherit;
}

.auth-weather-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    display: grid;
    gap: 8px;
    width: 150px;
    padding: 8px 10px;
    border: 1px solid #d5dfe0;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(6, 41, 46, 0.3);
    color: #17323a;
    font: 11px/1.35 Arial, sans-serif;
    text-align: left;
}

.auth-weather-popover[hidden] {
    display: none;
}

html[data-system-theme="dark"] body .auth-weather-popover {
    border-color: #456269;
    background: #1b2c31;
    color: #edf5f3;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

html[data-system-theme="dark"] body .auth-weather-popover strong {
    color: #edf5f3;
}

.auth-weather-hours {
    display: grid;
    gap: 3px;
}

.auth-gate-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid #d5dfe0;
    color: #62747a;
    font: 11px/1.45 Arial, sans-serif;
    text-align: center;
}

.auth-gate-label {
    display: block;
    margin: 0;
    color: #17323a;
    font: bold 12px Arial, sans-serif;
    text-transform: uppercase;
}

.auth-gate-input+.auth-gate-label {
    margin-top: 10px;
}

.auth-gate-input {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d5dfe0;
    border-radius: 3px;
    background: #ffffff;
    color: #17323a;
    font: 16px Arial, sans-serif;
}

.auth-gate-submit {
    width: 100%;
    margin-top: 14px;
    min-height: 46px;
    padding: 12px 16px;
    border: 0;
    border-radius: 3px;
    background: #087e78;
    color: #ffffff;
    font: bold 15px Arial, sans-serif;
    cursor: pointer;
}

.auth-gate-submit:hover {
    background: #06655f;
}

.auth-gate-error {
    min-height: 20px;
    margin: 12px 0 0;
    color: #a33d2f;
    font: 13px Arial, sans-serif;
}

.header {
    min-height: 74px;
    margin: 0;
    padding: 10px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

@media (min-width: 761px) {
    .header .logo-home {
        order: 1;
    }

    .header .header-countdown {
        order: 2;
    }

    .header .title-block {
        order: 3;
    }

    .header .auth-actions {
        order: 4;
    }

    .header .jss-logo {
        order: 5;
        margin-left: 16px;
    }
}

.logo {
    width: auto;
    height: 54px;
}

.jss-logo {
    width: auto;
    height: 42px;
}

h1 {
    color: var(--ink);
    font-size: 25px;
}

.subtitle {
    color: var(--muted);
}

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: calc(100vh - 74px);
}

.app-nav {
    padding: 22px 14px;
    background: var(--nav);
    color: #eef7f5;
}

#app-nav-tree,
#app-nav-tree ul {
    border: 0;
    background: transparent;
    color: #c8dedb;
}

#app-nav-tree {
    padding: 0;
}

#app-nav-tree .fancytree-container {
    outline: 0;
    font-family: Arial, sans-serif;
}

#app-nav-tree .fancytree-node {
    display: flex;
    align-items: center;
    min-height: 34px;
    width: 100%;
    padding: 3px 6px 3px 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    color: #c8dedb;
    font-size: 14px;
}

#app-nav-tree .fancytree-node:hover,
#app-nav-tree .fancytree-active>.fancytree-node,
#app-nav-tree .simbot-tree-active>.fancytree-node {
    border-left-color: var(--accent);
    background: var(--nav-hover);
    color: #ffffff;
}

#app-nav-tree .fancytree-expander,
#app-nav-tree .fancytree-icon {
    flex: 0 0 18px;
}

#app-nav-tree .fancytree-title {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
    padding: 4px 6px;
    border: 0;
    background: transparent;
    color: inherit;
    white-space: normal;
}

#app-nav-tree .simbot-tree-parent>.fancytree-node>.fancytree-title {
    font-size: 14px;
    font-weight: bold;
}

#app-nav-tree .fancytree-childcounter,
#app-nav-tree .simbot-tree-status {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 3px 7px;
    border-radius: 5px;
    background: #eef3f4;
    color: #526166;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.private-message-nav-badge {
    display: inline-grid;
    flex: 0 0 auto;
    min-width: 19px;
    height: 19px;
    margin-left: auto;
    padding: 0 5px;
    place-items: center;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

#app-nav-tree .fancytree-hidden {
    display: none;
}

.nav-heading {
    margin: 0 10px 13px;
    color: #a9c6c2;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-group {
    margin-bottom: 22px;
}

.nav-item-overview {
    margin: 0 0 18px;
    padding-left: 10px;
}

.nav-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0 0 5px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
}

.nav-group-title::before {
    content: "\25be";
    display: inline-block;
    font-size: 11px;
    transition: transform 0.15s ease;
}

.nav-group.collapsed .nav-group-title::before {
    transform: rotate(-90deg);
}

.nav-group.collapsed .nav-item {
    display: none;
}

.nav-group.collapsed .nav-subgroup {
    display: none;
}

.nav-subgroup {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(200, 222, 219, 0.2);
}

.nav-subgroup-under-parent {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.nav-subgroup-title {
    margin: 0 10px 5px;
    color: #a9c6c2;
    font: bold 11px/1.2 Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px 9px 18px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #c8dedb;
    font: 14px/1.2 Arial, sans-serif;
    text-align: left;
}

.nav-item-nested {
    padding-left: 28px;
    font-size: 13px;
}

.nav-parent-workspace {
    padding-left: 27px;
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 14px;
    font-weight: bold;
}

.nav-item:hover,
.nav-item.is-active {
    background: var(--nav-hover);
    border-left-color: var(--accent);
    color: #ffffff;
}

.nav-item[disabled],
.nav-item[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.52;
}

.nav-item[disabled]:hover,
.nav-item[aria-disabled="true"]:hover {
    background: transparent;
    border-left-color: transparent;
    color: #c8dedb;
}

.nav-status {
    margin-left: auto;
    color: #a9c6c2;
    font-size: 10px;
}

.workspace {
    width: min(1160px, 100%);
    padding: 32px;
}

.workspace-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.workspace-kicker {
    margin: 0 0 5px;
    color: var(--teal);
    font: bold 12px Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workspace-heading h2 {
    margin: 0;
    font-size: 30px;
    font-weight: normal;
}

.workspace-sport-context {
    margin: 5px 0 0;
    color: var(--teal);
    font-size: 13px;
    font-weight: bold;
    line-height: 1.35;
    letter-spacing: 0;
}

.workspace-heading>div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.workspace-heading-copy {
    min-width: 0;
}

.workspace-back-button {
    width: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--nav);
    font-size: 22px;
    line-height: 1;
}

.workspace-back-button:hover {
    border-color: var(--teal);
    background: #e7f3f0;
}

.workspace-description {
    max-width: 470px;
    margin: 0;
    color: var(--muted);
    font: 14px/1.45 Arial, sans-serif;
}

.workspace-help-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.workspace-help-button[hidden] {
    display: none;
}

.workspace-print-menu-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.workspace-print-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 8;
    display: grid;
    min-width: 160px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.workspace-print-menu[hidden] {
    display: none;
}

.workspace-print-menu button {
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: 600 13px/1.25 Arial, sans-serif;
    text-align: left;
    cursor: pointer;
}

.workspace-print-menu button:hover,
.workspace-print-menu button:focus-visible {
    background: var(--surface-muted);
}

.workspace-print-menu-status {
    max-width: 210px;
    margin: 5px 4px 2px;
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.auth-logout-status {
    display: flex;
    order: 2;
    align-items: center;
    gap: 7px;
}

.auth-pulse-live[hidden] {
    display: none;
}

.auth-pulse-live {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    place-items: center;
    cursor: pointer;
}

.auth-pulse-live:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.auth-pulse-live .workout-polar-heart {
    display: inline-block;
    color: #d60036;
    font: 700 22px/1 Arial, sans-serif;
    text-shadow: none;
}

.auth-user-menu-wrap {
    position: relative;
    order: 1;
}

.language-picker {
    display: flex;
    align-items: center;
    gap: 3px;
    order: 1;
}

.language-picker button {
    min-width: 30px;
    height: 24px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.language-picker button:hover,
.language-picker button[aria-pressed="true"] {
    border-color: var(--teal);
    background: var(--surface-muted);
}

#auth-user[hidden],
#auth-login-button[hidden],
#auth-logout-button[hidden] {
    display: none;
}

.auth-user {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

#auth-user {
    max-width: min(260px, 32vw);
    min-height: 34px;
    padding: 5px 11px 5px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--ink);
    cursor: pointer;
    font: 600 13px Arial, sans-serif;
    white-space: nowrap;
}

#auth-logout-button {
    order: 2;
}

.auth-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
}

.auth-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    min-width: 210px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.auth-user-menu[hidden] {
    display: none;
}

.auth-user-menu-heading {
    padding: 6px 10px 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-user-menu-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 2px 7px;
    padding: 9px 10px;
    border-radius: 6px;
    background: var(--surface-muted);
}

.auth-menu-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
}

.auth-menu-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dfe7ea, #b8c3cb);
    color: var(--nav);
    font-size: 14px;
    font-weight: 700;
}

.auth-menu-user-name {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-user-menu-item,
.auth-avatar-upload {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--ink);
    font: 13px Arial, sans-serif;
    text-align: left;
    cursor: pointer;
}

.auth-user-menu-item:hover,
.auth-user-menu-item:focus-visible,
.auth-avatar-upload:hover,
.auth-avatar-upload:focus-within {
    background: var(--surface-muted);
}

.auth-user-menu-icon {
    width: 18px;
    color: var(--teal);
    text-align: center;
}

.auth-user-menu-separator {
    height: 1px;
    margin: 6px 4px;
    background: var(--line);
}

.auth-theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
}

.auth-theme-options button {
    padding: 7px 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-size: 12px;
}

.auth-theme-options button[aria-pressed="true"] {
    border-color: var(--teal);
    background: var(--surface-muted);
    font-weight: 700;
}

.auth-device-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
}

.auth-device-options button {
    min-height: 34px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.auth-device-icon {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 auto;
}

.auth-device-options button[aria-pressed="true"] {
    border-color: var(--teal);
    background: var(--surface-muted);
}

.auth-language-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    padding: 2px 4px;
}

.auth-language-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 6px;
    color: var(--ink);
    font-size: 13px;
}

.auth-language-option.is-disabled {
    color: var(--muted);
    opacity: .48;
}

.auth-language-flag {
    width: 20px;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.auth-gate-language {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    margin-top: 1px;
}

.auth-gate-language .auth-language-options {
    display: flex;
    gap: 8px;
    padding: 0;
}

.auth-gate-language .auth-language-option {
    justify-content: center;
    width: 24px;
    padding: 2px 0;
}

.auth-gate-language .auth-weather-mood {
    width: 24px;
    margin-left: 0;
    text-align: center;
}

.auth-gate-club-logo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.auth-gate-club-logo .auth-gate-language {
    position: absolute;
    top: 100%;
    width: max-content;
}

.auth-user-menu-logout {
    color: #9d352a;
}

#auth-user:hover {
    border-color: var(--teal);
    background: var(--surface);
    color: var(--nav);
    box-shadow: 0 3px 10px rgba(45, 138, 128, .16);
}

#auth-user:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--teal) 35%, transparent);
    outline-offset: 2px;
}

.password-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-control input {
    flex: 1 1 auto;
}

.password-toggle {
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    cursor: pointer;
    font: 12px Arial, sans-serif;
}

.password-toggle:hover {
    background: #e9f5f2;
}

.workspace-heading-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    align-items: center;
}

#graph-year-mode[aria-pressed="true"] {
    background: var(--teal);
    border-color: var(--teal);
    color: #ffffff;
}

.workspace-help {
    margin-top: 12px;
    padding: 14px 16px;
    border-left: 3px solid var(--teal);
    background: var(--surface-muted);
    color: var(--ink);
}

.workspace-help[hidden] {
    display: none;
}

.workspace-help h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.workspace-help p {
    margin: 4px 0;
}

.overview-panel {
    padding: 8px 0 24px;
}

.overview-panel h3 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: normal;
}

.overview-weather-band {
    width: 100%;
    margin: 0 auto 14px;
    padding: 0;
    box-sizing: border-box;
}

.overview-intro {
    max-width: 1080px;
    margin: calc(22px - 6mm) auto 22px;
    padding: 20px 26px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--teal);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    text-align: center;
    box-shadow: 0 8px 24px rgba(23, 50, 58, 0.08);
}

.overview-intro p {
    margin: 0 auto 8px;
    max-width: 570px;
    line-height: 1.4;
}

.overview-statuses {
    margin-top: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 5px;
    background: var(--surface-muted);
    text-align: left;
}

.overview-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    text-align: left;
}

@media (max-width: 600px) {
    .overview-intro {
        margin: 12px 0 18px;
        padding: 16px;
    }

    .overview-dashboard-grid,
    body.is-swimmer-account .overview-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .overview-activity-category li {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}

.overview-week-pulse {
    padding: 15px 16px 16px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 5px;
    background: var(--surface-muted);
    text-align: left;
}

.overview-week-pulse-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.overview-week-pulse-heading h4 {
    margin: 0;
    color: var(--muted);
    font: bold 11px Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#overview-week-pulse-period {
    color: var(--muted);
    font-size: 12px;
    text-transform: capitalize;
}

.overview-week-pulse-list {
    display: grid;
    gap: 2px;
}

.overview-week-pulse-item {
    display: grid;
    grid-template-columns: minmax(0, 76px) minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 54px;
    padding: 8px 7px;
    border: 1px solid transparent;
    border-left: 3px solid var(--line);
    border-radius: 3px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.overview-week-pulse-item:not(.is-report):hover,
.overview-week-pulse-item:not(.is-report):focus-visible {
    background: color-mix(in srgb, var(--surface) 80%, var(--teal) 20%);
    outline: none;
}

.overview-week-pulse-item.is-report {
    cursor: default;
}

.overview-week-pulse-label {
    align-self: start;
    padding: 0;
    min-width: 0;
    color: var(--ink);
    font: bold 13px Arial, sans-serif;
}

.overview-week-pulse-label-detail {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font: 12px/1.2 Arial, sans-serif;
    white-space: pre-line;
}

.overview-week-pulse-training {
    border-left-color: #188a82;
}

.overview-week-pulse-calendar {
    border-left-color: #d1852c;
}

.overview-week-pulse-weekly-plan {
    border-left-color: var(--calendar-weekly-plan-color, #4b5ca8);
}

.overview-week-pulse-season-plan {
    border-left-color: var(--calendar-season-plan-color, #a23f5b);
}

.overview-week-pulse-personal-records {
    border-left-color: #188a82;
}

.overview-week-pulse-season-bests {
    border-left-color: #4b5ca8;
}

.overview-week-pulse-readiness {
    border-left-color: #c28b20;
}

.overview-week-pulse-competition-summary {
    border-left-color: #a23f5b;
}

.overview-week-pulse-birthdays {
    border-left-color: #188a82;
    grid-template-columns: minmax(0, 104px) minmax(0, 1fr);
}

.overview-week-pulse-body {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.overview-week-pulse-body strong {
    font: 12px/1.35 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.overview-week-pulse-body small {
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.overview-week-pulse-birthday-list {
    display: grid;
    gap: 4px;
}

.overview-week-pulse-birthday {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    color: var(--ink);
    font-size: 12px;
}

.overview-week-pulse-birthday strong {
    color: var(--teal);
    font-size: 12px;
}

.overview-week-pulse-results {
    display: grid;
    gap: 7px;
}

.overview-week-pulse-result {
    display: grid;
    gap: 1px;
}

.overview-week-pulse-result+.overview-week-pulse-result {
    padding-top: 6px;
    border-top: 1px solid var(--line);
}

.overview-week-pulse-competition-link {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--teal);
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: underline;
}

.overview-week-pulse-competition-link:hover,
.overview-week-pulse-competition-link:focus-visible {
    color: var(--ink);
    outline: none;
}

.overview-week-pulse-competition-entry,
.overview-week-pulse-competition-statistics {
    display: block;
}

.overview-week-pulse-competition-statistics {
    margin-top: 1px;
}

.overview-week-pulse-statistic {
    position: relative;
    display: inline-block;
}

.overview-week-pulse-statistic-button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.overview-week-pulse-statistic-button:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.overview-competition-details-backdrop {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(23, 50, 58, 0.28);
}

.overview-competition-details-menu {
    position: relative;
    width: min(620px, 100%);
    max-height: calc(100dvh - 32px);
    padding: 18px 44px 18px 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(23, 50, 58, 0.18);
    color: var(--ink);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.overview-competition-details-menu h3 {
    margin: 0 0 12px;
    font: 600 16px/1.3 Arial, sans-serif;
}

.overview-competition-details-menu ul {
    margin: 0;
    padding-left: 17px;
    font: 14px/1.5 Arial, sans-serif;
}

.overview-competition-details-menu .overview-week-pulse-starter-list {
    padding-left: 0;
    list-style: none;
}

.overview-competition-details-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font: 26px/1 Arial, sans-serif;
}

.overview-competition-details-close:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.overview-week-pulse-competition-divider {
    display: block;
    width: 18px;
    margin: 6px 0;
    border-top: 1px solid var(--line);
}

.overview-week-pulse-badges {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    white-space: nowrap;
}

.overview-week-pulse-badge {
    flex: 0 0 auto;
    padding: 2px 4px;
    border-radius: 3px;
    font: bold 9px/1.2 Arial, sans-serif;
}

.overview-week-pulse-badge.is-high {
    background: #177b52;
    color: #fff;
}

.overview-week-pulse-badge.is-medium {
    background: #bd8b16;
    color: #201400;
}

.overview-week-pulse-badge.is-low {
    background: #b33939;
    color: #fff;
}

.overview-week-pulse-item:not(.is-active) .overview-week-pulse-body strong {
    color: var(--muted);
    font-weight: 600;
}

.overview-week-pulse-arrow {
    align-self: center;
    color: var(--teal);
    font-size: 22px;
    line-height: 1;
}

.training-dashboard-card.is-overview-target {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

body.is-swimmer-account .overview-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-activities {
    margin-top: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: 5px;
    background: var(--surface-muted);
    text-align: left;
}

.overview-activities h4 {
    margin: 0 0 8px;
    color: var(--muted);
    font: bold 11px Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#overview-activity-list {
    display: grid;
    gap: 8px;
}

.overview-activity-category h5 {
    margin: 0 0 2px;
    color: var(--ink);
    font-size: 13px;
}

.overview-activity-category ul {
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.overview-activity-category li {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    padding: 3px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
    color: var(--ink);
    font-size: 12px;
}

.overview-activity-more {
    margin-top: 0;
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.overview-activity-more:hover,
.overview-activity-more:focus-visible {
    background: transparent;
    color: var(--accent);
    text-decoration: underline;
}

.overview-activity-expanded {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.overview-activity-expanded h6 {
    margin: 7px 0 2px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.overview-activity-expanded h6:first-child {
    margin-top: 0;
}

.overview-activity-category time {
    color: var(--muted);
    text-transform: capitalize;
}

.overview-activity-label {
    overflow-wrap: anywhere;
}

.overview-statuses h4 {
    margin: 0 0 12px;
    color: var(--muted);
    font: bold 11px Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#overview-status-list {
    display: grid;
    gap: 10px;
}

.overview-status-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.overview-status-row .status-tag {
    margin-left: 0;
    justify-self: end;
}

.overview-status-row strong,
.overview-status-row span:not(.status-tag) {
    display: block;
}

.overview-status-row strong {
    color: var(--ink);
    font: bold 13px Arial, sans-serif;
}

.overview-status-row span:not(.status-tag) {
    margin-top: 2px;
    color: var(--muted);
    font: 13px/1.4 Arial, sans-serif;
}

.overview-quote {
    margin: 24px 0 0;
    padding: 18px 8px 0;
    border-top: 1px solid var(--line);
}

.overview-quote blockquote {
    margin: 0;
    color: var(--ink);
    font: italic 19px/1.45 Georgia, "Times New Roman", serif;
}

.overview-quote figcaption {
    margin-top: 8px;
    color: var(--teal);
    font: bold 12px Arial, sans-serif;
}

.overview-quote figcaption::before {
    content: "- ";
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.overview-item {
    min-height: 82px;
    padding: 15px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    font: 16px Georgia, "Times New Roman", serif;
    text-align: left;
}

.overview-item:hover {
    background: #edf7f5;
}

.overview-item small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.status-tag {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    margin-left: auto;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.38);
    font: bold 10px/1 Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-tag-alpha {
    border: 1px solid rgba(120, 96, 165, 0.45);
    background: #f1eef8;
    color: #604d8c;
}

.status-tag-pre-alpha {
    border: 1px solid rgba(78, 117, 139, 0.45);
    background: #edf5f7;
    color: #315f72;
}

.status-tag-beta {
    border: 1px solid rgba(199, 123, 42, 0.45);
    background: #fff4e6;
    color: #92551e;
}

.status-tag-gm {
    border: 1px solid rgba(8, 126, 120, 0.45);
    background: #e7f5f3;
    color: #06655f;
}

.status-tag-drift {
    border: 1px solid rgba(42, 99, 151, 0.45);
    background: #eaf2fa;
    color: #245c91;
}

.status-tag-not-started {
    border: 1px solid rgba(93, 103, 105, 0.42);
    background: #eef1f1;
    color: #4d5b5d;
}

.planning-print-frame {
    position: fixed;
    width: 1px;
    height: 1px;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.planning-print-options {
    width: min(440px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 22px 60px rgba(15, 34, 36, 0.28);
}

.planning-print-options::backdrop {
    background: rgba(15, 34, 36, 0.42);
}

.planning-print-options form {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.planning-print-options h2 {
    margin: 0;
    font-size: 21px;
}

.planning-print-options label {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.planning-print-options input[type="range"] {
    width: 100%;
    accent-color: var(--teal);
}

.planning-print-scale-preview {
    margin: 0;
    color: var(--ink-muted);
    font-size: 14px;
}

@media (max-width: 560px) {
    .planning-print-options form {
        padding: 18px;
    }
}

.overview-item[disabled] {
    border-left-color: #aab8b7;
    cursor: default;
    opacity: 0.65;
}

.query-builder,
.answer-panel {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(23, 50, 58, 0.06);
}

.query-builder {
    margin-bottom: 22px;
    border-top: 4px solid var(--teal);
}

.planning-panel {
    margin-bottom: 22px;
}

.builder-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 16px;
}

.builder-header[hidden] {
    display: none;
}

.builder-header h3 {
    margin: 0;
    font-size: 19px;
}

.builder-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.builder-field {
    display: flex;
    flex: 1 1 160px;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.builder-field[hidden] {
    display: none;
}

.builder-field label {
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.builder-field select,
.builder-field input {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    padding: 10px;
    border: 1px solid #b9c9ca;
    border-radius: 4px;
    background: #ffffff;
    color: var(--ink);
    font: 15px Arial, sans-serif;
}

.builder-toggle {
    flex: 0 1 auto;
    justify-content: end;
}

.builder-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.builder-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.builder-segmented-field {
    flex: 0 1 auto;
}

.builder-segmented-label {
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.builder-segmented {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #b9c9ca;
    border-radius: 4px;
}

.builder-segment {
    padding: 10px 14px;
    border: 0;
    border-right: 1px solid #b9c9ca;
    border-radius: 0;
    background: #ffffff;
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.builder-segment:last-child {
    border-right: 0;
}

.builder-segment:hover,
.builder-segment.is-active {
    background: var(--teal);
    color: #ffffff;
}

.admin-builder {
    border-top: 4px solid var(--accent);
    background: #fbfcfa;
}

.admin-builder-clean .builder-header,
.admin-builder-clean .builder-fields> :not(.import-dashboard) {
    display: none !important;
}

.admin-builder-clean .builder-fields {
    display: block;
}

.admin-builder .builder-header {
    align-items: flex-start;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.admin-builder .builder-header h3 {
    color: var(--nav);
    font-size: 24px;
}

.admin-builder .builder-header::after {
    content: "Säkra verktyg för register och data";
    color: var(--muted);
    font: 13px/1.4 Arial, sans-serif;
}

.admin-builder .admin-action-picker {
    flex: 1 1 100%;
    gap: 8px;
}

.admin-builder .admin-category-picker {
    flex: 1 1 100%;
    gap: 8px;
}

.admin-builder .admin-category-picker .builder-segmented-label {
    color: var(--nav);
    font: bold 12px Arial, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-builder .admin-category-picker .builder-segmented {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    border: 0;
}

.admin-builder .admin-category-picker .builder-segment {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #edf4f2;
    color: var(--nav);
    font-size: 13px;
    text-align: left;
}

.admin-builder .admin-category-picker .builder-segment:hover,
.admin-builder .admin-category-picker .builder-segment.is-active {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.admin-builder .admin-action-picker .builder-segmented-label {
    color: var(--nav);
    font: bold 12px Arial, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-builder .admin-action-picker select {
    max-width: 360px;
    border-color: var(--accent);
}

.admin-builder .admin-action-picker .builder-segmented {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    border: 0;
}

.admin-builder .admin-action-picker .builder-segment {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    text-align: left;
}

.admin-builder .admin-action-picker .builder-segment:hover,
.admin-builder .admin-action-picker .builder-segment.is-active {
    border-color: var(--accent);
    background: #fff4e8;
    color: var(--nav);
}

.admin-builder .analysis-mode-panel {
    border-left: 4px solid var(--accent);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(23, 50, 58, 0.05);
}

.admin-builder .analysis-mode-title {
    color: var(--nav);
    font-size: 19px;
}

.admin-builder .analysis-mode-panel p {
    flex: 1 1 100%;
    margin: -4px 0 4px;
    color: var(--muted);
    font: 13px/1.45 Arial, sans-serif;
}

.admin-swimmer-profile {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    position: relative;
    overflow: visible;
    gap: 18px;
    max-width: 1040px;
    padding: 20px;
}

.admin-swimmer-profile-content,
.admin-swimmer-profile-controls,
.admin-swimmer-profile-selectors {
    width: 100%;
}

.admin-swimmer-profile-controls {
    display: grid;
    align-content: start;
    gap: 7px;
}

.admin-swimmer-profile-selectors {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.admin-swimmer-maintenance-status {
    min-height: 1.35em;
    margin: 0;
    padding: 8px 10px;
    border-left: 3px solid var(--teal);
    background: var(--surface-muted);
    color: var(--ink);
    font: 600 13px/1.4 Arial, sans-serif;
    white-space: pre-wrap;
}

.admin-swimmer-maintenance-status:empty {
    display: none;
}

.admin-swimmer-profile-controls>.admin-swimmer-registration-actions {
    order: 1;
}

.admin-swimmer-profile-controls>.admin-swimmer-maintenance-actions {
    order: 2;
}

.admin-swimmer-profile .training-dashboard-menu-wrap {
    position: relative;
    order: -1;
    align-self: flex-end;
    margin: 0;
    z-index: 20;
}

.admin-swimmer-avatar-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    max-width: min(300px, 100%);
    min-height: 34px;
    padding: 5px 11px 5px 7px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
}

.admin-swimmer-avatar-button-image,
.admin-swimmer-avatar-button-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
}

.admin-swimmer-avatar-button-fallback {
    background: linear-gradient(135deg, #dfe7ea, #b8c3cb);
    color: var(--nav);
    font-size: 10px;
    font-weight: 700;
}

.admin-swimmer-avatar-button-name {
    overflow: hidden;
    color: var(--ink);
    font: 600 13px Arial, sans-serif;
    text-overflow: ellipsis;
}

.admin-swimmer-profile .training-dashboard-menu {
    right: 0;
    left: auto;
    max-width: calc(100vw - 56px);
    max-height: min(70vh, 480px);
    overflow-y: auto;
    overflow-wrap: anywhere;
}

.admin-swimmer-profile-controls>label,
.admin-swimmer-profile-selectors>label {
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.personal-details-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.personal-details-form legend {
    padding: 0 4px;
    color: var(--ink);
    font: 600 13px Arial, sans-serif;
}

.swimmer-personal-identity {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.swimmer-personal-identity label,
.swimmer-personal-primary-group {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 600 12px/1.2 Arial, sans-serif;
}

.swimmer-personal-identity input[readonly] {
    color: var(--ink);
    font-weight: 600;
}

.personal-details-form>.admin-swimmer-groups-field {
    grid-column: 1 / -1;
    margin: 0;
}

.personal-details-form>.swimmer-personal-primary-group {
    grid-column: 1;
}

.personal-details-form>label:has(input[type="checkbox"]) {
    grid-column: span 2;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-height: 32px;
    padding: 0 0 10px;
    color: var(--ink);
    font: 600 13px/1.2 Arial, sans-serif;
}

.personal-details-form>label:has(input[type="checkbox"]) input {
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    height: 18px;
    margin: 0;
}

.personal-details-form label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.personal-details-form input,
.personal-details-form select {
    min-width: 0;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.personal-details-form .polar-display-id:disabled {
    opacity: 1;
    cursor: default;
    background: var(--surface);
    color: var(--ink);
}

.polar-pair-button {
    align-self: end;
    min-height: 38px;
    height: 38px;
    padding: 7px 9px;
}

.personal-details-status {
    grid-column: 1 / -1;
    min-height: 16px;
    margin: 0;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.training-week-form {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.training-week-form legend {
    padding: 0 4px;
    color: var(--ink);
    font: 600 13px Arial, sans-serif;
}

.training-week-grid {
    display: grid;
    gap: 6px;
}

.training-week-row {
    display: grid;
    grid-template-columns: 96px repeat(4, minmax(0, 1fr));
    gap: 7px;
    align-items: center;
}

.training-week-row>strong,
.training-week-header>span {
    min-width: 0;
    color: var(--ink);
    font: 600 12px/1.25 Arial, sans-serif;
}

.training-week-header {
    min-height: 20px;
    color: var(--muted);
}

.training-week-header>span:not(:first-child) {
    color: var(--muted);
}

.training-week-row select,
.training-week-row input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 13px Arial, sans-serif;
}

.training-week-status {
    min-height: 16px;
    margin: 9px 0 0;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

@media (max-width: 600px) {
    .personal-details-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .training-week-header {
        display: none;
    }

    .training-week-grid {
        gap: 10px;
    }

    .training-week-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        padding-top: 8px;
        border-top: 1px solid var(--line);
    }

    .training-week-row>strong {
        grid-column: 1 / -1;
    }

    .training-week-row input {
        grid-column: 1 / -1;
    }
}

.admin-swimmer-registration-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    margin-top: 6px;
}

.admin-swimmer-registration-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--teal);
    font: 600 12px/1.2 Arial, sans-serif;
    text-align: center;
    white-space: normal;
}

.admin-swimmer-registration-actions button:hover:not(:disabled),
.admin-swimmer-registration-actions button:focus-visible {
    background: #e7f3f0;
}

.admin-swimmer-registration-actions button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.admin-swimmer-maintenance-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
}

.admin-swimmer-maintenance-actions>span,
.admin-swimmer-maintenance-actions button {
    min-width: 0;
}

.admin-swimmer-maintenance-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 600 12px/1.2 Arial, sans-serif;
    text-align: center;
    white-space: normal;
}

.swimmer-administration-workspace {
    max-width: 880px;
}

.swimmer-administration-introduction {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.swimmer-administration-introduction h4,
.swimmer-administration-introduction p {
    margin: 0;
}

.swimmer-administration-introduction p {
    margin-top: 5px;
    color: var(--muted);
    font: 14px/1.45 Arial, sans-serif;
}

.swimmer-administration-workspace .admin-swimmer-profile-controls {
    gap: 12px;
}

@media (max-width: 600px) {
    .admin-swimmer-registration-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-swimmer-maintenance-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

.admin-swimmer-profile-controls>select,
.admin-swimmer-profile-selectors>select,
.admin-swimmer-navigation select {
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.admin-swimmer-navigation {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
    align-items: center;
}

.editera-workspace {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 1040px;
    padding: 20px;
}

.admin-builder .editera-workspace .editera-workspace-header {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 12px;
    width: 100% !important;
    align-self: stretch !important;
    margin-left: 0 !important;
}

.admin-builder .editera-workspace .editera-workspace-header>button {
    margin-left: 0 !important;
    justify-self: start !important;
}

.admin-builder .editera-workspace .editera-workspace-header .analysis-mode-title {
    flex: 0 0 auto !important;
}

.editera-workspace-header h4,
.editera-editor h5 {
    margin: 0;
}

.editera-workspace-content {
    display: grid;
    grid-template-columns: minmax(230px, .8fr) minmax(0, 1.4fr);
    gap: 18px;
    align-items: start;
    justify-content: start;
    width: 100%;
}

.editera-record-list {
    display: grid;
    gap: 7px;
}

.editera-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    cursor: pointer;
}

.editera-avatar-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    min-width: 0;
    min-height: 34px;
    padding: 5px 11px 5px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.editera-avatar-chip-image,
.editera-avatar-chip-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
}

.editera-avatar-chip-fallback {
    background: linear-gradient(135deg, #dfe7ea, #b8c3cb);
    color: var(--nav);
    font-size: 10px;
    font-weight: 700;
}

.editera-avatar-chip-name {
    overflow: hidden;
    color: var(--ink);
    font: 600 13px Arial, sans-serif;
    text-overflow: ellipsis;
}

.editera-record:hover,
.editera-record:focus-within {
    border-color: var(--teal);
    background: var(--surface);
}

.editera-record strong,
.editera-record span {
    display: block;
    overflow-wrap: anywhere;
}

.editera-record span,
.editera-notice,
.editera-empty {
    color: var(--muted);
    font-size: 13px;
}

.editera-record .training-dashboard-menu-wrap {
    position: relative;
    flex: 0 0 auto;
}

.editera-record .training-dashboard-menu {
    right: 0;
    left: auto;
    z-index: 4;
}

.trainer-catalog-workspace {
    max-width: 1240px;
}

.group-catalog-workspace {
    max-width: 1240px;
}

.trainer-catalog-workspace .editera-workspace-content {
    grid-template-columns: minmax(0, 1fr);
}

.group-catalog-workspace .editera-workspace-content {
    grid-template-columns: minmax(0, 1fr);
}

.trainer-catalog-workspace .editera-record-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.group-catalog-workspace .editera-record-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.trainer-catalog-workspace .editera-notice,
.trainer-catalog-workspace .editera-empty,
.trainer-catalog-filters {
    grid-column: 1 / -1;
}

.group-catalog-workspace .editera-notice,
.group-catalog-workspace .editera-empty,
.group-catalog-filters {
    grid-column: 1 / -1;
}

.trainer-catalog-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.trainer-catalog-filters label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 600 12px/1.2 Arial, sans-serif;
}

.trainer-catalog-filters input,
.trainer-catalog-filters select {
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
}

.group-catalog-filters {
    display: grid;
    grid-template-columns: minmax(155px, 1fr) auto auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.group-catalog-filters label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 600 12px/1.2 Arial, sans-serif;
}

.group-catalog-filters input,
.group-catalog-filters select {
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 14px/1.25 Arial, sans-serif;
}

.group-catalog-filters select,
.group-catalog-filters input:not([type="checkbox"]) {
    width: 100%;
    box-sizing: border-box;
}

.group-catalog-filters .group-catalog-system-filter {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}

.group-catalog-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.group-catalog-actions .editera-notice {
    margin: 0;
    text-align: right;
}

.group-catalog-actions button {
    flex: 0 0 auto;
}

.trainer-catalog-card {
    position: relative;
    display: block;
    min-height: 176px;
    padding: 14px;
    border-radius: 6px;
    background: var(--surface);
}

.trainer-catalog-card>div:first-child {
    display: grid;
    gap: 10px;
    padding-right: 38px;
}

.trainer-catalog-card-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.trainer-catalog-avatar.simbot-avatar,
.trainer-catalog-avatar.simbot-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    --avatar-size: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
}

.trainer-catalog-avatar.simbot-avatar-fallback {
    background: #e1ecec;
    color: var(--nav);
    font: 700 12px Arial, sans-serif;
}

.trainer-catalog-card-identity strong {
    color: var(--ink);
    font-size: 15px;
}

.trainer-catalog-role {
    display: inline-block !important;
    margin-top: 2px;
    color: var(--teal-dark);
    font: 700 12px Arial, sans-serif;
}

.trainer-catalog-groups,
.trainer-catalog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 20px;
    color: var(--muted);
    font-size: 12px;
}

.trainer-catalog-groups span,
.trainer-catalog-categories span {
    padding: 3px 6px;
    border-radius: 3px;
    background: #e8f3f2;
    color: var(--teal-dark);
    font: 700 11px/1.2 Arial, sans-serif;
}

.trainer-catalog-categories span {
    background: #edf0f5;
    color: #40536a;
}

.trainer-catalog-contact {
    margin: 0;
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
}

.trainer-catalog-card .training-dashboard-menu-wrap {
    position: absolute;
    top: 10px;
    right: 10px;
}

.trainer-catalog-menu-button {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
}

.group-catalog-card {
    position: relative;
    display: block;
    min-height: 160px;
    padding: 14px;
    border-radius: 6px;
    background: var(--surface);
}

.group-catalog-card>div:first-child {
    display: grid;
    flex: 1 1 auto;
    gap: 10px;
    width: 100%;
}

.group-catalog-card-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-right: 42px;
}

.group-catalog-avatar.simbot-avatar,
.group-catalog-avatar.simbot-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    --avatar-size: 40px;
    flex: 0 0 40px;
    border: 1px solid var(--line);
    border-radius: 5px;
    object-fit: cover;
}

.group-catalog-avatar.simbot-avatar-fallback {
    background: #e7f0ec;
    color: #31554b;
    font: 700 12px Arial, sans-serif;
}

.group-catalog-card strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 15px;
}

.group-catalog-system-filter,
.group-system-group-field {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font: 12px/1.2 Arial, sans-serif;
}

.group-catalog-system-filter input {
    width: 13px;
    min-width: 13px;
    height: 13px;
    min-height: 13px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: initial;
    appearance: auto;
}

.group-system-group-field input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.group-catalog-system-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 3px;
    padding: 2px 5px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--muted);
    font: 700 10px/1 Arial, sans-serif;
}

.group-catalog-details,
.group-catalog-next-training {
    margin: 0;
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
}

.group-catalog-trainers,
.group-catalog-readiness {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    min-height: 24px;
    margin: 0;
}

.group-catalog-readiness {
    position: relative;
}

.group-catalog-readiness-label {
    position: absolute;
    bottom: 100%;
    left: 0;
    display: block;
    color: var(--muted);
    font: 700 9px/1 Arial, sans-serif;
    pointer-events: none;
}

.group-catalog-trainers {
    color: var(--muted);
    font: 12px/1 Arial, sans-serif;
}

.group-catalog-trainer-avatar.simbot-avatar,
.group-catalog-trainer-avatar.simbot-avatar-fallback {
    width: 24px;
    height: 24px;
    --avatar-size: 24px;
    border: 1px solid var(--surface);
    border-radius: 50%;
}

.group-catalog-readiness-missing {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 6px;
    border-radius: 3px;
    font: 700 11px/1 Arial, sans-serif;
}

.group-catalog-readiness-missing {
    width: fit-content;
    color: var(--muted);
    background: color-mix(in srgb, var(--line) 42%, transparent);
}

.group-catalog-readiness .overview-week-pulse-badge {
    padding-inline: 3px;
    font-size: 8px;
}

.group-catalog-card .training-dashboard-menu-wrap {
    position: absolute;
    top: 10px;
    right: 10px;
}

.editera-editor {
    display: grid;
    justify-items: start;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.editera-editor:empty {
    display: none;
}

.editera-editor>label,
.editera-membership {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font: 13px Arial, sans-serif;
}

.editera-editor input,
.editera-editor select,
.editera-editor textarea {
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.editera-editor textarea {
    width: min(100%, 460px);
    resize: vertical;
}

.trainer-editor-backdrop {
    z-index: 45;
}

.trainer-editor-modal {
    width: min(760px, calc(100vw - 40px));
    max-height: calc(100dvh - 40px);
    padding: 0;
    overflow: hidden;
}

.trainer-editor-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}

.trainer-editor-modal-header h5 {
    margin: 0;
    color: var(--nav);
    font-size: 18px;
}

.editor-modal-header-avatar.simbot-avatar,
.editor-modal-header-avatar.simbot-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    --avatar-size: 32px;
    flex: 0 0 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
}

.editor-modal-header-avatar.simbot-avatar-fallback {
    background: #e1ecec;
    color: var(--nav);
    font: 700 10px Arial, sans-serif;
}

.group-editor-modal .editor-modal-header-avatar.simbot-avatar,
.group-editor-modal .editor-modal-header-avatar.simbot-avatar-fallback {
    background: #e7f0ec;
    color: #31554b;
}

.trainer-editor-modal-back {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--nav);
    font-size: 22px;
    line-height: 1;
}

.trainer-editor-modal-content {
    display: grid;
    gap: 12px;
    max-height: calc(100dvh - 98px);
    overflow-y: auto;
    padding: 16px;
}

.trainer-editor-modal-content>label,
.trainer-editor-modal-content .editera-membership {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font: 13px Arial, sans-serif;
}

.trainer-editor-modal .participation-category-picker,
.trainer-editor-modal .editera-membership {
    background: var(--surface-muted);
}

.trainer-editor-modal-content input,
.trainer-editor-modal-content select,
.trainer-editor-modal-content textarea {
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.trainer-editor-modal-content textarea {
    width: min(100%, 560px);
    resize: vertical;
}

.group-editor-backdrop {
    z-index: 45;
}

.group-editor-modal {
    width: min(1080px, calc(100vw - 40px));
    max-height: calc(100dvh - 40px);
    padding: 0;
    overflow: hidden;
}

.group-editor-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}

.group-editor-modal-header h5 {
    margin: 0;
    color: var(--nav);
    font-size: 18px;
}

.group-editor-modal-back {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--nav);
    font-size: 22px;
    line-height: 1;
}

.group-editor-modal-content {
    max-height: calc(100dvh - 98px);
    overflow-y: auto;
    padding: 16px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
}

.group-editor-modal-content.editera-group-editor {
    justify-items: stretch;
    gap: 14px;
}

.group-editor-modal-content .editera-group-name-field {
    display: grid;
    gap: 6px;
    width: 100%;
    max-width: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--muted);
    font: 13px Arial, sans-serif;
}

.group-editor-modal-content .editera-group-name-field input {
    width: 100%;
    font-size: 15px;
    font-weight: 600;
}

.group-editor-modal-content .editera-group-actions {
    justify-content: flex-end;
    padding: 0;
    border: 0;
}

.group-editor-modal-content .editera-group-profile,
.group-editor-modal-content .editera-membership {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.admin-swimmer-profile.swimmer-catalog-workspace {
    max-width: 1240px;
}

.swimmer-catalog {
    display: grid;
    gap: 12px;
    width: 100%;
}

.swimmer-catalog-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(125px, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.swimmer-catalog-filters label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 600 12px/1.2 Arial, sans-serif;
}

.swimmer-catalog-filters input,
.swimmer-catalog-filters select {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 14px/1.25 Arial, sans-serif;
}

.catalog-text-search {
    display: grid;
    grid-column: 1 / -1;
    gap: 5px;
    min-width: 0;
    margin: 0 0 12px;
    color: var(--muted);
    font: 600 12px/1.2 Arial, sans-serif;
}

.catalog-text-search input {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 14px/1.25 Arial, sans-serif;
}

@media (max-width: 900px) {

    .trainer-catalog-filters,
    .group-catalog-filters,
    .swimmer-catalog-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {

    .trainer-catalog-filters,
    .group-catalog-filters,
    .swimmer-catalog-filters {
        grid-template-columns: minmax(0, 1fr);
    }
}

.swimmer-catalog-status {
    margin: 0;
    color: var(--muted);
    font: 13px/1.35 Arial, sans-serif;
}

.swimmer-catalog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.swimmer-catalog-card {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 156px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    cursor: pointer;
}

.swimmer-catalog-card:hover,
.swimmer-catalog-card:focus-within {
    border-color: var(--teal);
    box-shadow: 0 2px 8px rgba(23, 50, 58, .08);
}

.swimmer-catalog-card-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.swimmer-catalog-card-identity>div {
    min-width: 0;
}

.swimmer-catalog-card strong,
.swimmer-catalog-card-identity span {
    display: block;
    overflow-wrap: anywhere;
}

.swimmer-catalog-card strong {
    color: var(--ink);
    font-size: 15px;
}

.swimmer-catalog-card-identity span,
.swimmer-catalog-status-line {
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
}

.swimmer-catalog-avatar.simbot-avatar,
.swimmer-catalog-avatar.simbot-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    --avatar-size: 40px;
    flex: 0 0 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
}

.swimmer-catalog-avatar.simbot-avatar-fallback {
    background: #e1ecec;
    color: var(--nav);
    font: 700 12px Arial, sans-serif;
}

.swimmer-catalog-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 20px;
    color: var(--muted);
    font-size: 12px;
}

.swimmer-catalog-groups span {
    padding: 3px 6px;
    border-radius: 3px;
    background: #e8f3f2;
    color: var(--teal-dark);
}

.swimmer-catalog-status-line {
    margin: 0;
}

.swimmer-editor-backdrop {
    z-index: 45;
}

.swimmer-editor-modal {
    width: min(1080px, calc(100vw - 40px));
    max-height: calc(100dvh - 40px);
    padding: 0;
    overflow: hidden;
}

.swimmer-editor-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}

.swimmer-editor-modal-header h5 {
    margin: 0;
    color: var(--nav);
    font-size: 18px;
}

.swimmer-editor-modal-content {
    max-height: calc(100dvh - 98px);
    overflow-y: auto;
    padding: 16px;
}

.swimmer-editor-profile-surface {
    max-width: none;
    padding: 0;
}

.swimmer-editor-modal-content .admin-swimmer-profile-content {
    display: grid;
    gap: 14px;
}

.swimmer-editor-modal-content .admin-swimmer-profile-selectors {
    grid-template-columns: auto minmax(260px, 1fr) auto minmax(160px, .7fr);
    align-items: end;
}

.swimmer-editor-modal-content .admin-swimmer-profile-selector-label,
.swimmer-editor-modal-content .admin-swimmer-profile-group-label {
    padding-bottom: 12px;
}

.trainer-editor-access-controls {
    display: grid;
    grid-template-columns: minmax(120px, .7fr) minmax(190px, 1fr) auto;
    gap: 12px;
    align-items: end;
    grid-column: 1 / -1;
    max-width: 100%;
}

.trainer-editor-access-controls>label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font: 13px Arial, sans-serif;
}

.trainer-editor-access-controls .trainer-report-exclusion {
    min-height: 40px;
    padding-bottom: 1px;
    white-space: nowrap;
}

.trainer-editor-modal-content .trainer-report-exclusion {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font: 600 14px/1.35 Arial, sans-serif;
}

.trainer-editor-modal-content .trainer-report-exclusion input {
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
}

.trainer-editor-modal-content .personal-details-form .trainer-editor-name-field,
.trainer-editor-modal-content .personal-details-form .trainer-editor-description-field,
.trainer-editor-modal-content .personal-details-form .trainer-editor-password-confirmation {
    grid-column: 1 / -1;
}

.trainer-editor-modal-content .personal-details-form .trainer-editor-name-field,
.trainer-editor-modal-content .personal-details-form .trainer-editor-description-field,
.trainer-editor-modal-content .personal-details-form .trainer-editor-password-confirmation {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font: 13px Arial, sans-serif;
}

.trainer-editor-modal-content .personal-details-form .trainer-editor-description-field textarea {
    width: 100%;
}

.editera-group-editor {
    justify-items: stretch;
    gap: 16px;
}

.editera-group-name-field {
    width: min(100%, 460px);
}

.editera-group-name-field input {
    width: 100%;
    font-size: 15px;
    font-weight: 600;
}

.editera-group-header-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    width: 100%;
}

.editera-group-header-controls .group-system-group-field {
    margin-right: 0;
}

.editera-group-header-controls .editera-group-schedule-button {
    margin-left: auto;
    min-height: 36px;
    padding: 6px 9px;
    font-size: 12px;
}

.editera-group-actions {
    display: flex;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.editera-group-profile {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(180px, .85fr);
    gap: 14px 18px;
    align-items: start;
    padding: 2px 0 18px;
    border-bottom: 1px solid var(--line);
}

.editera-group-profile h6 {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--nav);
    font-size: 14px;
}

.editera-group-profile>label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font: 13px Arial, sans-serif;
}

.editera-group-profile textarea {
    width: 100%;
    height: 132px;
    min-height: 132px;
    max-height: 132px;
}

.editera-group-image-status {
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
}

.group-motto-image-card,
.group-profile-actions {
    grid-column: 1 / -1;
}

.group-motto-image-card {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.group-motto-image-thumbnail,
.group-motto-image-placeholder {
    grid-row: 1;
    grid-column: 1;
    width: 80px;
    height: 60px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.group-motto-image-thumbnail {
    object-fit: cover;
    cursor: zoom-in;
}

.group-motto-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font: 600 11px Arial, sans-serif;
}

.group-motto-image-placeholder[hidden] {
    display: none;
}

.group-motto-image-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.group-motto-image-copy strong {
    color: var(--ink);
    font-size: 13px;
}

.group-motto-image-actions,
.group-profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.group-motto-image-actions button,
.group-profile-actions button {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 12px;
}

.group-motto-image-viewer-backdrop {
    z-index: 60;
}

.group-motto-image-viewer {
    position: relative;
    display: grid;
    place-items: center;
    width: min(960px, calc(100vw - 40px));
    max-height: calc(100dvh - 40px);
    padding: 16px;
    overflow: hidden;
}

.group-motto-image-viewer img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 72px);
    object-fit: contain;
}

.group-motto-image-viewer-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    min-height: 36px;
    padding: 6px 9px;
}

.group-schedule-modal {
    width: min(1080px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    padding: 24px;
}

.group-schedule-modal h3,
.group-schedule-modal p {
    margin: 0;
}

.group-schedule-modal>p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.group-schedule-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 18px 0;
}

.group-schedule-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.group-schedule-row h4 {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    color: var(--nav);
    font-size: 14px;
}

.group-schedule-session {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 1.25fr) auto;
    gap: 8px;
    align-items: end;
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.group-schedule-session-title {
    align-self: center;
    color: var(--nav);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.group-schedule-session label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

.group-schedule-session input,
.group-schedule-session select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.group-schedule-session .group-schedule-active {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    color: var(--ink);
    white-space: nowrap;
}

.group-schedule-session .group-schedule-active input {
    width: 18px;
    min-height: 18px;
    padding: 0;
}

@media (max-width: 640px) {
    .group-schedule-modal {
        width: min(100vw - 24px, 920px);
        max-height: calc(100vh - 24px);
        padding: 16px;
    }

    .group-schedule-grid,
    .group-schedule-row {
        grid-template-columns: 1fr;
    }

    .group-schedule-session {
        grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr) auto;
        gap: 5px;
        padding: 7px;
    }

    .group-schedule-session label,
    .group-schedule-session-title {
        font-size: 11px;
    }

    .group-schedule-session input,
    .group-schedule-session select {
        min-height: 36px;
        padding: 6px;
    }
}

.editera-membership {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.editera-membership legend {
    grid-column: 1 / -1;
    padding: 0 4px;
    color: var(--nav);
    font-weight: bold;
}

.editera-membership label {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.editera-membership input[type="checkbox"] {
    flex: 0 0 auto;
    min-height: 18px;
    width: 18px;
    margin: 0;
    padding: 0;
}

.participation-category-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    width: min(100%, 760px);
    gap: 8px 12px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font: 13px Arial, sans-serif;
}

.participation-category-picker legend {
    padding: 0 4px;
    color: var(--nav);
    font-size: 13px;
    font-weight: bold;
}

.participation-category-picker label {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 28px;
    gap: 7px;
    overflow-wrap: anywhere;
}

.participation-category-picker input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
}

.swimmer-editor-modal .participation-category-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-muted);
}

.workspace-sport-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0;
}

.workspace-sport-control[hidden] {
    display: none;
}

.event-editor .sport-picker {
    grid-column: 1 / -1;
}

.workspace-sport-control select {
    box-sizing: border-box;
    width: 145px;
    max-width: 100%;
    min-height: 36px;
    padding: 5px 8px;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0;
}

.sport-picker,
.swimmer-editor-modal .sport-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    gap: 6px 10px;
    padding: 8px;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0;
}

.sport-picker legend {
    font-size: 13px;
    line-height: 1.35;
}

.sport-picker label {
    min-width: 0;
    min-height: 36px;
    font-size: 13px;
    line-height: 1.35;
}

.sport-picker input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
}

.roles-editor {
    justify-items: stretch;
}

.roles-workspace {
    gap: 18px;
    box-sizing: border-box;
}

.roles-risk-guide {
    display: grid;
    align-self: flex-start;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    text-align: left;
}

.roles-risk-guide-item {
    display: grid;
    gap: 4px;
    justify-items: start;
    min-width: 0;
    padding: 9px 10px;
    border-left: 4px solid currentColor;
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 12px;
    text-align: left;
}

.roles-risk-guide-item>span:last-child {
    color: var(--muted);
    line-height: 1.35;
}

.roles-risk-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 3px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.roles-risk-low {
    color: #176b43;
}

.roles-risk-low>.roles-risk-badge,
.roles-risk-badge.roles-risk-low {
    background: #e5f4eb;
}

.roles-risk-medium {
    color: #8a5a00;
}

.roles-risk-medium>.roles-risk-badge,
.roles-risk-badge.roles-risk-medium {
    background: #fff3c7;
}

.roles-risk-high {
    color: #ad2e24;
}

.roles-risk-high>.roles-risk-badge,
.roles-risk-badge.roles-risk-high {
    background: #fde8e6;
}

.roles-role-definition.roles-risk-high,
.roles-swimmer-account.roles-risk-high,
.roles-history.roles-risk-high,
.roles-assignment-list.roles-risk-medium,
.roles-responsibility-list.roles-risk-high {
    border-top: 4px solid currentColor;
}

.roles-role-definition h5,
.roles-swimmer-account h5,
.roles-history h5,
.roles-assignment-list legend,
.roles-responsibility-list legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.roles-workspace>.roles-role-definition,
.roles-workspace>.roles-swimmer-account {
    width: 100%;
    box-sizing: border-box;
}

.roles-role-definition {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 16px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.roles-role-definition h5,
.roles-role-permissions {
    grid-column: 1 / -1;
}

.roles-role-definition h5 {
    margin: 0;
    color: var(--nav);
    font-size: 14px;
}

.roles-form-hint {
    grid-column: 1 / -1;
    margin: -4px 0 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.roles-role-definition>label {
    display: grid;
    gap: 4px;
    color: var(--ink);
    font-size: 13px;
}

.roles-role-definition>label:nth-of-type(3),
.roles-role-definition>label:nth-of-type(4) {
    grid-column: span 1;
}

.roles-role-definition>label:nth-of-type(1),
.roles-role-definition>label:nth-of-type(2) {
    grid-column: span 2;
}

.roles-mode-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.roles-mode-row>label {
    display: grid;
    gap: 4px;
    color: var(--ink);
    font-size: 13px;
}

.roles-effective-summary {
    grid-column: 1 / -1;
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--teal);
    border-radius: 5px;
    background: #eef8f6;
    color: var(--ink);
    font-size: 12px;
}

.roles-effective-summary strong {
    margin-bottom: 3px;
    color: var(--nav);
    font-size: 13px;
}

.roles-save-status {
    grid-column: 1 / -1;
    min-height: 1.2em;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.editera-save-status {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.roles-role-definition input,
.roles-role-definition select {
    min-width: 0;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.roles-role-permissions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.roles-role-permissions>legend,
.roles-role-permissions>fieldset {
    min-width: 0;
}

.roles-role-permissions>legend {
    padding: 0 4px;
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
}

.roles-role-permissions>fieldset {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}

.roles-role-permissions fieldset legend {
    flex: 0 0 100%;
    color: var(--muted);
    font-size: 11px;
}

.roles-role-permissions label {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 2px 4px;
    border-radius: 3px;
    background: var(--surface-muted);
    font-size: 11px;
}

.roles-role-permissions input,
.roles-assignment-list input,
.roles-responsibility-list input {
    flex: 0 0 auto;
    accent-color: var(--teal);
}

.roles-swimmer-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.roles-history {
    display: grid;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.roles-history h5,
.roles-history p {
    margin: 0;
}

.roles-history-list {
    display: grid;
    gap: 6px;
}

.roles-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}

.roles-revoke-button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #ad2e24;
    border-radius: 4px;
    background: #fde8e6;
    color: #8f241c;
    font-weight: 700;
    white-space: nowrap;
}

.roles-revoke-button:hover,
.roles-revoke-button:focus-visible {
    border-color: #7f1d18;
    background: #f9c9c4;
    color: #651812;
}

.roles-history-item>div,
.roles-history-item span,
.roles-history-item small {
    display: block;
}

.roles-history-item span,
.roles-history-item small,
.roles-history-empty {
    color: var(--muted);
    font-size: 11px;
}

.roles-history-item small {
    margin-top: 3px;
}

@media (max-width: 760px) {
    .roles-risk-guide {
        grid-template-columns: minmax(0, 1fr);
    }

    .roles-history-item {
        align-items: stretch;
        flex-direction: column;
    }
}

.roles-swimmer-account h5 {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--nav);
    font-size: 14px;
}

.roles-swimmer-account select,
.roles-swimmer-account input {
    min-width: 0;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.roles-system-role {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.roles-filter {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

.roles-filter select {
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.swimmer-self-panel {
    display: grid;
    gap: 14px;
    max-width: 720px;
}

.swimmer-self-panel h3,
.swimmer-self-panel h4 {
    margin: 0;
    color: var(--nav);
}

.swimmer-self-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swimmer-self-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 0.7fr);
    align-items: center;
    gap: 18px;
}

.swimmer-self-license {
    display: grid;
    gap: 3px;
    padding: 9px 11px;
    border-left: 1px solid var(--line);
}

.swimmer-self-license span {
    color: var(--muted);
    font-size: 12px;
}

.swimmer-self-license strong {
    color: var(--ink);
    font-size: 13px;
}

.swimmer-self-heading .simbot-avatar,
.swimmer-self-heading .simbot-avatar-fallback {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}

@media (max-width: 640px) {
    .swimmer-self-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .swimmer-self-license {
        border-top: 1px solid var(--line);
        border-left: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

.swimmer-self-panel>select {
    width: min(180px, 100%);
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.swimmer-self-controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.swimmer-self-controls>select {
    width: min(180px, 100%);
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.swimmer-self-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.swimmer-self-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
}

.swimmer-self-facts dt,
.swimmer-self-facts dd {
    margin: 0;
    padding: 9px 11px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.swimmer-self-facts dt {
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 12px;
}

.swimmer-self-facts dd {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.swimmer-self-results {
    display: grid;
    gap: 10px;
}

.swimmer-self-results section {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.swimmer-self-results ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.swimmer-self-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.swimmer-self-results-table th,
.swimmer-self-results-table td {
    padding: 8px;
    border-bottom: 1px solid var(--line);

    .pb-split-test-panel {
        display: grid;
        gap: 16px;
    }

    .pb-split-test-controls {
        display: grid;
        grid-template-columns: minmax(240px, 420px);
    }

    .pb-split-test-controls label {
        display: grid;
        gap: 6px;
        font-weight: 700;
    }

    .pb-split-test-records {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .pb-split-test-records section,
    .pb-split-test-splits {
        min-width: 0;
    }

    .pb-split-test-records h4,
    .pb-split-test-splits h4 {
        margin: 0 0 8px;
    }

    .pb-split-test-table {
        width: 100%;
        border-collapse: collapse;
    }

    .pb-split-test-table th,
    .pb-split-test-table td {
        padding: 8px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        vertical-align: top;
    }

    .pb-split-test-table th {
        background: var(--surface-muted);
    }

    .pb-split-test-result {
        padding: 2px 0;
        border: 0;
        border-bottom: 1px solid currentColor;
        border-radius: 0;
        background: transparent;
        color: var(--teal);
        font: inherit;
        font-weight: 700;
    }

    .pb-split-test-splits {
        display: grid;
        gap: 10px;
        padding-top: 4px;
        border-top: 1px solid var(--border);
    }

    @media (max-width: 760px) {

        .pb-split-test-controls,
        .pb-split-test-records {
            grid-template-columns: minmax(0, 1fr);
        }

        .pb-split-test-records {
            gap: 20px;
        }

        .pb-split-test-records section,
        .pb-split-test-splits {
            overflow-x: auto;
        }

        .pb-split-test-table {
            min-width: 620px;
        }
    }

    text-align: left;
    vertical-align: top;
}

.swimmer-self-results-table th {
    color: var(--nav);
    background: var(--surface-muted);
}

/* Resultat keeps the sport choice compact while dense tables remain easy to scan. */
.results-sport-field {
    grid-column: 1 / -1;
    gap: 6px;
}

.results-sport-tabs {
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}

.swimmer-self-results-table :is(th, td) {
    vertical-align: middle;
    text-align: center;
}

.result-table-diving :is(th, td):nth-child(2),
.result-table-diving :is(th, td):nth-child(5),
.result-table-open-water :is(th, td):nth-child(2),
.result-table-open-water :is(th, td):nth-child(5),
.result-table-open-water :is(th, td):nth-child(6),
.result-table-artistic :is(th, td):nth-child(2),
.result-table-artistic :is(th, td):nth-child(4),
.result-table-group-diving :is(th, td):nth-child(1),
.result-table-group-diving :is(th, td):nth-child(3),
.result-table-group-diving :is(th, td):nth-child(6),
.result-table-group-open-water :is(th, td):nth-child(1),
.result-table-group-open-water :is(th, td):nth-child(3),
.result-table-group-open-water :is(th, td):nth-child(6),
.result-table-group-open-water :is(th, td):nth-child(7),
.result-table-group-artistic :is(th, td):nth-child(1),
.result-table-group-artistic :is(th, td):nth-child(3),
.result-table-group-artistic :is(th, td):nth-child(5) {
    text-align: left;
}

@media (max-width: 760px) {
    .swimmer-self-results {
        overflow-x: auto;
    }

    .swimmer-self-results-table {
        min-width: 620px;
    }
}

.diving-result-details {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
}

.swimmer-self-chart {
    width: 100%;
    height: auto;
    min-height: 200px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.pb-split-test-panel {
    display: grid;
    gap: 18px;
    max-width: 1180px;
}

.pb-split-test-controls {
    display: grid;
    grid-template-columns: minmax(260px, 420px);
}

.pb-split-test-controls label {
    display: grid;
    gap: 6px;
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
}

.pb-split-test-controls select {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.pb-split-test-records {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.pb-split-test-records section,
.pb-split-test-splits {
    min-width: 0;
}

.pb-split-test-records h4,
.pb-split-test-splits h4 {
    margin: 0 0 9px;
    color: var(--nav);
    font-size: 15px;
}

.pb-split-test-splits h5 {
    margin: 6px 0 0;
    color: var(--nav);
    font-size: 13px;
}

.pb-split-test-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pb-split-test-table th,
.pb-split-test-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.pb-split-test-table th {
    color: var(--nav);
    background: var(--surface-muted);
    font-size: 12px;
}

.pb-split-test-table tbody tr:nth-child(even) td {
    background: #f4f6f6;
}

.pb-split-test-result {
    padding: 2px 0;
    border-bottom: 1px solid currentColor;
    color: var(--teal);
    font-weight: 700;
}

.pb-split-test-splits {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    background: var(--surface);
}

.pb-split-test-expanded-row>td {
    padding: 10px 9px 14px;
    background: var(--surface-muted);
}

.pb-split-test-inline-details {
    display: grid;
    gap: 8px;
}

.pb-split-test-inline-details h4,
.pb-split-test-inline-details p {
    margin: 0;
}

.pb-split-test-inline-details h4 {
    color: var(--nav);
    font-size: 14px;
}

.pb-split-test-progress {
    display: grid;
    gap: 3px;
    color: var(--muted);
    font-size: 13px;
}

.pb-split-test-progress p:last-child {
    color: var(--ink);
    font-weight: 700;
}

.pb-split-test-dialog {
    width: min(1120px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 20px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 22px 60px rgba(23, 50, 58, 0.28);
}

.pb-split-test-dialog::backdrop {
    background: rgba(23, 50, 58, 0.38);
}

.pb-split-test-dialog .modal-actions {
    margin-top: 16px;
}

.pb-split-test-dialog-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pb-split-test-dialog-header h4 {
    flex: 1 1 auto;
}

.pb-split-test-dialog-header .modal-actions {
    flex: 0 0 auto;
    margin-top: 0;
    margin-left: auto;
}

.pb-split-test-dialog .modal-actions button {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 5px;
    font-weight: 700;
}

.pb-split-test-dialog .primary-action {
    background: var(--teal);
}

.pb-split-test-dialog .primary-action:hover {
    background: var(--teal-dark);
}

.pb-split-test-expanded-row .pb-split-test-table {
    background: var(--surface);
}

.pb-split-test-expanded-row .pb-split-test-table .is-200 td {
    background: #edf8f6;
}

.pb-split-test-expanded-row .pb-split-test-table .is-400 td {
    background: #fff5e8;
}

.pb-split-test-source {
    color: var(--muted);
    font-size: 13px;
}

.pb-split-test-checkpoints {
    display: grid;
    gap: 8px;
}

.pb-split-test-checkpoint-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
    gap: 7px;
}

.pb-split-test-checkpoint {
    display: grid;
    gap: 3px;
    min-height: 54px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    font-size: 12px;
}

.pb-split-test-checkpoint strong {
    color: var(--nav);
    font-size: 15px;
}

.pb-split-test-checkpoint.is-200 {
    border-color: var(--teal);
}

.pb-split-test-checkpoint.is-400 {
    border-color: var(--accent);
    background: #fff5e8;
}

@media (max-width: 760px) {

    .pb-split-test-controls,
    .pb-split-test-records {
        grid-template-columns: minmax(0, 1fr);
    }

    .pb-split-test-records section,
    .pb-split-test-splits {
        overflow-x: auto;
    }

    .pb-split-test-table {
        min-width: 500px;
    }

    .pb-split-test-checkpoint-list {
        min-width: 500px;
        grid-template-columns: repeat(4, minmax(106px, 1fr));
    }

    .pb-split-test-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        padding: 14px;
    }

    .pb-split-test-dialog-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .pb-split-test-dialog-header .modal-actions {
        margin-left: 0;
    }
}

.swimmer-self-point-info {
    margin: 0;
    padding: 8px 10px;
    border-left: 3px solid var(--accent);
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 13px;
}

.swimmer-overview-panel {
    display: grid;
    gap: 16px;
    max-width: 920px;
}

.swimmer-overview-controls label {
    display: grid;
    gap: 6px;
    width: min(320px, 100%);
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
}

.swimmer-overview-controls select {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.swimmer-overview-content {
    display: grid;
    gap: 16px;
    min-height: 48px;
    color: var(--muted);
}

.swimmer-overview-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto);
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--nav);
}

.swimmer-overview-identity>.simbot-avatar,
.swimmer-overview-identity>.simbot-avatar-fallback {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
}

.swimmer-overview-identity h3,
.swimmer-overview-identity p,
.swimmer-overview-details h4,
.swimmer-overview-results h4 {
    margin: 0;
}

.swimmer-overview-identity h3,
.swimmer-overview-details h4,
.swimmer-overview-results h4 {
    color: var(--nav);
}

.swimmer-overview-identity p {
    margin-top: 3px;
    font-size: 13px;
}

.swimmer-overview-groups {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    text-align: right;
    color: var(--muted);
}

.swimmer-overview-group-avatar.simbot-avatar,
.swimmer-overview-group-avatar.simbot-avatar-fallback {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}

.swimmer-overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
}

.swimmer-overview-metrics dt,
.swimmer-overview-metrics dd {
    margin: 0;
    padding: 9px 11px;
}

.swimmer-overview-metrics dt {
    color: var(--muted);
    font-size: 12px;
}

.swimmer-overview-metrics dd {
    border-left: 1px solid var(--line);
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
}

.swimmer-overview-qualification-metric {
    font-size: 12px !important;
    white-space: nowrap;
}

.swimmer-overview-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.swimmer-overview-world-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.swimmer-overview-world-points section {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.swimmer-overview-world-points h4,
.swimmer-overview-world-points p {
    margin: 0;
}

.swimmer-overview-world-points h4 {
    color: var(--nav);
}

.swimmer-overview-world-points p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.swimmer-overview-world-points table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 13px;
}

.swimmer-overview-world-points th,
.swimmer-overview-world-points td {
    padding: 6px 5px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.swimmer-overview-world-points th {
    color: var(--muted);
}

.swimmer-overview-world-points td:last-child,
.swimmer-overview-world-points th:last-child {
    text-align: right;
    font-weight: 700;
}

.world-aquatics-panel {
    display: grid;
    align-items: start;
    gap: 20px;
}

.world-aquatics-controls {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.35fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 6px;
    background: var(--surface-muted);
}

.world-aquatics-controls label {
    display: grid;
    position: relative;
    gap: 7px;
    min-width: 0;
    color: var(--nav);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.world-aquatics-controls>label::after {
    position: absolute;
    right: 15px;
    bottom: 18px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--nav);
    border-bottom: 2px solid var(--nav);
    content: "";
    pointer-events: none;
    transform: rotate(45deg);
}

.world-aquatics-controls select {
    min-height: 44px;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    appearance: none;
}

.world-aquatics-sex-filters {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    align-self: center;
    align-content: start;
    gap: 7px 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.world-aquatics-sex-filters legend {
    position: relative;
    top: -18px;
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    color: var(--nav);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.world-aquatics-sex-filters label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    cursor: pointer;
}

.world-aquatics-sex-filters input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.world-aquatics-controls .world-aquatics-club-option {
    color: #b42318;
    font-weight: 700;
}

.swimming-records-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
    width: 100%;
}

.swimming-records-controls {
    display: grid;
    grid-template-columns: minmax(300px, 1.4fr) max-content max-content minmax(220px, 1fr);
    align-items: end;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 6px;
    background: var(--surface-muted);
}

.swimming-record-tabs,
.swimming-record-pools {
    display: inline-flex;
    gap: 6px;
    min-width: 0;
}

.swimming-record-tab,
.swimming-record-pool {
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--nav);
    font: 700 12px/1.2 Arial, sans-serif;
    letter-spacing: 0;
    cursor: pointer;
}

.swimming-record-tab.is-active,
.swimming-record-pool.is-active {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
}

.swimming-records-controls select,
.swimming-records-controls input {
    min-width: 0;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    font: 600 13px/1.25 Arial, sans-serif;
}

.swimming-records-content {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.swimming-record-source,
.swimming-record-empty,
.swimming-record-admin-intro {
    margin: 0;
    color: var(--muted);
    font: 12px/1.45 Arial, sans-serif;
}

.swimming-record-source a {
    color: var(--teal-dark);
    font-weight: 700;
}

.swimming-record-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.swimming-record-table {
    width: 100%;
    min-width: 910px;
    border-collapse: collapse;
    font: 12px/1.3 Arial, sans-serif;
}

.swimming-record-table th,
.swimming-record-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.swimming-record-table th {
    background: var(--surface-muted);
    color: var(--nav);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.swimming-record-table td:nth-child(3) {
    color: var(--teal-dark);
    font-weight: 700;
    white-space: nowrap;
}

.swimming-record-table tr:last-child td {
    border-bottom: 0;
}

.swimming-record-admin-panel {
    display: grid;
    gap: 16px;
    max-width: 820px;
}

.swimming-record-admin-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.swimming-record-refresh {
    min-height: 46px;
    padding: 9px 12px;
    font: 700 13px/1.2 Arial, sans-serif;
}

@media (max-width: 760px) {

    .swimming-records-controls,
    .swimming-record-admin-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .swimming-record-tabs,
    .swimming-record-pools {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .swimming-record-pools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.world-aquatics-club-dialog {
    width: min(440px, calc(100% - 32px));
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.world-aquatics-club-dialog::backdrop {
    background: rgba(0, 0, 0, 0.42);
}

.world-aquatics-club-dialog h2,
.world-aquatics-club-dialog p {
    margin: 0;
}

.world-aquatics-club-dialog h2 {
    color: var(--nav);
    font-size: 18px;
}

.world-aquatics-club-dialog p {
    margin-top: 10px;
    line-height: 1.5;
}

.world-aquatics-club-dialog .modal-actions {
    margin-top: 18px;
}

.world-aquatics-content {
    display: grid;
    gap: 16px;
    width: 100%;
    color: var(--muted);
}

.world-aquatics-build-status {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--ink);
}

.world-aquatics-build-status h4,
.world-aquatics-build-step {
    margin: 0;
}

.world-aquatics-build-status h4 {
    font: 700 14px/1.25 Arial, sans-serif;
}

.world-aquatics-build-step {
    color: var(--teal);
    font: 600 13px/1.35 Arial, sans-serif;
}

.world-aquatics-build-facts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.world-aquatics-build-facts div {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.world-aquatics-build-facts dt {
    color: var(--muted);
    font: 700 10px/1.2 Arial, sans-serif;
    letter-spacing: 0;
    text-transform: uppercase;
}

.world-aquatics-build-facts dd {
    overflow-wrap: anywhere;
    margin: 3px 0 0;
    color: var(--ink);
    font: 600 13px/1.3 Arial, sans-serif;
}

.world-aquatics-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.world-aquatics-metric {
    display: grid;
    gap: 4px;
    min-height: 64px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
    align-content: center;
}

.world-aquatics-metric-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.world-aquatics-metric-value {
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
}

.world-aquatics-grid,
.world-aquatics-triple {
    display: grid;
    gap: 12px;
}

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

.world-aquatics-triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.world-aquatics-report {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.world-aquatics-report h4,
.world-aquatics-report p {
    margin: 0;
}

.world-aquatics-report h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nav);
}

.world-aquatics-report-toggle {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
    cursor: pointer;
}

.world-aquatics-print-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    margin-left: auto;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--nav);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.world-aquatics-print-action:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.world-aquatics-report-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.world-aquatics-report p {
    margin-top: 8px;
    font-size: 13px;
}

.world-aquatics-table-wrap {
    overflow-x: auto;
}

.world-aquatics-report table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    color: var(--ink);
    font-size: 13px;
}

.world-aquatics-report th,
.world-aquatics-report td {
    padding: 6px 5px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.world-aquatics-report th {
    color: var(--muted);
}

.world-aquatics-report td:last-child,
.world-aquatics-report th:last-child {
    text-align: right;
}

.swimmer-overview-training {
    display: grid;
    gap: 8px;
}

.swimmer-overview-training>h4,
.swimmer-overview-training-periods h5,
.swimmer-overview-training-breakdown h6 {
    margin: 0;
    color: var(--nav);
}

.swimmer-overview-training-periods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.swimmer-overview-training-periods section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.swimmer-overview-training-periods h5 {
    display: flex;
    grid-column: 1 / -1;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.swimmer-overview-training-duration {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.swimmer-overview-training-totals {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-column: 1 / -1;
    gap: 4px 10px;
    margin: 0;
    font-size: 13px;
}

.swimmer-overview-training-totals dt {
    color: var(--muted);
}

.swimmer-overview-training-totals dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
    text-align: right;
}

.swimmer-overview-training-comparison {
    grid-column: 1 / -1;
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.swimmer-overview-training-breakdown h6 {
    font-size: 12px;
}

.swimmer-overview-training-breakdown ul {
    display: grid;
    gap: 3px;
    margin: 5px 0 0;
    padding-left: 16px;
    color: var(--ink);
    font-size: 12px;
}

.swimmer-overview-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.swimmer-overview-insights section {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.swimmer-overview-insights h4,
.swimmer-overview-insights p,
.swimmer-overview-competitions ul {
    margin: 0;
}

.swimmer-overview-insights h4 {
    color: var(--nav);
}

.swimmer-overview-insights p,
.swimmer-overview-competitions ul {
    color: var(--ink);
    font-size: 13px;
}

.swimmer-overview-competitions ul {
    display: grid;
    gap: 4px;
    padding-left: 18px;
}

.swimmer-overview-details section,
.swimmer-overview-results {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.swimmer-overview-details p,
.swimmer-overview-results ul {
    margin: 0;
    color: var(--ink);
    font-size: 13px;
}

.swimmer-overview-results ul {
    display: grid;
    gap: 4px;
    padding-left: 18px;
}

.swimmer-overview-link {
    justify-self: start;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--teal);
    font-size: 13px;
    font-weight: 700;
}

.swimmer-overview-link:hover,
.swimmer-overview-link:focus-visible {
    background: #e2eeeb;
}

@media (max-width: 600px) {
    .world-aquatics-build-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .world-aquatics-sex-filters legend {
        top: 0;
    }

    .swimmer-self-controls {
        flex-wrap: wrap;
    }

    .swimmer-self-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .swimmer-self-results {
        overflow-x: auto;
    }

    .swimmer-self-results-table {
        min-width: 580px;
    }

    .swimmer-overview-identity {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .swimmer-overview-groups {
        grid-column: 1 / -1;
        justify-content: flex-start;
        text-align: left;
    }

    .swimmer-overview-metrics,
    .swimmer-overview-details,
    .swimmer-overview-world-points,
    .swimmer-overview-insights,
    .swimmer-overview-training-periods,
    .world-aquatics-grid,
    .world-aquatics-triple,
    .world-aquatics-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .world-aquatics-controls {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
    }

    .swimming-records-controls,
    .swimming-record-admin-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .swimming-record-tabs,
    .swimming-record-pools {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .swimming-record-pools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .swimming-record-tab,
    .swimming-record-pool {
        min-height: 42px;
        padding: 8px 6px;
        font-size: 12px;
    }

    .swimmer-overview-world-points section {
        overflow-x: auto;
    }

    .swimmer-overview-world-points table {
        min-width: 510px;
    }

    .world-aquatics-report table {
        min-width: 510px;
    }

    .world-aquatics-metric {
        min-height: 70px;
        padding: 13px 14px;
    }

    .swimmer-overview-metrics dd {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}
}

.roles-assignment-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.roles-assignment-list legend {
    padding: 0 4px;
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
}

.roles-assignment-list label {
    display: grid;
    grid-template-columns: 18px minmax(120px, .5fr) minmax(0, 1fr);
    align-items: start;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    cursor: pointer;
}

.roles-assignment-list input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
}

.roles-assignment-list strong {
    color: var(--nav);
    font-size: 13px;
}

.roles-assignment-list span {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.roles-responsibility-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 7px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.roles-responsibility-list legend,
.roles-responsibility-list p {
    grid-column: 1 / -1;
}

.roles-responsibility-list legend {
    padding: 0 4px;
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
}

.roles-responsibility-list p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.roles-responsibility-list label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
}

.roles-responsibility-list input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
}

html[data-system-theme="dark"] body .roles-risk-low {
    color: #8fe0ae;
}

html[data-system-theme="dark"] body .roles-risk-low>.roles-risk-badge,
html[data-system-theme="dark"] body .roles-risk-badge.roles-risk-low {
    background: #173a29;
}

html[data-system-theme="dark"] body .roles-risk-medium {
    color: #f2c866;
}

html[data-system-theme="dark"] body .roles-risk-medium>.roles-risk-badge,
html[data-system-theme="dark"] body .roles-risk-badge.roles-risk-medium {
    background: #493713;
}

html[data-system-theme="dark"] body .roles-risk-high {
    color: #ff958c;
}

html[data-system-theme="dark"] body .roles-risk-high>.roles-risk-badge,
html[data-system-theme="dark"] body .roles-risk-badge.roles-risk-high {
    background: #4a201e;
}

html[data-system-theme="dark"] body .roles-revoke-button {
    border-color: #ff958c;
    background: #4a201e;
    color: #ffb5ae;
}

html[data-system-theme="dark"] body .roles-revoke-button:hover,
html[data-system-theme="dark"] body .roles-revoke-button:focus-visible {
    background: #642824;
    color: #ffe0dc;
}

@media (max-width: 760px) {
    .editera-workspace {
        padding: 14px;
    }

    .editera-workspace-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .editera-workspace-header {
        align-items: flex-start;
    }

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

    .participation-category-picker {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        box-sizing: border-box;
    }

    .editera-group-profile {
        grid-template-columns: minmax(0, 1fr);
    }

    .roles-assignment-list label {
        grid-template-columns: 18px minmax(0, 1fr);
    }

    .roles-assignment-list span {
        grid-column: 2;
    }

    .roles-responsibility-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .roles-swimmer-account {
        grid-template-columns: minmax(0, 1fr);
    }

    .roles-role-definition {
        grid-template-columns: minmax(0, 1fr);
    }

    .roles-role-definition>label,
    .roles-role-definition>label:nth-of-type(1),
    .roles-role-definition>label:nth-of-type(2),
    .roles-role-definition>label:nth-of-type(3),
    .roles-role-definition>label:nth-of-type(4) {
        grid-column: 1;
    }

    .roles-mode-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .roles-role-permissions {
        grid-template-columns: minmax(0, 1fr);
    }

    .editera-editor textarea,
    .editera-group-motto-image {
        width: 100%;
    }

    .editera-group-profile {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
}

.admin-swimmer-navigation button {
    min-height: 40px;
    padding: 0;
    font-size: 26px;
    line-height: 1;
}

.admin-swimmer-groups-field {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 5px 8px;
    width: 100%;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.admin-swimmer-groups-field legend {
    grid-column: 1 / -1;
    padding: 0 4px;
    color: var(--muted);
    font-size: 12px;
}

.admin-swimmer-profile .admin-swimmer-groups-field label {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    column-gap: 6px !important;
    min-height: 28px;
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    white-space: nowrap;
}

.admin-swimmer-profile .admin-swimmer-groups-field label strong {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 0 !important;
    color: var(--nav);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .admin-swimmer-groups-field {
        grid-template-columns: minmax(0, 1fr);
    }
}

.admin-swimmer-groups-field input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    min-height: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
}


.admin-swimmer-actions {
    position: relative;
    width: fit-content;
}

.admin-swimmer-actions-button {
    width: 40px;
    min-height: 32px;
    padding: 0 0 6px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
}

.admin-swimmer-actions-menu {
    position: absolute;
    z-index: 5;
    top: calc(100% + 6px);
    left: 0;
    min-width: 190px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(23, 50, 58, 0.16);
}

.admin-swimmer-actions-menu[hidden] {
    display: none;
}

.admin-swimmer-actions-menu button {
    width: 100%;
    min-height: 36px;
    background: transparent;
    color: var(--ink);
    text-align: left;
}

.admin-swimmer-actions-menu button:hover {
    background: var(--surface-muted);
}

.admin-swimmer-profile-content {
    display: grid;
    gap: 12px;
}

.admin-swimmer-registration {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    background: var(--surface);
}

.admin-swimmer-registration[hidden] {
    display: none;
}

.admin-swimmer-registration-description,
.admin-swimmer-registration-status {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.admin-swimmer-registration-progress {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    border: 2px solid transparent;
    border-radius: 50%;
    background: conic-gradient(#d33b2f, #e9b51f, #2f9a5d, #d33b2f) border-box;
    animation: tempus-import-progress 1.1s linear infinite;
    vertical-align: -1px;
}

@keyframes tempus-import-progress {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-swimmer-registration-progress {
        animation: none;
    }
}

.admin-swimmer-registration-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
}

.admin-swimmer-registration-fields label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

.admin-swimmer-registration-fields input:not([type="checkbox"]) {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.admin-swimmer-registration-fields label:has(input[type="checkbox"]) {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-self: start;
    gap: 8px;
    min-height: 32px;
}

.admin-swimmer-profile dl {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 7px 14px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.admin-swimmer-profile dt {
    color: var(--muted);
    font-size: 12px;
}

.admin-swimmer-profile dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-swimmer-profile dl>label {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 40px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
}

.admin-swimmer-profile dl>label input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
}

.admin-swimmer-profile-content {
    gap: 14px;
}

.admin-swimmer-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 5px;
    background: var(--surface-muted);
}

.admin-swimmer-profile-header> :first-child {
    min-width: 0;
}

.admin-swimmer-profile-header .training-dashboard-menu-wrap {
    flex: 0 0 auto;
    margin-left: auto;
    order: 0;
    align-self: center;
}

.admin-swimmer-profile-header h4 {
    margin: 0;
    color: var(--nav);
    font-size: 17px;
    overflow-wrap: anywhere;
}

.admin-swimmer-profile-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.tempus-profile-trigger {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 13px;
    white-space: nowrap;
}

.tempus-profile-dialog {
    width: min(760px, calc(100vw - 28px));
    max-height: min(720px, calc(100dvh - 28px));
    margin: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 22px 54px rgba(12, 35, 45, .28);
}

.tempus-profile-dialog::backdrop {
    background: rgba(12, 35, 45, .48);
}

.tempus-profile-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.tempus-profile-panel>header,
.tempus-profile-panel>header>div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tempus-profile-panel h3,
.tempus-profile-row h4 {
    margin: 0;
    color: var(--nav);
    font-size: 17px;
    line-height: 1.25;
}

.tempus-profile-panel>header p,
.tempus-profile-row p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.tempus-profile-status {
    min-height: 20px;
    margin: 0;
    padding: 9px 11px;
    border-left: 3px solid var(--teal);
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.tempus-profile-rows {
    display: grid;
    gap: 8px;
}

.tempus-profile-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.tempus-profile-controls {
    display: grid;
    grid-template-columns: auto minmax(145px, 190px) auto;
    align-items: center;
    gap: 8px;
}

.tempus-profile-controls.is-system-active {
    grid-template-columns: auto minmax(180px, 250px);
}

.tempus-profile-system-groups {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tempus-profile-controls select,
.tempus-profile-import {
    min-height: 36px;
    margin: 0;
    font-size: 13px;
}

.tempus-profile-import {
    white-space: nowrap;
}

.tempus-profile-activity {
    display: inline-flex;
    justify-content: center;
    min-width: 82px;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.tempus-profile-activity.is-active {
    background: color-mix(in srgb, var(--teal) 18%, var(--surface));
    color: var(--nav);
}

.tempus-profile-activity.is-inactive {
    background: color-mix(in srgb, var(--accent) 20%, var(--surface));
    color: var(--text);
}

.tempus-profile-activity.is-imported {
    background: color-mix(in srgb, var(--teal) 18%, var(--surface));
    color: var(--nav);
}

@media (max-width: 720px) {
    .admin-swimmer-profile-header {
        flex-wrap: wrap;
    }

    .tempus-profile-trigger {
        margin-left: 0;
    }

    .tempus-profile-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tempus-profile-controls {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tempus-profile-controls.is-system-active {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tempus-profile-import {
        grid-column: 1 / -1;
        width: 100%;
    }
}

.admin-swimmer-profile .admin-swimmer-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
    background: var(--surface);
}

.admin-swimmer-profile .admin-swimmer-facts dt,
.admin-swimmer-profile .admin-swimmer-facts dd {
    min-width: 0;
    margin: 0;
    padding: 9px 11px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.admin-swimmer-profile .admin-swimmer-facts dt {
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 12px;
}

.admin-swimmer-profile .admin-swimmer-facts dd {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.admin-swimmer-profile .admin-swimmer-profile-settings {
    display: grid;
    grid-column: 1 / -1;
    gap: 10px;
    padding: 12px 11px 2px;
    background: var(--surface);
}

.admin-swimmer-profile-settings>label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.admin-swimmer-profile-settings>label:has(input[type="checkbox"]) {
    min-height: 40px;
    white-space: nowrap;
    justify-content: flex-start !important;
    column-gap: 2px !important;
}

.admin-swimmer-profile-settings>label:has(input[type="checkbox"]) input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
}

.admin-swimmer-profile-settings>label select {
    min-width: 180px;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
}

@media (max-width: 760px) {
    .admin-swimmer-profile {
        padding: 14px;
    }

    .admin-swimmer-profile dl {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .admin-swimmer-profile dd {
        margin-bottom: 8px;
    }

    .admin-swimmer-registration-fields {
        grid-template-columns: minmax(0, 1fr);
    }
}

.admin-group-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    width: 100%;
    padding: 4px 0;
}

.admin-group-checklist label {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f8fbfa;
    color: var(--ink);
    cursor: pointer;
    font: 14px Arial, sans-serif;
}

.admin-group-checklist label:has(input:checked) {
    border-color: var(--teal);
    background: #e9f5f2;
    color: var(--nav);
    font-weight: bold;
}

.admin-group-checklist input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--teal);
}

.admin-membership-field {
    flex-basis: 100%;
}

.admin-builder .builder-field input:not([type="checkbox"]),
.admin-builder .builder-field select {
    height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
}

.admin-builder .admin-membership-field {
    height: auto;
    max-height: none;
}

.admin-generated-username input {
    background: #eef1f1;
    color: #7a8788;
}

.admin-builder .builder-actions button:first-child {
    background: var(--accent);
    color: #25170b;
}

.admin-builder .builder-actions button:first-child:hover {
    background: #d97822;
}

.workout-definition-list {
    display: grid;
    gap: 10px;
    width: 100%;
}

.workout-definition-row {
    display: grid;
    grid-template-columns: 110px minmax(150px, 1fr) minmax(180px, 1.4fr) 36px;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.workout-definition-row label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.workout-definition-row input {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
}

.workout-definition-remove {
    min-height: 36px;
    padding: 0;
    border: 1px solid #b85c5c;
    border-radius: 4px;
    background: transparent;
    color: #9a3f3f;
    font-size: 18px;
}

@media (max-width: 760px) {
    .workout-definition-row {
        grid-template-columns: 1fr 1fr;
    }

    .workout-definition-row label:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .admin-builder .admin-category-picker .builder-segmented {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-builder .admin-action-picker .builder-segmented {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.analysis-mode-panel {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 5px;
    background: var(--surface-muted);
}

.planning-form,
.planning-list {
    display: grid;
    gap: 16px;
    flex: 0 1 auto;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(23, 50, 58, 0.07);
}

.planning-form-status {
    min-height: 1.2em;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

#planning-fields {
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
    gap: 20px;
    align-items: start;
}

#planning-fields>.planning-form,
#planning-fields>.planning-list {
    width: 100%;
}

#planning-fields>.planning-form {
    position: sticky;
    top: 20px;
}

#planning-fields>.planning-list {
    min-height: 260px;
}

#planning-fields>.calendar-list {
    grid-column: 1 / -1;
}

#planning-fields>.training-dashboard,
#planning-fields>.season-plans-dashboard {
    grid-column: 1 / -1;
}

#planning-fields>.development-plan-editor {
    grid-column: 1 / -1;
}

.planning-form>.builder-field,
.planning-list>.builder-field {
    flex: 0 0 auto;
    min-width: 0;
    height: auto;
    max-height: none;
}

.planning-form>.builder-field:has(.planning-textarea) {
    min-height: 132px;
}

.planning-training-form,
.planning-calendar-form,
.planning-readiness-form,
.planning-plans-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.planning-training-form>h4,
.planning-calendar-form>h4,
.planning-readiness-form>h4,
.planning-plans-form>h4,
.planning-training-form>.planning-groups,
.planning-training-form>.planning-groups-label,
.planning-training-form>.planning-textarea-field,
.planning-calendar-form>.planning-textarea-field,
.planning-plans-form>.planning-textarea-field,
.planning-training-form>button,
.planning-calendar-form>button,
.planning-readiness-form>button,
.planning-plans-form>button {
    grid-column: 1 / -1;
}

.planning-form>.planning-save-button {
    grid-column: auto;
    justify-self: start;
    width: auto;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    margin-top: 4px;
    padding: 0 18px;
}

.planning-readiness-form>.readiness-swimmer-field,
.planning-plans-form>.plans-swimmer-field {
    grid-column: span 6;
}

.planning-readiness-form>.readiness-date-field,
.planning-plans-form>.plans-year-field {
    grid-column: span 6;
}

.planning-readiness-form>.readiness-swimmer-filter-field,
.planning-readiness-form>.readiness-trainer-filter-field {
    grid-column: span 6;
}

.planning-readiness-form>.planning-range {
    grid-column: 1 / -1;
    width: 100%;
}

.planning-readiness-form>.readiness-swimmer-field,
.planning-readiness-form>.readiness-date-field,
.planning-readiness-form>.readiness-swimmer-filter-field,
.planning-readiness-form>.readiness-trainer-filter-field {
    min-width: 280px;
}

.planning-readiness-form>.readiness-swimmer-field select,
.planning-readiness-form>.readiness-swimmer-filter-field select,
.planning-readiness-form>.readiness-trainer-filter-field select {
    min-width: 280px;
}

.planning-calendar-form input[type="month"] {
    min-width: 190px;
    width: 190px;
}

.planning-calendar-form>.calendar-month-field {
    grid-column: 1 / -1;
    max-width: 230px;
}

.planning-training-form>.training-title-field,
.planning-calendar-form>.calendar-title-field {
    grid-column: span 6;
}

.planning-training-form>.training-date-field,
.planning-training-form>.training-time-field,
.planning-calendar-form>.calendar-date-field,
.planning-calendar-form>.calendar-time-field {
    grid-column: span 3;
}

.planning-training-form>.planning-textarea-field,
.planning-calendar-form>.planning-textarea-field {
    height: 40px;
    max-height: 40px;
}

.planning-calendar-form>.calendar-description-field {
    grid-column: span 6;
    min-height: 64px;
}

.planning-calendar-form>.calendar-description-field .planning-textarea {
    flex-basis: 40px;
    min-height: 40px;
    height: 40px;
    max-height: 40px;
    resize: none;
}

.planning-form>.builder-field>input:not([type="range"]),
.planning-form>.builder-field>select,
.planning-list>.builder-field>input:not([type="range"]),
.planning-list>.builder-field>select {
    box-sizing: border-box;
    flex: 0 0 40px;
    height: 40px;
    max-height: 40px;
    min-height: 40px;
    padding: 8px 10px;
}

.planning-form h4,
.planning-list h4 {
    margin: 0;
    color: var(--nav);
    font-size: 20px;
    letter-spacing: -0.01em;
}

.planning-list>h4 {
    padding-bottom: 2px;
    border-bottom: 1px solid var(--line);
}

.planning-textarea {
    box-sizing: border-box;
    flex: 0 0 92px;
    min-height: 92px;
    height: 92px;
    max-height: 92px;
    resize: vertical;
}

.planning-training-form .planning-textarea {
    flex-basis: 220px;
    min-height: 220px;
    height: 220px;
    max-height: 220px;
}

.planning-plans-form>.planning-textarea-field {
    height: 260px;
    max-height: 260px;
}

.planning-plans-form .planning-textarea {
    flex-basis: 220px;
    min-height: 220px;
    height: 220px;
    max-height: 220px;
}

@media (max-width: 760px) {
    .planning-training-form {
        grid-template-columns: 1fr;
    }

    .planning-calendar-form {
        grid-template-columns: 1fr;
    }

    .planning-readiness-form,
    .planning-plans-form {
        grid-template-columns: 1fr;
    }

    .planning-training-form>.training-title-field,
    .planning-training-form>.training-date-field,
    .planning-training-form>.training-time-field,
    .planning-calendar-form>.calendar-title-field,
    .planning-calendar-form>.calendar-date-field,
    .planning-calendar-form>.calendar-time-field,
    .planning-calendar-form>.calendar-description-field,
    .planning-readiness-form>.readiness-swimmer-field,
    .planning-readiness-form>.readiness-date-field,
    .planning-readiness-form>.readiness-swimmer-filter-field,
    .planning-readiness-form>.readiness-trainer-filter-field,
    .planning-plans-form>.plans-swimmer-field,
    .planning-plans-form>.plans-year-field {
        grid-column: 1 / -1;
    }

    .planning-readiness-form>.readiness-swimmer-field,
    .planning-readiness-form>.readiness-date-field,
    .planning-readiness-form>.readiness-swimmer-filter-field,
    .planning-readiness-form>.readiness-trainer-filter-field,
    .planning-readiness-form>.readiness-swimmer-field select,
    .planning-readiness-form>.readiness-swimmer-filter-field select,
    .planning-readiness-form>.readiness-trainer-filter-field select {
        min-width: 0;
        width: 100%;
    }
}

.planning-range {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.planning-range label {
    grid-column: 1 / -1;
}

.planning-range input[type="range"] {
    grid-column: 1;
}

.planning-range-value {
    grid-column: 2;
    grid-row: 2;
    box-sizing: border-box;
    width: 56px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    text-align: center;
    font: bold 14px Arial, sans-serif;
}

.planning-form>.planning-range>.planning-range-value {
    width: 56px;
    flex: 0 0 56px;
}

.planning-range input[type="range"] {
    display: block;
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0;
    accent-color: var(--teal);
    cursor: pointer;
}

.planning-range input[type="range"]::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 5px;
    background: #9bc9c2;
}

.planning-range input[type="range"]::-moz-range-track {
    height: 10px;
    border-radius: 5px;
    background: #9bc9c2;
}

.planning-range input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -7px;
}

.planning-range input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
}

.planning-calendar {
    display: grid;
    grid-template-columns: 48px repeat(7, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
    box-shadow: 0 6px 18px rgba(23, 50, 58, 0.06);
}

.planning-calendar-weekday,
.planning-calendar-week,
.planning-calendar-day {
    min-width: 0;
    background: var(--surface);
}

.planning-calendar-weekday {
    padding: 11px 6px;
    background: var(--surface-muted);
    color: var(--muted);
    font: bold 11px Arial, sans-serif;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.planning-calendar-week {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 4px;
    background: var(--surface-muted);
    color: var(--muted);
    font: bold 11px Arial, sans-serif;
    text-align: center;
}

.planning-calendar-day {
    min-height: 112px;
    padding: 9px;
    background: var(--surface);
}

.planning-calendar-day.is-outside {
    background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface));
}

.planning-calendar-day.is-today {
    box-shadow: inset 0 3px 0 var(--accent);
}

.planning-calendar-date {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 22px;
    margin-bottom: 7px;
    color: var(--muted);
    font: bold 12px Arial, sans-serif;
}

.planning-calendar-event {
    display: block;
    width: 100%;
    margin: 4px 0;
    padding: 6px 7px;
    overflow: hidden;
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    background: #e7f3f0;
    color: var(--nav);
    font: 12px/1.3 Arial, sans-serif;
    text-align: left;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: anywhere;
}

.calendar-component .fc .calendar-training-event {
    --fc-event-bg-color: var(--calendar-training-color, #d97727);
    --fc-event-border-color: var(--calendar-training-color, #d97727);
}

.calendar-component .fc .fc-event.calendar-training-event {
    background-color: var(--calendar-training-color, #d97727) !important;
    border-color: var(--calendar-training-color, #d97727) !important;
}

.calendar-component .fc .fc-event.calendar-training-event .fc-event-main {
    background-color: var(--calendar-training-color, #d97727) !important;
}

.calendar-component .fc .calendar-training-event .fc-event-title::before {
    content: "SIMPASS · ";
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.calendar-component .fc .fc-event[class*="calendar-entry-event-"] {
    color: #ffffff !important;
}

.calendar-component .fc .fc-event.calendar-entry-event-general {
    --fc-event-bg-color: var(--calendar-general-color, #2d8a80);
    --fc-event-border-color: var(--calendar-general-color, #2d8a80);
    background-color: var(--calendar-general-color, #2d8a80) !important;
    border-color: var(--calendar-general-color, #2d8a80) !important;
}

.calendar-component .fc .fc-event.calendar-entry-event-general.fc-event-draggable,
.calendar-component .fc .fc-event.calendar-training-event.fc-event-draggable {
    cursor: grab;
}

.calendar-component .fc .fc-event.calendar-entry-event-general.fc-event-dragging,
.calendar-component .fc .fc-event.calendar-training-event.fc-event-dragging {
    cursor: grabbing;
}

.calendar-component .fc .fc-event.calendar-entry-event-competition {
    --fc-event-bg-color: var(--calendar-competition-color, #326eb5);
    --fc-event-border-color: var(--calendar-competition-color, #326eb5);
    background-color: var(--calendar-competition-color, #326eb5) !important;
    border-color: var(--calendar-competition-color, #326eb5) !important;
}

.calendar-component .fc .fc-event.calendar-entry-event-camp {
    --fc-event-bg-color: var(--calendar-camp-color, #8a5a2b);
    --fc-event-border-color: var(--calendar-camp-color, #8a5a2b);
    background-color: var(--calendar-camp-color, #8a5a2b) !important;
    border-color: var(--calendar-camp-color, #8a5a2b) !important;
}

.calendar-component .fc .fc-event.calendar-entry-event-weekly-plan {
    --fc-event-bg-color: var(--calendar-weekly-plan-color, #4b5ca8);
    --fc-event-border-color: var(--calendar-weekly-plan-color, #4b5ca8);
    background-color: var(--calendar-weekly-plan-color, #4b5ca8) !important;
    border-color: var(--calendar-weekly-plan-color, #4b5ca8) !important;
}

.calendar-component .fc .fc-event.calendar-entry-event-season-plan {
    --fc-event-bg-color: var(--calendar-season-plan-color, #a23f5b);
    --fc-event-border-color: var(--calendar-season-plan-color, #a23f5b);
    background-color: var(--calendar-season-plan-color, #a23f5b) !important;
    border-color: var(--calendar-season-plan-color, #a23f5b) !important;
}

.calendar-component .fc .fc-event.calendar-entry-event-mesocycle {
    --fc-event-bg-color: var(--calendar-mesocycle-color, #76549d);
    --fc-event-border-color: var(--calendar-mesocycle-color, #76549d);
    background-color: var(--calendar-mesocycle-color, #76549d) !important;
    border-color: var(--calendar-mesocycle-color, #76549d) !important;
}

.calendar-component .fc .fc-event[class*="calendar-entry-event-"] .fc-event-main {
    background-color: transparent !important;
}

.calendar-component .fc .fc-event.calendar-holiday-event {
    --fc-event-bg-color: var(--calendar-holiday-color, #a33d2f);
    --fc-event-border-color: var(--calendar-holiday-color, #a33d2f);
    background-color: var(--calendar-holiday-color, #a33d2f) !important;
    border-color: var(--calendar-holiday-color, #a33d2f) !important;
}

.calendar-component .fc .fc-event.calendar-holiday-event .fc-event-main {
    background-color: var(--calendar-holiday-color, #a33d2f) !important;
}

.calendar-component .fc .calendar-weekend {
    background: #dce8ec !important;
}

.calendar-component .fc .fc-daygrid-day.calendar-weekend,
.calendar-component .fc .fc-daygrid-day.calendar-weekend .fc-daygrid-day-frame {
    background: #dce8ec !important;
    box-shadow: inset 0 4px 0 #4b8fa0 !important;
}

html[data-system-theme="dark"] body .calendar-component .fc .calendar-weekend,
html[data-system-theme="dark"] body .calendar-component .fc .fc-daygrid-day.calendar-weekend,
html[data-system-theme="dark"] body .calendar-component .fc .fc-daygrid-day.calendar-weekend .fc-daygrid-day-frame {
    background: #304b52 !important;
    box-shadow: inset 0 4px 0 #78c6d4 !important;
}

.calendar-component .fc .fc-day-sat,
.calendar-component .fc .fc-day-sun,
.calendar-component .fc .fc-day-sat .fc-daygrid-day-frame,
.calendar-component .fc .fc-day-sun .fc-daygrid-day-frame {
    background: #dce8ec !important;
    box-shadow: inset 0 4px 0 #4b8fa0 !important;
}

html[data-system-theme="dark"] body .calendar-component .fc .fc-day-sat,
html[data-system-theme="dark"] body .calendar-component .fc .fc-day-sun,
html[data-system-theme="dark"] body .calendar-component .fc .fc-day-sat .fc-daygrid-day-frame,
html[data-system-theme="dark"] body .calendar-component .fc .fc-day-sun .fc-daygrid-day-frame {
    background: #304b52 !important;
    box-shadow: inset 0 4px 0 #78c6d4 !important;
}

.calendar-component .fc .fc-daygrid-week-number {
    color: var(--teal);
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 560px) {
    .planning-calendar {
        grid-template-columns: 30px repeat(7, minmax(0, 1fr));
    }

    .planning-calendar-weekday {
        padding-inline: 2px;
        font-size: 9px;
    }

    .planning-calendar-day {
        min-height: 82px;
        padding: 5px 3px;
    }

    .planning-calendar-event {
        padding: 4px 3px;
        font-size: 11px;
    }
}

.planning-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 16px 18px;
    border-left: 4px solid var(--teal);
    border-radius: 6px;
    background: var(--surface-muted);
    box-shadow: 0 3px 12px rgba(23, 50, 58, 0.04);
}

.planning-card h5 {
    margin: 0;
    color: var(--nav);
    font-size: 16px;
}

.planning-card p {
    margin: 0;
    color: var(--muted);
    font: 13px/1.45 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.planning-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.planning-card-actions button {
    padding: 7px 10px;
    font-size: 12px;
}

.planning-card-actions button:first-child {
    background: var(--teal);
}

.planning-card-actions button:last-child {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
}

.planning-card-actions button:last-child:hover {
    border-color: #a33d2f;
    color: #a33d2f;
}

.calendar-list {
    gap: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.calendar-list>h4 {
    display: none;
}

.calendar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 0;
}

.calendar-header h3 {
    margin: 0;
    color: var(--nav);
    font-size: 20px;
    font-weight: 600;
}

.calendar-header .calendar-weather {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px 12px;
    width: 100%;
    max-width: none;
    margin-left: 0;
    color: var(--muted);
    font-size: 12px;
    text-align: left;
}

.calendar-header .calendar-weather-location {
    flex: 0 0 auto;
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calendar-header .calendar-weather strong {
    flex: 0 0 auto;
    color: var(--nav);
    font-size: 13px;
}

.calendar-weather-icon {
    display: inline-block;
    margin-right: 4px;
    font-size: 16px;
    line-height: 1;
    vertical-align: -1px;
}

.calendar-weather-condition {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.calendar-weather-condition .calendar-weather-icon {
    margin-right: 3px;
    font-size: 14px;
}

.calendar-header .calendar-weather-source {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px;
    font-style: italic;
}

.calendar-forecast-trigger {
    flex: 0 0 auto;
    margin-top: 2px;
    padding: 3px 8px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: transparent;
    color: var(--teal);
    font-size: 11px;
}

.calendar-forecast-trigger:hover,
.calendar-forecast-trigger:focus-visible {
    background: var(--teal);
    color: #ffffff;
    outline: none;
}

.calendar-forecast-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.calendar-forecast-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 25;
    width: min(760px, calc(100vw - 40px));
    max-height: min(650px, calc(100vh - 120px));
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 16px 38px rgba(23, 50, 58, 0.2);
    color: var(--ink);
    text-align: left;
}

.calendar-weather {
    position: relative;
}

.calendar-forecast-popover h4 {
    margin: 0 0 9px;
    color: var(--nav);
    font-size: 13px;
}

.calendar-forecast-popover section+section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.calendar-forecast-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(82px, 1fr));
    gap: 6px;
}

.calendar-forecast-day,
.calendar-forecast-hour {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    font-size: 11px;
}

.calendar-forecast-day strong,
.calendar-forecast-hour strong {
    color: var(--nav);
}

.calendar-forecast-day small,
.calendar-forecast-hour small {
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.calendar-forecast-hours {
    display: grid;
    grid-template-columns: repeat(12, minmax(54px, 1fr));
    gap: 5px;
}

.calendar-weather[data-error="true"] {
    color: #a33d2f;
}

.calendar-header .calendar-weather .calendar-forecast-actions {
    margin-left: auto;
}

.overview-local-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.overview-weather {
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "location source condition details actions";
    align-items: center;
    column-gap: 12px;
    row-gap: 5px;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    justify-content: flex-start;
    max-width: 100%;
    margin-left: 0;
    text-align: left;
}

.overview-weather .calendar-weather-location {
    grid-area: location;
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.overview-weather strong {
    grid-area: condition;
    color: var(--nav);
    font-size: 13px;
}

.overview-weather-details {
    grid-area: details;
    display: flex;
    gap: 8px;
    min-width: 0;
    font-size: 11px;
    overflow-x: auto;
    white-space: nowrap;
}

.overview-weather-details>span {
    flex: 0 0 auto;
}

.overview-weather .calendar-weather-source {
    grid-area: source;
    margin-left: 0;
    color: var(--muted);
    font-size: 10px;
    font-style: italic;
}

.overview-weather .calendar-forecast-actions {
    grid-area: actions;
    display: flex;
    justify-self: end;
    margin-left: auto;
}

.overview-transit {
    min-width: 0;
    grid-column: 1 / -1;
}

.overview-transit-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.overview-transit-heading h3,
.overview-transit-direction h4 {
    margin: 0;
    color: var(--nav);
}

.overview-transit-heading h3 {
    color: var(--teal) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html[data-system-theme="dark"] body .overview-transit-heading h3 {
    color: var(--teal) !important;
}

#overview-transit-source {
    color: var(--muted);
    font-size: 10px;
    font-style: italic;
}

#overview-transit-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.overview-transit-body {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
}

.overview-transit-open {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    align-self: baseline;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--teal);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 17px;
    line-height: 1;
}

.overview-transit-message {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.overview-transit-direction {
    min-width: 0;
    padding: 10px 12px;
    border-left: 3px solid #651e38;
    background: var(--surface-muted);
    text-align: left !important;
}

.overview-transit-direction h4 {
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
}

.overview-transit-direction ul {
    display: grid;
    gap: 4px;
    margin: 7px 0 0;
    padding: 0;
    list-style: none;
}

.overview-transit-direction li {
    display: flex;
    gap: 6px;
    align-items: baseline;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    white-space: normal;
}

.overview-transit-direction li strong,
.overview-transit-direction li time {
    color: var(--nav);
}

.overview-transit-countdown {
    color: var(--teal-dark);
    font-weight: 700;
}

.overview-transit-direction li time {
    font-size: 13px;
    font-weight: 700;
}

.overview-transit-modal {
    width: min(620px, calc(100vw - 40px));
}

#overview-transit-modal-content {
    display: grid;
    gap: 10px;
}

.overview-transit-modal .overview-transit-direction h4 {
    font-size: 14px;
}

.overview-transit-modal .overview-transit-direction li {
    font-size: 13px;
}

.overview-transit-modal .overview-transit-direction li strong {
    font-size: 13px;
}

.overview-transit-modal .overview-transit-direction li time {
    font-size: 14px;
}

@media (max-width: 760px) {
    #overview-transit-content {
        grid-template-columns: 1fr;
    }

    .overview-weather {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "location source"
            "condition condition"
            "details details"
            "actions actions";
    }

    .overview-weather-details {
        justify-content: flex-start;
        flex-wrap: wrap;
        overflow-x: visible;
        white-space: normal;
    }

    .overview-weather-details>span {
        flex: 0 1 auto;
        min-width: 0;
    }

    .overview-weather .calendar-forecast-actions {
        justify-self: start;
        margin-left: 0;
    }

    .overview-local-info {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

}

.calendar-back-button {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--nav);
    font-size: 24px;
    line-height: 1;
}

.calendar-back-button:hover {
    border-color: var(--teal);
    background: #e7f3f0;
    color: var(--nav);
}

.calendar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px 0;
}

.calendar-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
}

.calendar-filter input {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--teal);
}

.calendar-filter input[type="color"] {
    box-sizing: border-box;
    width: 28px;
    height: 24px;
    margin-left: 2px;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
}

.calendar-filter-general {
    border-left-color: var(--calendar-general-color, #2d8a80);
}

.calendar-group-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 10px;
    min-width: min(100%, 260px);
    max-width: 100%;
    margin: 0;
    padding: 4px 8px 6px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--nav);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 13px;
}

.calendar-group-filter legend {
    width: auto;
    margin-right: 3px;
    padding: 0 3px;
    color: var(--muted);
    font-size: 11px;
}

.calendar-group-filter label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    cursor: pointer;
}

.calendar-group-filter input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.calendar-filter-competition {
    border-left-color: var(--calendar-competition-color, #326eb5);
}

.calendar-filter-camp {
    border-left-color: var(--calendar-camp-color, #8a5a2b);
}

.calendar-filter-training {
    border-left-color: var(--calendar-training-color, #d97727);
}

.calendar-filter-weekly-plan {
    border-left-color: var(--calendar-weekly-plan-color, #4b5ca8);
}

.calendar-filter-season-plan {
    border-left-color: var(--calendar-season-plan-color, #a23f5b);
}

.calendar-filter-mesocycle {
    border-left-color: var(--calendar-mesocycle-color, #76549d);
}

.calendar-filter-holiday {
    border-left-color: var(--calendar-holiday-color, #a33d2f);
}

.calendar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 20px 0;
}

.calendar-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.calendar-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.calendar-component {
    width: 100%;
    min-width: 0;
    padding: 20px;
}

.calendar-component .fc {
    --fc-border-color: var(--line);
    --fc-button-bg-color: var(--teal);
    --fc-button-border-color: var(--teal);
    --fc-button-hover-bg-color: var(--nav);
    --fc-button-hover-border-color: var(--nav);
    --fc-today-bg-color: #eef8f5;
    color: var(--ink);
    font-family: Arial, sans-serif;
}

.calendar-component .fc .fc-toolbar-title {
    color: var(--nav);
    font-size: 22px;
    font-weight: 600;
}

.calendar-component .fc .fc-button {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 5px;
    box-shadow: none;
    font-size: 13px;
}

.calendar-component .fc .fc-col-header-cell-cushion,
.calendar-component .fc .fc-daygrid-day-number {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.calendar-component .fc .fc-daygrid-day-frame {
    min-height: 112px;
    padding: 4px;
}

.calendar-component.fc .fc-event {
    padding: 2px 4px;
    font: 400 11px/1.25 Arial, sans-serif;
}

.calendar-component.fc .fc-event-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.calendar-component.fc .fc-daygrid-event .fc-event-main-frame,
.calendar-component.fc .fc-daygrid-event .fc-event-title-container {
    min-width: 0;
}

.calendar-component.fc .fc-daygrid-event .fc-event-title {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font: 400 11px/1.25 Arial, sans-serif !important;
}

.calendar-event {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 4px 6px;
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    background: #e7f3f0;
    color: var(--nav);
    font-size: 12px;
}

.calendar-event-title {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 auto;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.calendar-event:hover .calendar-event-actions,
.calendar-event:focus-within .calendar-event-actions {
    opacity: 1;
}

.calendar-event-action {
    width: 22px;
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--nav);
    font-size: 12px;
}

.calendar-event-action:hover {
    background: rgba(8, 126, 120, 0.16);
    color: var(--nav);
}

.calendar-editor-backdrop {
    display: block;
    position: static;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
}

.calendar-editor-backdrop[hidden] {
    display: none !important;
}

.calendar-editor {
    width: min(760px, 100%);
    max-height: none;
    margin: 18px auto 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.weekly-plan-editor-backdrop {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(23, 50, 58, 0.38);
    backdrop-filter: blur(3px);
    z-index: 20;
}

.weekly-plan-modal {
    width: min(1340px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    margin: 0;
    border: 1px solid #c7d6d5;
    border-top: 4px solid var(--teal);
    background: #fffefb;
    box-shadow: 0 22px 52px rgba(23, 50, 58, 0.24);
}

.planning-modern-weekly-plan .weekly-plan-modal {
    width: min(1340px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    margin: 0;
}

.weekly-plan-modal .calendar-editor-heading {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
}

.weekly-plan-save-status {
    color: var(--muted);
    font: 12px Arial, sans-serif;
    white-space: nowrap;
}

.weekly-plan-save-status[data-state="saving"] {
    color: #9a541c;
}

.weekly-plan-save-status[data-state="saved"] {
    color: #26715b;
}

.weekly-plan-save-status[data-state="error"] {
    color: var(--danger);
}

.weekly-plan-modal .weekly-plan-print {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: #eaf4f1;
    color: var(--nav);
    font: 600 12px Arial, sans-serif;
}

.weekly-plan-creation {
    display: grid;
    gap: 18px;
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    margin: 18px auto 0;
    padding: 24px;
    overflow: auto;
    border: 1px solid #c7d6d5;
    border-top: 4px solid var(--teal);
    border-radius: 6px;
    background: #fffefb;
    box-shadow: 0 12px 30px rgba(23, 50, 58, 0.16);
}

.weekly-plan-creation-backdrop .weekly-plan-creation {
    margin: 0;
}

.weekly-plan-creation-heading {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.weekly-plan-creation h2,
.weekly-plan-creation h3,
.weekly-plan-creation p {
    margin: 0;
}

.weekly-plan-creation h2 {
    color: var(--nav);
    font-size: 22px;
}

.weekly-plan-creation h3 {
    color: var(--nav);
    font-size: 15px;
}

.weekly-plan-creation-heading p,
.weekly-plan-creation-help,
.weekly-plan-creation-status {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.weekly-plan-creation-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
}

.weekly-plan-creation label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.weekly-plan-creation select,
.weekly-plan-creation input {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.weekly-plan-creation-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.weekly-plan-creation-methods button {
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.weekly-plan-creation-methods button.is-selected {
    border-color: var(--teal);
    background: #dcefea;
    color: var(--nav);
    box-shadow: inset 0 3px var(--teal);
}

.weekly-plan-creation-source[hidden] {
    display: none;
}

.weekly-plan-creation-status {
    min-height: 20px;
}

.weekly-plan-creation-status[data-state="ready"] {
    color: #26715b;
}

.weekly-plan-creation-status[data-state="error"] {
    color: var(--danger);
}

.weekly-plan-creation-actions {
    display: flex;
    justify-content: flex-end;
}

.calendar-editor.is-read-only {
    border-top: 4px solid #d97727;
}

.calendar-editor.is-read-only .modal-input:disabled {
    opacity: 0.78;
    cursor: default;
}

.calendar-editor .modal-input {
    margin-bottom: 16px;
    background: var(--surface-muted);
    color: var(--ink);
    border-color: var(--line);
}

.calendar-editor textarea.modal-input {
    min-height: 110px;
    resize: vertical;
}

.calendar-all-day-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 16px;
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
}

.calendar-all-day-label input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--teal);
}

.calendar-editor textarea.calendar-training-description {
    min-height: 320px;
    padding: 14px;
    background: #fffaf4;
    color: var(--nav);
    font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
}

.calendar-editor.is-read-only textarea.calendar-training-description {
    resize: none;
    cursor: default;
}

.event-editor {
    position: relative;
    width: min(1100px, calc(100vw - 64px));
    max-width: 100%;
    box-sizing: border-box;
    max-height: none;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 18px;
    align-content: start;
}

.event-editor-heading,
.event-editor>.event-primary-field,
.event-editor>.event-participant-field,
.event-editor>.event-group-field,
.event-editor>.event-description-input,
.event-editor>.modal-actions,
.event-editor>.event-archive-choice {
    grid-column: 1 / -1;
}

.event-editor>.event-primary-field,
.event-editor>.event-cost-field {
    grid-column: span 2;
}

.event-editor>.event-date-cost-column {
    grid-column: span 1;
    min-width: 0;
}

.event-editor>.event-pm-field-row {
    grid-column: span 3;
}

.camps-editor {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.camps-editor>.event-primary-field {
    grid-column: span 2;
}

.camps-editor>.event-date-cost-column {
    grid-column: span 1;
}

.event-editor>.event-primary-field:nth-of-type(5) {
    grid-column: span 1;
}

.event-editor-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -4px 0 8px;
}

.event-editor-heading h2 {
    margin: 0;
}

.event-editor-back {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--nav);
    font-size: 23px;
    line-height: 1;
    flex: 0 0 auto;
}

.event-editor-back:hover {
    border-color: var(--teal);
    background: #e7f3f0;
}

.event-editor .modal-input {
    margin-bottom: 14px;
    background: var(--surface-muted);
    color: var(--ink);
    border-color: var(--line);
}

.event-editor .event-description-input {
    min-height: 180px;
    resize: vertical;
}

.event-editor .event-description-input,
.event-editor>label:has(.event-description-input) {
    grid-column: 1 / -1;
}

.competition-editor {
    width: min(1240px, calc(100vw - 48px));
    box-sizing: border-box;
    min-width: 0;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    padding: 20px;
    background: var(--surface);
}

.competition-editor>.event-editor-heading,
.competition-editor>.competition-editor-section,
.competition-editor>.event-participant-field,
.competition-editor>.event-results-field,
.competition-editor>.modal-actions {
    grid-column: 1 / -1;
    min-width: 0;
}

.competition-editor>.event-results-field[hidden] {
    display: none;
}

.competition-editor .event-editor-heading {
    margin: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.competition-editor .event-editor-heading h2 {
    color: var(--nav);
    font-size: 21px;
    line-height: 1.2;
}

.competition-editor .event-save-status {
    margin-left: auto;
    color: #922f2f;
    font-size: 12px;
    font-weight: 700;
}

.competition-editor-section,
.competition-editor .event-participant-field,
.competition-editor .event-results-field {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
    box-shadow: 0 1px 2px rgb(17 49 58 / 6%);
}

.competition-editor-section>h3 {
    margin: 0 0 14px;
    color: var(--nav);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.competition-editor-identity {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    gap: 12px 16px;
}

.competition-editor-identity>h3,
.competition-editor-links>h3,
.competition-editor-schedule>h3,
.competition-editor-documents>h3,
.competition-editor-notes>h3 {
    grid-column: 1 / -1;
}

.competition-editor-identity .event-primary-field,
.competition-editor-links .event-primary-field {
    grid-column: auto;
    margin: 0;
}

.competition-editor-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.competition-editor-schedule .event-date-cost-column {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 12px 16px;
}

.competition-editor-schedule .event-primary-field,
.competition-editor-schedule .event-cost-field {
    margin: 0;
}

.competition-editor-schedule .event-reminder-control,
.competition-editor-schedule .event-cost-field {
    grid-column: span 2;
}

.competition-editor-schedule .event-reminder-control {
    grid-column: auto;
    align-self: start;
    width: max-content;
    max-width: 100%;
}

.competition-editor-schedule .event-reminder-control .reminder-control-options {
    grid-template-columns: repeat(3, max-content);
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    gap: 4px 10px;
}

.competition-editor-documents .event-pm-field-row {
    grid-column: auto;
}

.event-document-card {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.event-document-thumbnail {
    position: relative;
    grid-row: 1;
    grid-column: 1;
    width: 80px;
    min-height: 60px;
    padding: 6px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--nav);
    font: 800 12px Arial, sans-serif;
}

.event-document-thumbnail canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    object-fit: contain;
}

.event-document-thumbnail canvas[hidden] {
    display: none;
}

.event-document-thumbnail-label {
    position: relative;
}

.event-document-thumbnail canvas:not([hidden])+.event-document-thumbnail-label {
    display: none;
}

.event-document-thumbnail:not(:disabled) {
    cursor: zoom-in;
}

.event-document-thumbnail:disabled {
    color: var(--muted);
    opacity: 1;
}

.event-document-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.event-document-copy strong {
    color: var(--ink);
    font-size: 13px;
}

.event-document-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.event-document-actions button,
.event-document-actions .event-pm-file-link {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 12px;
}

.event-document-viewer-backdrop {
    z-index: 60;
}

.event-document-viewer {
    position: relative;
    width: min(1100px, calc(100vw - 40px));
    height: min(860px, calc(100dvh - 40px));
    max-height: calc(100dvh - 40px);
    padding: 16px;
    overflow: hidden;
}

.event-document-viewer iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.event-document-viewer-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    min-height: 36px;
    padding: 6px 9px;
}

.competition-editor .event-participant-field,
.competition-editor .event-results-field {
    order: 4;
}

.competition-editor .competition-editor-documents {
    order: 5;
}

.competition-editor .competition-editor-results {
    order: 6;
}

.competition-editor>.competition-editor-results {
    grid-column: span 6;
}

.competition-editor .competition-editor-notes {
    order: 7;
}

.competition-editor-notes .event-primary-field {
    display: block;
    margin: 0;
}

.competition-editor-notes .event-description-input {
    min-height: 150px;
    margin: 0;
}

.competition-editor .modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -20px -20px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    background: rgb(247 250 249 / 96%);
    box-shadow: 0 -4px 12px rgb(17 49 58 / 7%);
}

.competition-delete-dialog {
    width: min(440px, calc(100vw - 32px));
}

.competition-delete-archive-choice {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 16px 0 4px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.competition-delete-archive-choice input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--teal);
}

@media (max-width: 760px) {
    .event-editor {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .camps-editor>.event-date-cost-column {
        grid-row: auto;
    }

    .event-editor-heading,
    .event-editor>.event-primary-field,
    .event-editor>.event-cost-field,
    .event-editor>.event-date-cost-column,
    .event-editor>.event-pm-field-row,
    .event-editor>.event-participant-field,
    .event-editor>.event-group-field,
    .event-editor>.modal-actions,
    .event-editor>.event-archive-choice,
    .event-editor>label:has(.event-description-input) {
        grid-column: 1;
    }

    .competition-editor {
        width: 100%;
        padding: 14px;
        gap: 12px;
    }

    .competition-editor-identity,
    .competition-editor-links,
    .competition-editor-camp-information,
    .competition-editor-schedule .event-date-cost-column {
        grid-template-columns: minmax(0, 1fr);
    }

    .competition-editor-schedule .event-reminder-control,
    .competition-editor-schedule .event-cost-field {
        grid-column: auto;
    }

    .competition-editor-schedule .event-date-cost-column>*,
    .competition-editor-schedule .event-date-cost-column .event-primary-field,
    .competition-editor-schedule .event-date-cost-column .event-reminder-control,
    .competition-editor-schedule .event-date-cost-column .event-cost-field {
        min-width: 0;
        max-width: 100%;
    }

    .competition-editor-schedule .event-reminder-control .reminder-control-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, auto);
        grid-auto-flow: row;
    }

    .competition-editor>.competition-editor-results {
        grid-column: 1;
    }

    .event-document-card {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 10px;
    }

    .event-document-thumbnail {
        width: 60px;
        min-height: 52px;
    }

    .event-document-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .competition-editor .modal-actions {
        margin: 0 -14px -14px;
        padding: 10px 14px;
    }
}

.event-date-cost-column {
    display: grid;
    grid-template-rows: auto auto auto 90px 1fr;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.event-date-cost-column>.event-primary-field {
    grid-column: auto;
}

.event-date-cost-column .event-cost-field {
    grid-template-columns: minmax(0, 1fr) 96px;
    margin: 0;
}

.event-date-cost-column .event-archive-choice {
    width: max-content;
    max-width: 100%;
    margin: 0;
    gap: 5px;
    white-space: nowrap;
    font-size: 11px;
}

.event-date-cost-column .event-archive-choice input {
    flex: 0 0 auto;
    margin: 0;
}

.event-date-cost-column>.event-primary-field:has(.event-description-input) {
    min-height: 0;
}

.event-date-cost-column .event-description-input {
    height: 100%;
    min-height: 0;
}


.event-pm-field-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

@media (max-width: 760px) {
    .event-pm-field-row {
        grid-template-columns: 1fr;
    }
}

.event-pm-field {
    display: grid;
    grid-template-rows: auto 40px 40px 22px 22px 360px;
    align-self: start;
    height: 560px;
    min-height: 560px;
    overflow: hidden;
    gap: 7px;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.event-pm-field legend {
    padding: 0 5px;
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
}

.event-pm-field .modal-input,
.event-pm-file {
    width: 100%;
    margin: 0;
}

.event-results-field {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.event-results-field legend,
.event-results-help,
.event-results-field .event-pm-status,
.event-results-field .event-pm-file-link {
    grid-column: 1 / -1;
}

.event-results-field legend {
    padding: 0 5px;
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
}

.event-results-help {
    min-height: 29px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.event-results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.event-results-actions-lef {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.event-results-actions-lef button {
    width: 100%;
    min-width: 0;
}

.event-results-actions-excel {
    justify-content: flex-start;
}

@media (max-width: 760px) {
    .event-results-field {
        grid-template-columns: 1fr;
    }

    .event-results-actions {
        justify-content: stretch;
    }

    .event-results-actions button {
        flex: 1 1 150px;
    }
}

.event-pm-file-picker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.event-pm-file-picker:hover,
.event-pm-file-picker:focus-within {
    border-color: var(--teal);
    color: var(--teal);
}

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

.event-pm-status {
    color: var(--muted);
    font-size: 12px;
}

.event-pm-file-link {
    width: fit-content;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
}

.event-pm-preview {
    width: 100%;
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
}

.event-archive-choice {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-right: auto;
    color: var(--muted);
    font-size: 12px;
}

.event-website-link {
    display: inline-block;
    margin-top: 4px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.event-website-link:hover,
.event-website-link:focus-visible {
    color: var(--nav);
    text-decoration: underline;
}

.event-group-field {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 220px));
    gap: 8px;
    justify-content: start;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.event-group-field legend {
    padding: 0 5px;
    color: var(--muted);
    font-size: 12px;
}

.event-group-field label {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 8px;
    background: var(--surface-muted);
    color: var(--ink);
    cursor: pointer;
    font-size: 13px;
}

.event-group-field input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.event-cost-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 10px;
    margin-bottom: 14px;
}

.event-cost-field label,
.event-participant-field label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

.event-cost-field input,
.event-cost-field select,
.event-participant select {
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
}

.event-participant-field {
    display: grid;
    gap: 7px;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.event-participant-field legend {
    padding: 0 5px;
    color: var(--muted);
    font-size: 12px;
}

.event-participant-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.event-participant-filters label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    color: var(--ink);
    cursor: pointer;
    font-size: 12px;
}

.event-participant-filters input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.event-participant {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}

.event-participant-header {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.event-participant-filter-status {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.event-participant-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px 14px;
    background-image:
        linear-gradient(var(--line), var(--line)),
        linear-gradient(var(--line), var(--line)),
        linear-gradient(var(--line), var(--line));
    background-position:
        calc(25% - 4px) 0,
        50% 0,
        calc(75% + 4px) 0;
    background-repeat: no-repeat;
    background-size: 1px 100%;
}

.event-participant label {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 30px;
    padding: 4px 6px 4px 0;
    background: var(--surface-muted);
    justify-content: flex-start;
    color: var(--ink);
    font-size: 12px;
}

.event-participant label span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-participant input {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

@media (max-width: 760px) {

    .event-participant-list {
        grid-template-columns: 1fr;
        background-image: none;
    }

    .event-cost-field,
    .event-participant {
        grid-template-columns: minmax(0, 1fr);
    }
}

.calendar-editor .calendar-editor-danger {
    margin-right: auto;
    background: #a33d2f;
}

.planning-modern {
    display: grid;
    gap: 18px;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(23, 50, 58, 0.07);
}

.weekly-plan-placeholder {
    padding: 28px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    font: 18px/1.5 Georgia, "Times New Roman", serif;
}

.weekly-plan-placeholder h3 {
    margin: 0;
    color: var(--nav);
    font: 600 20px/1.3 Georgia, "Times New Roman", serif;
}

.weekly-plan-placeholder p {
    margin: 8px 0 0;
    font: 15px/1.5 Arial, sans-serif;
}

.coach-log-workspace {
    display: grid;
    flex: 1 1 100%;
    grid-column: 1 / -1;
    gap: 12px;
    width: 100%;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    box-sizing: border-box;
}

.coach-log-workspace h3 {
    margin: 0;
    color: var(--nav);
    font: 600 20px/1.3 Georgia, "Times New Roman", serif;
}

.coach-log-summary {
    margin: 0;
    font: 14px/1.45 Arial, sans-serif;
}

.coach-log-periods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.coach-log-period {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: color-mix(in srgb, var(--surface) 90%, var(--teal) 10%);
    overflow: hidden;
}

.coach-log-period h4 {
    margin: 0 0 8px;
    color: var(--nav);
    font: 700 16px/1.3 Georgia, "Times New Roman", serif;
}

.coach-log-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font: 14px/1.35 Arial, sans-serif;
}

.coach-log-table th,
.coach-log-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.coach-log-table thead th {
    color: var(--nav);
    font-weight: 700;
}

.coach-log-table th:first-child {
    width: auto;
    overflow-wrap: anywhere;
}

.coach-log-table td:nth-child(2),
.coach-log-table td:nth-child(3) {
    width: 92px;
    text-align: right;
    white-space: nowrap;
}

.trainer-report-exclusion {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 2px 0;
    color: var(--ink);
    font: 14px/1.4 Arial, sans-serif;
}

.trainer-report-exclusion input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

@media (max-width: 900px) {
    .coach-log-periods {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .coach-log-workspace {
        padding: 16px;
    }

    .coach-log-periods {
        gap: 12px;
    }

    .coach-log-period {
        padding: 10px;
    }

    .coach-log-table th,
    .coach-log-table td {
        padding: 8px 6px;
        font-size: 13px;
    }

    .coach-log-table td:nth-child(2),
    .coach-log-table td:nth-child(3) {
        width: auto;
    }
}

.poolside-mode {
    display: grid;
    gap: 18px;
    max-width: 760px;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: 6px;
    background: var(--surface);
}

.poolside-mode h3,
.poolside-mode p {
    margin: 0;
}

.poolside-mode h3 {
    color: var(--nav);
    font: 600 22px/1.2 Georgia, "Times New Roman", serif;
}

.poolside-mode header p,
.poolside-meta,
.poolside-set-details,
.poolside-save-status {
    color: var(--muted);
    font: 14px/1.45 Arial, sans-serif;
}

.poolside-workout-picker,
.poolside-note {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 16px/1.4 Arial, sans-serif;
}

.poolside-workout-picker {
    min-height: 46px;
    padding: 8px 10px;
}

.poolside-stage {
    display: grid;
    gap: 14px;
}

.poolside-outline {
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.poolside-outline h4 {
    margin: 0 0 8px;
    color: var(--nav);
    font: 600 15px/1.2 Arial, sans-serif;
}

.poolside-outline ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
}

.poolside-outline li {
    color: var(--muted);
    font: 13px/1.35 Arial, sans-serif;
}

.poolside-outline-block>span,
.poolside-outline-track>span,
.poolside-outline-repeat>span {
    color: var(--ink);
    font-weight: 600;
}

.poolside-outline-track>span {
    color: var(--teal);
}

.poolside-outline-set>span {
    color: var(--ink);
}

.poolside-tracks {
    display: grid;
    gap: 14px;
}

.poolside-track {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    background: var(--surface);
}

.poolside-track h4 {
    margin: 0;
    color: var(--teal);
    font: 600 16px/1.2 Arial, sans-serif;
}

.poolside-set-overview {
    display: flex;
    gap: 7px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    list-style: none;
}

.poolside-set-item button {
    min-width: 44px;
    min-height: 40px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 600 13px/1 Arial, sans-serif;
    white-space: nowrap;
}

.poolside-set-item.is-current button {
    border-color: var(--teal);
    box-shadow: inset 0 -3px var(--teal);
}

.poolside-set-item.is-completed button {
    border-color: #5a8b58;
    color: #376b35;
}

.poolside-set-item.is-skipped button {
    color: var(--muted);
    text-decoration: line-through;
}

.poolside-progress {
    font: 600 15px/1.2 Arial, sans-serif;
}

.poolside-current-set {
    min-height: 160px;
    padding: 20px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--teal);
    background: var(--surface-muted);
}

.poolside-set-tags {
    color: var(--teal);
    font: bold 14px/1.2 Arial, sans-serif;
}

.poolside-set-text {
    margin-top: 12px !important;
    color: var(--ink);
    white-space: pre-wrap;
    font: 600 22px/1.35 Georgia, "Times New Roman", serif;
}

.group-files-tree .fancytree-container {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
}

.group-files-tree .fancytree-node {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 5px 7px;
}

.group-files-tree .fancytree-node:hover {
    background: color-mix(in srgb, var(--teal) 10%, transparent);
}

.group-files-tree .fancytree-title,
.group-files-tree-link {
    overflow-wrap: anywhere;
    white-space: normal;
}

.group-files-tree-link {
    padding: 8px 12px;
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 600 14px/1 Arial, sans-serif;
}

.poolside-controls,
.poolside-set-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.poolside-finish {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.poolside-controls button,
.poolside-finish button {
    min-height: 54px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: var(--teal);
    color: #fff;
    font: 600 16px/1 Arial, sans-serif;
}

.poolside-controls button:disabled {
    border-color: var(--line);
    background: var(--surface-muted);
    color: var(--muted);
}

.poolside-finish button:last-of-type {
    border-color: var(--line);
    background: var(--surface-muted);
    color: var(--ink);
}

.poolside-set-actions button:first-child {
    border-color: #5a8b58;
    color: #376b35;
}

.poolside-set-actions button:last-child {
    color: #8a5a24;
}

.poolside-finish button:nth-child(2) {
    border-color: #b36b22;
    background: #fff4e6;
    color: #81480f;
}

.poolside-finish button:nth-child(3) {
    border-color: var(--line);
    background: var(--surface-muted);
    color: var(--ink);
}

.poolside-note-label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font: 600 14px/1.2 Arial, sans-serif;
}

.poolside-note {
    min-height: 86px;
    padding: 10px;
    resize: vertical;
}

.poolside-save-status {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .poolside-mode {
        padding: 16px;
    }

    .poolside-set-text {
        font-size: 19px;
    }

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

    .poolside-timer {
        grid-template-columns: 1fr;
    }

    .poolside-timer-value {
        grid-row: auto;
    }
}

.planning-modern-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.planning-modern-toolbar h4 {
    margin: 0;
    color: var(--nav);
    font-size: 20px;
}

.planning-modern-toolbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.planning-modern-new {
    flex: 0 0 auto;
}

.planning-modern-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.planning-modern-list:empty::before {
    content: "Inga poster ännu.";
    grid-column: 1 / -1;
    padding: 34px 18px;
    border: 1px dashed var(--line);
    border-radius: 6px;
    color: var(--muted);
    text-align: center;
}

.planning-modern-card {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 7px;
    background: var(--surface-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.planning-modern-card:hover,
.planning-modern-card:focus-within {
    border-color: var(--teal);
    box-shadow: 0 7px 18px rgba(23, 50, 58, 0.1);
    transform: translateY(-1px);
}

.planning-modern-card h5 {
    margin: 0;
    color: var(--nav);
    font-size: 16px;
}

.planning-modern-card p {
    margin: 0;
    color: var(--muted);
    font: 13px/1.45 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.planning-modern-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 3px;
}

.planning-modern-card-actions button {
    padding: 7px 10px;
    font-size: 12px;
}

.planning-modern-card-actions button:last-child {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
}

.planning-modern-calendar .fc .fc-daygrid-day-frame {
    min-height: 105px;
}

.planning-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.planning-editor-field {
    min-width: 0;
}

.planning-editor-field.is-wide {
    grid-column: 1 / -1;
}

.planning-editor-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.planning-editor-field input,
.planning-editor-field select,
.planning-editor-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.planning-editor-field textarea {
    min-height: 130px;
    resize: vertical;
}

.reminder-control {
    --reminder-checkbox-size: 16px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--ink);
    font: 12px/1.25 Arial, sans-serif;
}

.reminder-control legend {
    margin-bottom: 6px;
    padding: 0;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.reminder-control-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 5px 8px;
}

.reminder-control-options label {
    display: grid;
    grid-template-columns: var(--reminder-checkbox-size) minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    min-height: 28px;
    gap: 5px;
    margin: 0;
    color: var(--ink);
    font: 12px Arial, sans-serif;
}

.reminder-control-options input {
    box-sizing: border-box;
    width: var(--reminder-checkbox-size);
    min-width: var(--reminder-checkbox-size);
    height: var(--reminder-checkbox-size);
    margin: 0;
    accent-color: var(--teal);
}

.planning-reminder-control,
.workout-reminder-control {
    padding-top: 1px;
}

.calendar-reminder-control {
    width: 100%;
}

.event-reminder-control {
    min-width: 0;
}

@media (max-width: 760px) {
    .reminder-control-options label {
        min-height: 36px;
        font-size: 14px;
    }

    .reminder-control {
        --reminder-checkbox-size: 18px;
    }
}

.development-plan-editor {
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: none;
    padding: 22px 24px 24px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 86%, #dcefee), var(--surface-muted) 145px);
    box-shadow: 0 10px 28px rgba(23, 50, 58, 0.07);
}

.development-plan-editor-header {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto minmax(210px, 0.65fr) minmax(100px, 0.3fr);
    align-items: center;
    gap: 14px;
    padding-bottom: 15px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.development-plan-editor-header h3 {
    margin: 0;
    color: var(--nav);
    font-size: 20px;
}

.development-plan-editor-header p,
.development-plan-guide {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.development-plan-save-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.development-plan-header-swimmer {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.development-plan-header-swimmer select {
    width: 100%;
    min-height: 38px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 13px Arial, sans-serif;
}

.development-plan-header-status {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.development-plan-header-status select {
    width: 100%;
    min-height: 38px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 13px Arial, sans-serif;
}

.development-plan-generation-bar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.development-plan-generation-picker {
    display: grid;
    gap: 4px;
    min-width: 150px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.development-plan-generation-picker select,
.development-plan-generation-arrow,
.development-plan-generation-create,
.development-plan-generation-remove {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 600 12px Arial, sans-serif;
}

.development-plan-generation-picker select {
    padding: 7px 9px;
}

.development-plan-generation-arrow,
.development-plan-generation-remove {
    width: 34px;
    padding: 0;
    font-size: 17px;
}

.development-plan-generation-create {
    padding: 7px 10px;
    border-color: var(--teal);
    color: var(--teal);
}

.development-plan-generation-remove {
    color: var(--danger);
}

.development-plan-generation-bar button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.development-plan-generation-visibility {
    align-self: end;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    gap: 7px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 700 12px/1.2 Arial, sans-serif;
    white-space: nowrap;
}

.development-plan-generation-visibility input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.development-plan-generation-reference {
    cursor: help;
    text-decoration: underline dotted color-mix(in srgb, var(--teal) 65%, transparent);
    text-underline-offset: 3px;
}

.development-plan-editor:not(.is-generation-reference-visible) .development-plan-generation-reference {
    cursor: inherit;
    text-decoration: none;
}

.development-plan-generation-info {
    position: fixed;
    z-index: 30;
    width: min(360px, calc(100vw - 24px));
    max-height: min(300px, calc(100vh - 24px));
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid #75a9cf;
    border-radius: 4px;
    background: #f4faff;
    box-shadow: 0 8px 20px rgba(23, 50, 58, 0.18);
    color: var(--ink);
    font: 12px/1.4 Arial, sans-serif;
}

.development-plan-generation-info-entry {
    display: grid;
    gap: 3px;
    padding: 7px 0;
    border-top: 1px solid color-mix(in srgb, #75a9cf 42%, transparent);
}

.development-plan-generation-info-entry:first-child {
    padding-top: 0;
    border-top: 0;
}

.development-plan-generation-info-entry:last-child {
    padding-bottom: 0;
}

.development-plan-generation-info-entry strong {
    color: #075f9e;
    font-size: 12px;
}

.development-plan-generation-info-entry span {
    white-space: pre-wrap;
}

.development-plan-card-status {
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.development-plan-card-status.is-in-progress {
    border-color: #c58a48;
    background: #fff0d8;
    color: #79501d;
}

.development-plan-card-status.is-complete {
    border-color: #4f9b68;
    background: #e3f4e8;
    color: #28643c;
}

.development-plans-dashboard .training-dashboard-card {
    gap: 6px;
}

.development-plans-dashboard .development-plan-catalog-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.development-plans-dashboard .development-plan-catalog-filters label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 600 12px/1.2 Arial, sans-serif;
}

.development-plans-dashboard .development-plan-catalog-filters input,
.development-plans-dashboard .development-plan-catalog-filters select {
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 14px/1.25 Arial, sans-serif;
}

.development-plans-dashboard .training-dashboard-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.development-plans-dashboard .training-dashboard-section-title,
.development-plans-dashboard .training-dashboard-empty {
    grid-column: 1 / -1;
}

.development-plan-card {
    grid-template-columns: minmax(0, 1fr);
}

.development-plan-card-generation,
.development-plan-card-updated,
.development-plan-card-next,
.development-plan-card-focus {
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
}

.development-plan-card-generation {
    color: var(--ink);
    font-weight: 700;
}

.development-plan-card-progress-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 0;
}

.development-plan-card-progress-item {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 600 11px/1.25 Arial, sans-serif;
}

.development-plan-card-progress-meter {
    display: block;
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: color-mix(in srgb, var(--line) 65%, transparent);
}

.development-plan-card-progress-meter>span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--teal);
}

.development-plan-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.development-plan-card-next-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.development-plan-card-next-step {
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, var(--teal) 55%, var(--line));
    border-radius: 4px;
    background: var(--surface);
    color: var(--teal);
    font: 700 11px/1.2 Arial, sans-serif;
    cursor: pointer;
}

.development-plan-card-next-step:hover,
.development-plan-card-next-step:focus-visible {
    background: color-mix(in srgb, var(--teal) 10%, var(--surface));
}

.development-plan-card-generation-picker {
    min-height: 34px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 12px/1.2 Arial, sans-serif;
}

@media (max-width: 640px) {

    .development-plans-dashboard .development-plan-catalog-filters,
    .development-plans-dashboard .training-dashboard-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .development-plan-card-progress-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.development-plan-card-identity {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.development-plan-card-identity .training-dashboard-avatar {
    --avatar-size: 32px;
    flex: 0 0 auto;
}

.development-plan-card-identity-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.development-plan-card-swimmer {
    overflow: hidden;
    color: var(--nav);
    font: 700 15px/1.2 Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.development-plan-card-group,
.development-plan-card-progress {
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
}

.development-plan-card-plan {
    color: var(--ink);
    font: 600 13px/1.35 Arial, sans-serif;
}

.development-plan-card-progress {
    overflow-wrap: anywhere;
}

.development-plan-swimmer-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 68px;
    padding: 11px 2px 3px;
}

.development-plan-profile-identity,
.development-plan-profile-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.development-plan-profile-training-week {
    flex: 1 1 500px;
    min-width: 0;
    padding: 6px 10px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
}

.development-plan-profile-training-week>strong {
    display: block;
    margin-bottom: 4px;
    color: var(--nav);
    font: 600 12px/1.2 Arial, sans-serif;
}

.development-plan-profile-training-week>span {
    color: var(--muted);
    font: 11px/1.25 Arial, sans-serif;
}

.development-plan-profile-training-week-list {
    display: grid;
    gap: 2px;
}

.development-plan-profile-training-week-row {
    display: grid;
    grid-template-columns: 30px repeat(4, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font: 11px/1.25 Arial, sans-serif;
}

.development-plan-profile-training-week-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.development-plan-profile-training-week-row span:first-child {
    color: var(--ink);
    font-weight: 600;
}

.development-plan-profile-timestamps {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font: 11px/1.25 Arial, sans-serif;
    text-align: right;
    white-space: nowrap;
}

.development-plan-profile-timestamps span {
    display: block;
}

.development-plan-profile-identity strong,
.development-plan-profile-group strong,
.development-plan-profile-identity span,
.development-plan-profile-group span {
    display: block;
}

.development-plan-profile-identity strong,
.development-plan-profile-group strong {
    color: var(--nav);
    font-size: 14px;
}

.development-plan-profile-identity span,
.development-plan-profile-group span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.development-plan-profile-avatar,
.development-plan-group-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--nav);
    font-size: 13px;
    font-weight: 700;
    object-fit: cover;
}

.development-plan-group-avatar {
    width: 38px;
    height: 38px;
}

.development-plan-metadata {
    display: grid;
    grid-template-columns: minmax(360px, 1.7fr) minmax(150px, 0.45fr);
    gap: 12px;
}

.development-plan-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 12px;
    align-items: start;
}

.development-plan-triangle-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    grid-template-areas:
        "result priority-one"
        "priority-two priority-three";
    gap: 28px 56px;
    align-items: stretch;
    margin-bottom: 12px;
}

.development-plan-triangle-connectors {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.development-plan-triangle-connectors path:not(defs path) {
    fill: none;
    stroke: #0879c9;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.development-plan-triangle-connectors marker path {
    fill: #0879c9;
}

.development-plan-triangle-field {
    position: relative;
    z-index: 1;
    min-height: 156px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}

.development-plan-triangle-field.is-result {
    grid-area: result;
}

.development-plan-triangle-field.is-priority-one {
    grid-area: priority-one;
}

.development-plan-triangle-field.is-priority-two {
    grid-area: priority-two;
}

.development-plan-triangle-field.is-priority-three {
    grid-area: priority-three;
}

.development-plan-triangle-field textarea {
    min-height: 104px;
}

.development-plan-triangle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.development-plan-priority-badge {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid #0879c9;
    border-radius: 50%;
    color: #075f9e;
    font: 700 13px/1 Arial, sans-serif;
}

.development-plan-result-star {
    display: inline-block;
    width: 15px;
    height: 15px;
    color: #d6a310;
}

.development-plan-result-star::before {
    content: "\2605";
    display: block;
    font: 700 16px/15px Arial, sans-serif;
}

.development-plan-triangle-focus {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.development-plan-triangle-focus h4 {
    margin: 0;
    color: var(--nav);
    font: 700 14px/1.25 Arial, sans-serif;
}

.development-plan-triangle-focus>p {
    margin: 3px 0 10px;
    color: var(--muted);
    font: 12px/1.3 Arial, sans-serif;
}

.development-plan-triangle-focus-fields {
    display: grid;
    gap: 7px;
}

.development-plan-triangle-focus-field {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.development-plan-triangle-focus-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font: 600 10px/1.1 Arial, sans-serif;
    white-space: nowrap;
}

.development-plan-triangle-focus-label>span:first-child {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid #0879c9;
    border-radius: 50%;
    color: #075f9e;
    font: 700 13px/1 Arial, sans-serif;
}

.development-plan-triangle-focus-field textarea {
    min-height: 48px;
    resize: vertical;
}

.development-plan-pyramid {
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: min(100%, 1180px);
    min-height: 900px;
    margin-inline: auto;
    padding: 250px 36px 24px;
    isolation: isolate;
}

.development-plan-pyramid-outline {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    inset: 8px 0 12px;
    width: 100%;
    height: calc(100% - 20px);
    overflow: visible;
}

.development-plan-pyramid-outline polygon {
    fill: none;
    stroke: #075f9e;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.development-plan-pyramid-success-star {
    position: absolute;
    z-index: 1;
    top: 112px;
    left: 50%;
    color: #f2c230;
    font: 700 34px/1 Arial, sans-serif;
    text-shadow: 0 0 0 #c99812;
    transform: translateX(-50%);
}

.development-plan-pyramid-field {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    display: grid;
    gap: 4px;
    padding: 7px 8px;
    border: 0;
    border-radius: 3px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: none;
}

.development-plan-pyramid-field>span {
    color: var(--nav);
    font: 700 11px/1.2 Arial, sans-serif;
    text-align: center;
}

.development-plan-pyramid-guide {
    color: var(--muted);
    font: 600 11px/1.25 Arial, sans-serif;
    text-align: center;
}

.development-plan-pyramid-field textarea {
    min-height: 48px;
    padding: 6px 8px;
    border: 0;
    background: var(--surface);
    font-size: 12px;
    text-align: center;
    resize: vertical;
}

.development-plan-pyramid-field textarea:focus {
    outline: 2px solid #075f9e;
    outline-offset: -2px;
}

.development-plan-pyramid-field.is-result {
    width: max(160px, 14%);
}

.development-plan-pyramid-field.is-result textarea {
    border: 1px solid var(--line);
    box-shadow: none;
}

.development-plan-pyramid-field.is-tactics {
    width: max(280px, 28%);
}

.development-plan-pyramid-field.is-capacity {
    width: max(380px, 42%);
}

.development-plan-pyramid-field.is-support {
    width: max(480px, 52%);
}

.development-plan-pyramid-field.is-recovery {
    width: max(580px, 62%);
}

.development-plan-pyramid-field.is-environment {
    width: max(680px, 72%);
}

.development-plan-pyramid-field.is-foundation {
    width: max(780px, 82%);
    transform: translateY(-6px);
}

.development-plan-metadata label,
.development-plan-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.development-plan-metadata input,
.development-plan-metadata select,
.development-plan-field input,
.development-plan-field textarea,
.development-plan-rating-table select,
.development-plan-test-table input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 13px/1.35 Arial, sans-serif;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.development-plan-metadata input:focus,
.development-plan-metadata select:focus,
.development-plan-field input:focus,
.development-plan-field textarea:focus,
.development-plan-rating-table select:focus,
.development-plan-test-table input:focus {
    outline: 0;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent);
    background: var(--surface);
}

.development-plan-field textarea {
    min-height: 112px;
    resize: vertical;
}

.development-plan-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 2px;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: color-mix(in srgb, var(--surface) 72%, var(--surface-muted));
}

.development-plan-tab {
    display: flex;
    align-items: center;
    min-width: 150px;
    min-height: 42px;
    border: 0;
    background: transparent;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.development-plan-tab-button {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px;
    padding: 9px 8px 9px 14px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.development-plan-tab.is-active {
    border-radius: 4px;
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(23, 50, 58, 0.12);
}

.development-plan-tab.is-active .development-plan-tab-button {
    color: var(--teal);
    font-weight: 700;
}

.development-plan-tab:hover:not(.is-active) {
    color: var(--nav);
    background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.development-plan-competition-layout {
    display: grid;
    gap: 14px;
}

.development-plan-competition-layout h4 {
    margin: 0 0 9px;
    color: var(--nav);
    font: 700 13px/1.2 Arial, sans-serif;
}

.development-plan-competition-intro,
.development-plan-distance-card,
.development-plan-competition-qualities,
.development-plan-competition-block,
.development-plan-competition-metrics {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: color-mix(in srgb, var(--surface-muted) 38%, var(--surface));
}

.development-plan-competition-intro textarea {
    min-height: 72px;
}

.development-plan-special-goal-grid,
.development-plan-competition-planning {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.development-plan-special-goal-card {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: color-mix(in srgb, var(--surface-muted) 38%, var(--surface));
}

.development-plan-special-goal-header {
    position: relative;
    grid-column: 1 / -1;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.development-plan-special-distance-echo {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--nav);
    font: 700 18px/1 Arial, sans-serif;
}

.development-plan-special-goal-header h4,
.development-plan-special-target h4,
.development-plan-special-pool h4 {
    margin: 0;
    color: var(--nav);
    font: 700 13px/1.2 Arial, sans-serif;
}

.development-plan-special-goal-header .development-plan-special-suggestion {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.development-plan-special-distance {
    display: grid;
    gap: 4px;
    min-width: min(100%, 210px);
    color: var(--muted);
    font: 600 11px/1.1 Arial, sans-serif;
}

.development-plan-special-distance select {
    min-width: 0;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 12px/1.2 Arial, sans-serif;
}

.development-plan-special-target,
.development-plan-special-pool {
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 4px;
    background: var(--surface);
}

.development-plan-special-target {
    grid-column: 1;
}

.development-plan-special-target h4,
.development-plan-special-pool h4 {
    margin-bottom: 8px;
}

.development-plan-special-target-fields {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
}

.development-plan-special-field {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: var(--muted);
    font: 600 11px/1.15 Arial, sans-serif;
}

.development-plan-special-field input,
.development-plan-special-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 12px/1.3 Arial, sans-serif;
}

.development-plan-special-field textarea {
    min-height: 34px;
    resize: vertical;
}

.development-plan-special-target-fields .development-plan-special-field:last-child {
    grid-column: auto;
}

.development-plan-special-current {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
}

.development-plan-special-pool-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.development-plan-special-pool-fields .development-plan-special-field:last-child {
    grid-column: auto;
}

.development-plan-special-suggestion {
    grid-column: 1 / -1;
    min-height: 15px;
    margin: 8px 0 0;
    color: var(--muted);
    font: 11px/1.25 Arial, sans-serif;
}

.development-plan-competition-qualities textarea {
    min-height: 92px;
}

.development-plan-competition-block textarea {
    min-height: 128px;
}

.development-plan-multi-year {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: color-mix(in srgb, var(--surface-muted) 38%, var(--surface));
}

.development-plan-multi-year-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.development-plan-multi-year-title h4 {
    flex: 0 0 auto;
    margin: 0;
}

.development-plan-multi-year-description {
    margin: 0;
    color: var(--ink);
    font: italic 600 13px/1.25 Arial, sans-serif;
}

.development-plan-multi-year-table {
    display: grid;
    gap: 1px;
    overflow: visible;
    border: 1px solid var(--line);
    background: var(--line);
}

.development-plan-multi-year-header,
.development-plan-multi-year-row {
    display: grid;
    grid-template-columns: minmax(145px, 0.9fr) repeat(4, minmax(0, 1.5fr));
    gap: 1px;
}

.development-plan-multi-year-header {
    position: relative;
    z-index: 2;
}

.development-plan-multi-year-header>strong,
.development-plan-multi-year-header>.development-plan-year-picker,
.development-plan-multi-year-row>strong,
.development-plan-multi-year-cell {
    min-width: 0;
    padding: 8px;
    background: var(--surface);
}

.development-plan-multi-year-header>strong {
    text-align: center;
    color: var(--ink);
    font: 700 14px/1.2 Arial, sans-serif;
}

.development-plan-multi-year-header>.development-plan-year-picker {
    width: 100%;
    background: var(--surface);
}

.development-plan-multi-year-header>.development-plan-year-picker .development-plan-year-picker-button {
    min-height: 36px;
    font-size: 14px;
    text-align: center;
}

.development-plan-multi-year-header>strong:first-child,
.development-plan-multi-year-row>strong {
    text-align: left;
    color: var(--nav);
    font: 700 14px/1.25 Arial, sans-serif;
}

.development-plan-multi-year-row>strong {
    display: flex;
    align-items: center;
}

.development-plan-multi-year-cell>span {
    display: none;
}

.development-plan-multi-year-cell textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 86px;
    padding: 6px 7px;
    border: 0;
    resize: vertical;
    background: transparent;
    color: var(--ink);
    font: 12px/1.3 Arial, sans-serif;
}

.development-plan-competition-table {
    display: grid;
    gap: 7px;
}

.development-plan-competition-table-header,
.development-plan-competition-table-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.15fr) minmax(120px, 1fr) minmax(92px, 0.72fr) minmax(116px, 0.68fr) minmax(116px, 0.68fr) minmax(140px, 1.2fr) 36px;
    gap: 7px;
}

.development-plan-competition-table-header {
    color: var(--muted);
    font: 600 11px/1.15 Arial, sans-serif;
}

.development-plan-competition-table-cell {
    min-width: 0;
}

.development-plan-competition-table-cell>span {
    display: none;
}

.development-plan-competition-table-cell input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 12px/1.2 Arial, sans-serif;
}

.development-plan-competition-table-cell select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 12px/1.2 Arial, sans-serif;
}

.development-plan-competition-remove {
    align-self: end;
    display: grid;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    place-items: center;
    padding: 0;
    border: 1px solid #c8423f;
    border-radius: 4px;
    background: var(--surface);
    color: #b42318;
    font: 600 16px/1 Arial, sans-serif;
}

.development-plan-competition-remove:disabled {
    border-color: var(--line);
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.55;
}

.development-plan-competition-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.development-plan-competition-metric-grid textarea {
    min-height: 58px;
}

.development-plan-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.development-plan-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.development-plan-panel-header h4 {
    margin: 0;
    color: var(--nav);
    font-size: 16px;
}

.development-plan-info-tag {
    flex: 0 0 auto;
    min-height: 27px;
    margin-right: 9px;
    padding: 4px 10px;
    border: 1px solid #1b7170;
    border-radius: 999px;
    background: #e0f2f0;
    color: #145b5a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.development-plan-info-tag:hover,
.development-plan-info-tag:focus-visible {
    border-color: #0d5a59;
    background: #c8e8e4;
    color: #0d4c4b;
}

.development-plan-rating-group h4 .development-plan-info-tag {
    margin-left: 8px;
    vertical-align: middle;
}

.development-plan-info-tag.is-physical {
    border-color: #65833d;
    background: #e7f2d8;
    color: #3e5f1d;
}

.development-plan-info-tag.is-physical:hover,
.development-plan-info-tag.is-physical:focus-visible {
    border-color: #4e6b2b;
    background: #d6eabf;
    color: #314b17;
}

.development-plan-info-tag.is-mental {
    border-color: #a95f42;
    background: #f8e0d4;
    color: #7a3f2b;
}

.development-plan-info-tag.is-mental:hover,
.development-plan-info-tag.is-mental:focus-visible {
    border-color: #88462f;
    background: #f0cbb9;
    color: #653020;
}

.development-plan-info-dialog {
    width: min(980px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(12, 35, 50, 0.34);
}

.development-plan-info-dialog::backdrop {
    background: rgba(14, 37, 43, 0.56);
    backdrop-filter: blur(3px);
}

.development-plan-delete-dialog {
    width: min(460px, calc(100vw - 32px));
}

.development-plan-delete-dialog-body {
    display: grid;
    gap: 18px;
    padding: 20px;
    color: var(--ink);
    font: 14px/1.45 Arial, sans-serif;
}

.development-plan-delete-dialog-body p {
    margin: 0;
}

.development-plan-delete-dialog-body label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font: 700 12px/1.2 Arial, sans-serif;
}

.development-plan-delete-dialog-body input {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 14px/1.2 Arial, sans-serif;
}

.development-plan-delete-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.development-plan-delete-dialog-actions button {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 700 12px/1.2 Arial, sans-serif;
    cursor: pointer;
}

.development-plan-delete-dialog-actions .development-plan-delete-confirm {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
}

.development-plan-info-drawer {
    position: fixed;
    z-index: 40;
    top: 0;
    right: 0;
    width: min(620px, 100vw);
    height: 100dvh;
    box-sizing: border-box;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    background: #edf3f2;
    box-shadow: -14px 0 28px rgba(23, 50, 58, 0.2);
    animation: workout-set-drawer-in 180ms ease-out;
}

.development-plan-info-drawer .development-plan-info-notes {
    padding: 24px;
    background: transparent;
}

.development-plan-info-drawer .development-plan-info-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.development-plan-info-drawer .development-plan-info-close {
    flex: 0 0 auto;
}

.development-plan-info-dialog>header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.development-plan-info-dialog h3 {
    margin: 0;
    color: var(--nav);
    font-size: 18px;
}

.development-plan-info-close {
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 12px;
    cursor: pointer;
}

.development-plan-info-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 24px;
    background: #edf3f2;
}

.development-plan-info-notes.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.development-plan-info-note {
    min-width: 0;
    min-height: 330px;
    padding: 17px 18px 20px;
    border: 1px solid rgba(71, 68, 26, 0.24);
    border-radius: 2px;
    box-shadow: 3px 5px 10px rgba(31, 45, 44, 0.18);
    transform: rotate(-0.4deg);
}

.development-plan-info-note.is-content {
    background: #fff4a8;
}

.development-plan-info-note.is-criteria {
    background: #ffd8bc;
    transform: rotate(0.55deg);
}

.development-plan-info-note.is-comparison {
    min-height: 0;
    background: #dcecf8;
    transform: rotate(-0.2deg);
}

.development-plan-info-note.is-physical {
    min-height: 0;
    background: #e7f2d8;
}

.development-plan-info-note.is-mental {
    min-height: 0;
    background: #f8e0d4;
}

@media (max-width: 640px) {
    .development-plan-info-drawer {
        width: 100vw;
    }

    .development-plan-info-drawer .development-plan-info-notes {
        padding: 14px;
    }
}

.development-plan-info-note-header {
    margin: -17px -18px 15px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(71, 68, 26, 0.22);
    background: rgba(255, 255, 255, 0.3);
    color: #253d3b;
    font-size: 14px;
}

.development-plan-info-note-content {
    display: block;
    width: 100%;
    margin: 0;
    white-space: pre-line;
    color: #253d3b;
    font: 14px/1.55 Georgia, serif;
}

.development-plan-info-comparison {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    color: #253d3b;
    font: 13px/1.4 Georgia, serif;
}

.development-plan-info-comparison>* {
    min-width: 0;
    padding: 9px 8px;
    border-bottom: 1px solid rgba(71, 68, 26, 0.18);
}

.development-plan-info-comparison> :nth-last-child(-n + 2) {
    border-bottom: 0;
}

.development-plan-info-comparison strong {
    background: rgba(255, 255, 255, 0.34);
    font: 700 13px/1.25 Arial, sans-serif;
}

.development-plan-info-comparison> :nth-child(odd) {
    border-right: 1px solid rgba(71, 68, 26, 0.18);
}

textarea.development-plan-info-note-content {
    min-height: 250px;
    padding: 0;
    border: 0;
    outline: 0;
    resize: vertical;
    background: transparent;
}

textarea.development-plan-info-note-content:focus {
    box-shadow: inset 0 -2px 0 #1b7170;
}

.development-plan-info-note.is-content textarea.development-plan-info-note-content {
    background: #fff4a8 !important;
}

.development-plan-info-note.is-criteria textarea.development-plan-info-note-content {
    background: #ffd8bc !important;
}

.development-plan-rating-group {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: color-mix(in srgb, var(--surface-muted) 62%, var(--surface));
}

.development-plan-rating-group h4 {
    margin: 0 0 4px;
    color: var(--nav);
    font-size: 14px;
}

.development-plan-rating-group .development-plan-guide {
    margin: 0 0 10px;
}

.development-plan-situation-group .development-plan-field-grid {
    margin-top: 10px;
}

.development-plan-rating-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 8px;
}

.development-plan-rating-table label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 7px 8px 7px 10px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
}

.development-plan-rating-table label>span {
    font-weight: 600;
}

.development-plan-test-table {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(100px, 1fr));
    gap: 1px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--line);
}

.development-plan-test-table>* {
    min-width: 0;
    padding: 8px;
    background: var(--surface);
    font-size: 12px;
}

.development-plan-test-table>strong {
    background: color-mix(in srgb, var(--surface-muted) 74%, var(--surface));
    color: var(--nav);
    font-size: 12px;
}

.development-plan-test-table input {
    min-height: 34px;
    border: 0;
    border-radius: 0;
}

.development-plan-test-section {
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.development-plan-test-section h4 {
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--nav);
    font-size: 15px;
}

.development-plan-progression-table,
.development-plan-test-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--surface);
}

.development-plan-progression-table {
    min-width: 980px;
}

.development-plan-test-table {
    min-width: 720px;
}

.development-plan-progression-table th,
.development-plan-progression-table td,
.development-plan-test-table th,
.development-plan-test-table td {
    min-width: 0;
    padding: 0;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 12px;
    text-align: left;
    vertical-align: middle;
}

.development-plan-progression-table thead th,
.development-plan-test-table thead th {
    padding: 8px;
    background: color-mix(in srgb, var(--surface-muted) 74%, var(--surface));
    color: var(--nav);
    font-weight: 700;
}

.development-plan-progression-table thead th:nth-child(1) {
    width: 86px;
}

.development-plan-progression-table thead th:nth-child(2) {
    width: 82px;
}

.development-plan-progression-table tbody th {
    padding: 7px 8px;
    font-weight: 700;
}

.development-plan-progression-table tbody tr:nth-child(3n + 1) th,
.development-plan-progression-table tbody tr:nth-child(3n + 1) td {
    border-top-width: 2px;
    border-top-color: var(--nav);
}

.development-plan-progression-table input,
.development-plan-test-table input {
    display: block;
    width: 100%;
    min-height: 34px;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.development-plan-progression-table input:focus,
.development-plan-test-table input:focus,
.development-plan-year-picker-button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid var(--teal);
    outline-offset: -2px;
}

.development-plan-test-table thead th:first-child,
.development-plan-test-table tbody th {
    width: 34%;
}

.development-plan-test-table tbody th {
    padding: 7px 8px;
    font-weight: 600;
}

.development-plan-test-group-row th,
.development-plan-test-group-row td {
    border-top-width: 2px;
    border-top-color: var(--nav);
    background: color-mix(in srgb, var(--surface-muted) 74%, var(--surface));
}

.development-plan-test-group-row th {
    color: var(--nav);
    font-weight: 700;
}

.development-plan-year-picker {
    position: relative;
    min-width: 0;
}

.development-plan-year-picker-button {
    width: 100%;
    min-height: 34px;
    padding: 6px 24px 6px 8px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    color: var(--ink);
    font: 700 12px/1.2 Arial, sans-serif;
    text-align: left;
    cursor: pointer;
}

.development-plan-year-picker-button::after {
    position: absolute;
    top: 50%;
    right: 8px;
    content: "⌄";
    transform: translateY(-52%);
}

.development-plan-year-picker-menu {
    position: absolute;
    z-index: 12;
    bottom: calc(100% + 4px);
    left: 0;
    width: 248px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(23, 50, 58, 0.22);
}

.development-plan-year-picker-navigation {
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.development-plan-year-picker-navigation button {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.development-plan-year-picker-navigation strong {
    color: var(--nav);
    font-size: 12px;
    text-align: center;
}

.development-plan-year-picker-years {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.development-plan-year-picker-option {
    min-height: 32px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 700 12px/1.2 Arial, sans-serif;
    cursor: pointer;
}

.development-plan-year-picker-option:hover,
.development-plan-year-picker-option:focus-visible,
.development-plan-year-picker-option.is-selected {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.development-plan-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}

@media (min-width: 641px) and (max-width: 900px) {
    .development-plan-special-goal-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .development-plan-special-current {
        grid-column: 1;
    }
}

@media (max-width: 640px) {
    .development-plan-editor {
        padding: 14px;
    }

    .development-plan-special-goal-grid,
    .development-plan-competition-planning,
    .development-plan-competition-metric-grid,
    .development-plan-special-current {
        grid-template-columns: 1fr;
    }

    .development-plan-special-target-fields,
    .development-plan-special-pool-fields {
        grid-template-columns: 1fr;
    }

    .development-plan-competition-table-header {
        display: none;
    }

    .development-plan-competition-table-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--line);
    }

    .development-plan-competition-table-cell>span {
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font: 600 11px/1.15 Arial, sans-serif;
    }

    .development-plan-competition-table-cell:nth-child(6) {
        grid-column: 1 / -1;
    }

    .development-plan-competition-remove {
        grid-column: 2;
        justify-self: end;
    }

    .development-plan-multi-year-table {
        gap: 10px;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .development-plan-multi-year-header {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        background: transparent;
    }

    .development-plan-multi-year-header>strong {
        display: none;
    }

    .development-plan-multi-year-header>.development-plan-year-picker {
        border: 1px solid var(--line);
        background: var(--surface);
    }

    .development-plan-multi-year-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    .development-plan-multi-year-row>strong {
        grid-column: 1 / -1;
        padding: 0;
        background: transparent;
    }

    .development-plan-multi-year-cell {
        padding: 0;
    }

    .development-plan-multi-year-cell>span {
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font: 600 11px/1.15 Arial, sans-serif;
    }

    .development-plan-multi-year-cell textarea {
        min-height: 72px;
        border: 1px solid var(--line);
        background: var(--surface);
    }

    .development-plan-special-target-fields .development-plan-special-field:last-child,
    .development-plan-special-pool-fields .development-plan-special-field:last-child {
        grid-column: auto;
    }

    .development-plan-special-goal-header {
        align-items: stretch;
        flex-direction: column;
    }

    .development-plan-special-distance {
        min-width: 0;
    }

    .development-plan-editor-header,
    .development-plan-metadata,
    .development-plan-field-grid,
    .development-plan-triangle-map,
    .development-plan-rating-table {
        grid-template-columns: 1fr;
    }

    .development-plan-triangle-map {
        grid-template-areas:
            "result"
            "priority-one"
            "priority-two"
            "priority-three";
        gap: 12px;
    }

    .development-plan-triangle-focus-field {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .development-plan-pyramid {
        min-height: 0;
        padding: 0;
        gap: 8px;
    }

    .development-plan-pyramid-outline {
        display: none;
    }

    .development-plan-pyramid-success-star {
        display: none;
    }

    .development-plan-pyramid-field,
    .development-plan-pyramid-field.is-result,
    .development-plan-pyramid-field.is-tactics,
    .development-plan-pyramid-field.is-capacity,
    .development-plan-pyramid-field.is-support,
    .development-plan-pyramid-field.is-recovery,
    .development-plan-pyramid-field.is-environment,
    .development-plan-pyramid-field.is-foundation {
        width: 100%;
        transform: none;
    }

    .development-plan-triangle-connectors {
        display: none;
    }

    .development-plan-triangle-field:not(.is-result) {
        border-left: 3px solid #0879c9;
    }

    .development-plan-info-notes {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }

    .development-plan-info-note {
        min-height: 0;
    }

    .development-plan-editor-header {
        align-items: start;
    }

    .development-plan-swimmer-profile {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .development-plan-profile-training-week {
        box-sizing: border-box;
        width: 100%;
        border: 0;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
    }

    .development-plan-profile-training-week-row {
        grid-template-columns: 30px repeat(2, minmax(0, 1fr));
    }

    .development-plan-rating-table label {
        grid-template-columns: 1fr;
    }

    .development-plan-test-table {
        grid-template-columns: 150px repeat(3, minmax(115px, 1fr));
    }

    .development-plan-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.weekly-plan-editor {
    display: grid;
    grid-column: 1 / -1;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.weekly-plan-editor h3,
.weekly-plan-editor h4,
.weekly-plan-editor p {
    margin: 0;
}

.weekly-plan-editor p {
    color: var(--muted);
    font-size: 13px;
}

.weekly-plan-editor-context {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-left: 4px solid var(--teal);
    background: #eaf4f1;
}

.weekly-plan-editor-context strong {
    color: var(--nav);
    font-size: 15px;
}

.weekly-plan-editor-context span {
    color: var(--muted);
    font-size: 12px;
}

.weekly-plan-editor-metadata,
.weekly-plan-editor-row-fields {
    display: grid;
    gap: 10px;
}

.weekly-plan-editor-metadata {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weekly-plan-editor label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 12px Arial, sans-serif;
}

.weekly-plan-editor input,
.weekly-plan-editor select,
.weekly-plan-editor textarea {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.weekly-plan-editor textarea {
    min-height: 76px;
    resize: vertical;
}

.weekly-plan-editor-rows-heading,
.weekly-plan-editor-actions,
.weekly-plan-editor-row-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weekly-plan-editor-row-header strong {
    color: var(--nav);
    font: 700 12px Arial, sans-serif;
}

.weekly-plan-editor-row-header {
    justify-content: space-between;
    min-height: 34px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--line);
}

.weekly-plan-editor-rows-heading {
    justify-content: space-between;
}

.weekly-plan-editor-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.weekly-plan-editor-add,
.weekly-plan-editor-remove {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 600 12px Arial, sans-serif;
}

.weekly-plan-editor-remove {
    align-self: start;
    min-width: 68px;
    min-height: 34px;
    padding: 7px 8px;
    margin: 0;
    border-color: #cf8383;
    background: #fffafa;
    color: var(--danger);
    white-space: nowrap;
}

.weekly-plan-editor-rows {
    display: grid;
    gap: 10px;
}

.weekly-plan-editor-day {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    background: #fbfcfb;
}

.weekly-plan-editor-day-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.weekly-plan-editor-day h5 {
    margin: 0;
    color: var(--nav);
    font-size: 13px;
}

.weekly-plan-editor-day-rows {
    display: grid;
    gap: 7px;
}

.weekly-plan-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 5px 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.weekly-plan-editor-row.is-spacer {
    min-height: 42px;
    border-style: dashed;
    background: #f0f3f2;
}

.weekly-plan-editor-row.is-freetext {
    background: #fffefb;
}

.weekly-plan-editor-spacer {
    display: block;
    padding: 7px 2px;
    color: var(--muted);
    font: italic 12px Arial, sans-serif;
}

.weekly-plan-editor-freetext {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
}

.weekly-plan-editor-freetext textarea {
    min-height: 42px;
    height: 42px;
}

.weekly-plan-editor-row-fields {
    gap: 4px;
    grid-template-columns: 110px 82px 94px minmax(110px, 0.7fr) minmax(180px, 2fr) 78px minmax(90px, 0.7fr);
}

.weekly-plan-editor-row-fields label:nth-child(5) {
    grid-row: auto;
}

.weekly-plan-editor-row-fields textarea {
    min-height: 38px;
    height: 38px;
}

.weekly-plan-day-add {
    position: relative;
}

.weekly-plan-day-add summary {
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--nav);
    cursor: pointer;
    font: 600 12px/1 Arial, sans-serif;
    list-style: none;
}

.weekly-plan-day-add summary::-webkit-details-marker {
    display: none;
}

.weekly-plan-day-add summary::before {
    content: "+";
    margin-right: 6px;
    color: var(--teal);
    font-size: 15px;
}

.weekly-plan-day-add[open] summary {
    border-color: var(--teal);
    background: #eaf4f1;
}

.weekly-plan-day-add-options {
    position: absolute;
    z-index: 12;
    top: calc(100% + 4px);
    right: 0;
    display: grid;
    min-width: 148px;
    padding: 5px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: 0 10px 20px rgba(23, 50, 58, 0.18);
}

.weekly-plan-day-add-options button {
    min-height: 34px;
    padding: 7px 8px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    font: 13px Arial, sans-serif;
}

.weekly-plan-day-add-options button:hover,
.weekly-plan-day-add-options button:focus-visible {
    background: #eaf4f1;
    color: var(--nav);
}

.weekly-plan-layout-rows {
    display: grid;
    gap: 10px;
    padding: 18px 22px 26px;
    overflow-y: auto;
}

.weekly-plan-layout-empty {
    margin: 0;
    padding: 14px 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.weekly-plan-layout-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    min-height: 84px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    cursor: grab;
}

.weekly-plan-layout-row.is-dragging {
    opacity: .45;
}

.weekly-plan-layout-row.is-drop-target {
    border-color: var(--teal);
    box-shadow: inset 0 3px var(--teal);
}

.weekly-plan-layout-row.is-spacer {
    min-height: 56px;
    border-style: dashed;
    background: #f0f3f2;
}

.weekly-plan-layout-row.is-freetext {
    min-height: 66px;
    background: #fffefb;
}

.weekly-plan-layout-spacer {
    color: var(--muted);
    font: italic 14px Arial, sans-serif;
}

.weekly-plan-layout-freetext {
    color: var(--ink) !important;
    font-weight: 600;
    white-space: pre-wrap;
}

.weekly-plan-layout-handle {
    padding-top: 3px;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: grab;
}

.weekly-plan-layout-content {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.weekly-plan-layout-schedule {
    color: var(--nav);
    font: 700 14px/1.25 Arial, sans-serif;
}

.weekly-plan-layout-row .weekly-plan-layout-activity {
    color: var(--ink);
    font: 600 16px/1.3 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.weekly-plan-layout-row .weekly-plan-layout-details {
    color: var(--muted);
    font: 13px/1.35 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.weekly-plan-layout-move {
    display: flex;
    gap: 5px;
}

.weekly-plan-layout-move button {
    display: grid;
    place-items: center;
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--nav);
    font: 700 18px/1 Arial, sans-serif;
}

.weekly-plan-layout-move button:disabled {
    opacity: .4;
}

.weekly-plan-order-open {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: #eaf4f1;
    color: var(--nav);
    font: 700 12px Arial, sans-serif;
}

.weekly-plan-order-drawer {
    position: absolute;
    z-index: 30;
    top: 0;
    right: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(880px, calc(100vw - 56px));
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    border-left: 4px solid var(--teal);
    background: #fffefb;
    box-shadow: -18px 0 38px rgba(23, 50, 58, 0.24);
    transform: translateX(104%);
    transition: transform 180ms ease-out;
}

.weekly-plan-order-drawer.is-open {
    transform: translateX(0);
}

.weekly-plan-order-drawer>header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 12px;
    border-bottom: 1px solid var(--line);
}

.weekly-plan-order-drawer h3 {
    margin: 0;
    color: var(--nav);
    font: 700 21px/1.15 Arial, sans-serif;
}

.weekly-plan-order-drawer header p,
.weekly-plan-order-help {
    margin: 5px 0 0;
    color: var(--muted);
    font: 14px/1.4 Arial, sans-serif;
}

.weekly-plan-order-help {
    margin: 0;
    padding: 12px 22px;
    border-bottom: 1px solid var(--line);
    background: #f3f8f6;
}

.weekly-plan-order-close {
    width: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--nav);
    font: 700 26px/1 Arial, sans-serif;
}

.weekly-plan-coach-picker {
    position: relative;
}

.weekly-plan-coach-picker-button {
    width: 100%;
    min-height: 38px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    font: 14px Arial, sans-serif;
}

.weekly-plan-coach-picker-menu {
    position: absolute;
    z-index: 10;
    top: calc(100% + 4px);
    left: 0;
    display: grid;
    gap: 3px;
    width: max-content;
    min-width: 0;
    max-width: min(260px, calc(100vw - 48px));
    max-height: 250px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--teal);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(23, 50, 58, 0.2);
}

.weekly-plan-coach-picker-menu[hidden] {
    display: none;
}

.weekly-plan-coach-picker-menu label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 5px 7px 5px 4px;
    border-radius: 3px;
    color: var(--ink);
    cursor: pointer;
    font-size: 13px;
    line-height: 1.2;
}

.weekly-plan-coach-picker-menu label:hover {
    background: #edf4f2;
}

.weekly-plan-coach-picker-menu label:has(input:checked) {
    background: #dcefea;
    color: var(--nav);
    font-weight: 600;
}

.weekly-plan-coach-picker-menu input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    flex: 0 0 16px;
    accent-color: var(--teal);
}

.weekly-plan-coach-picker-menu span {
    color: var(--muted);
    font-size: 12px;
}

.planning-editor-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 7px;
}

.planning-editor-group-select {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.planning-editor-groups label,
.planning-editor-check {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
}

.planning-editor-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 9px;
    align-items: center;
}

.planning-editor-range input[type="range"] {
    min-height: 28px;
    padding: 0;
}

.planning-editor-range output {
    padding: 9px 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    text-align: center;
}

.planning-copy-previous {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 600 13px Arial, sans-serif;
}

.planning-copy-previous:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.planning-plan-file {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.planning-plan-file>label:first-child,
.planning-plan-file p {
    grid-column: 1 / -1;
    margin: 0;
}

.planning-plan-file strong {
    grid-column: 1 / -1;
    min-width: 0;
    color: var(--ink);
    font: 600 13px/1.3 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.planning-plan-file p {
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
}

.planning-plan-file-message {
    padding: 8px 10px;
    border: 1px solid rgba(8, 127, 120, 0.2);
    border-radius: 4px;
    background: rgba(8, 127, 120, 0.08);
    color: var(--ink) !important;
}

html[data-system-theme="dark"] body .planning-plan-file-message {
    background: rgba(8, 127, 120, 0.18);
    border-color: rgba(139, 227, 219, 0.45);
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body .planning-plan-file strong,
html[data-system-theme="dark"] body .planning-plan-file p,
html[data-system-theme="dark"] body .planning-plan-file label,
html[data-system-theme="dark"] body .planning-plan-file a,
html[data-system-theme="dark"] body .planning-plan-file button {
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body .planning-plan-file-remove {
    border-color: #fca5a5;
    background: rgba(127, 29, 29, 0.35);
    color: #fee2e2 !important;
}

.planning-plan-file-remove:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.planning-plan-file strong[data-success="true"],
.planning-plan-file-message[data-success="true"] {
    color: #0f766e !important;
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

.planning-plan-file strong[data-error="true"],
.planning-plan-file-message[data-error="true"],
.poolside-save-status[data-error="true"],
.workout-editor-attendance-status[data-error="true"] {
    color: #b91c1c !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.poolside-save-status[data-success="true"],
.workout-editor-attendance-status[data-success="true"] {
    color: #0f766e !important;
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

html[data-system-theme="dark"] body .planning-plan-file strong[data-success="true"],
html[data-system-theme="dark"] body .planning-plan-file-message[data-success="true"] {
    color: #a7f3d0 !important;
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(52, 211, 153, 0.5) !important;
}

html[data-system-theme="dark"] body .planning-plan-file strong[data-error="true"],
html[data-system-theme="dark"] body .planning-plan-file-message[data-error="true"],
html[data-system-theme="dark"] body .poolside-save-status[data-error="true"],
html[data-system-theme="dark"] body .workout-editor-attendance-status[data-error="true"] {
    color: #fecaca !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(248, 113, 113, 0.6) !important;
}

html[data-system-theme="dark"] body .poolside-save-status[data-success="true"],
html[data-system-theme="dark"] body .workout-editor-attendance-status[data-success="true"] {
    color: #a7f3d0 !important;
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(52, 211, 153, 0.5) !important;
}

.planning-plan-file-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 8px;
    width: 100%;
}

.planning-plan-file-open,
.planning-plan-file-download,
.planning-plan-file-import,
.planning-plan-file-upload,
.planning-plan-file-restore {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    padding: 9px 11px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: var(--surface);
    color: var(--teal);
    font: 600 13px/1.2 Arial, sans-serif;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    white-space: normal;
}

.planning-plan-file-actions [hidden] {
    display: none !important;
}

.planning-plan-file-upload {
    grid-column: 1 / -1;
    background: var(--teal);
    color: #fff !important;
}

.group-files-browser {
    display: grid;
    gap: 12px;
    max-width: 760px;
}

.group-files-browser label {
    color: var(--ink);
    font: 600 14px/1.3 Arial, sans-serif;
}

.group-files-browser input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 14px/1.3 Arial, sans-serif;
}

.group-files-tree {
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.group-files-tree details {
    min-width: 0;
}

.group-files-tree summary {
    padding: 9px 12px;
    color: var(--ink);
    cursor: pointer;
    font: 600 14px/1.3 Arial, sans-serif;
}

.group-files-tree-folder {
    margin-left: 14px;
    border-top: 1px solid var(--line);
}

.group-files-tree-folder summary {
    color: var(--muted);
    font-weight: 600;
}

.group-files-tree ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0 12px 10px 28px;
}

.group-files-tree a {
    color: var(--teal);
    overflow-wrap: anywhere;
}

.group-files-empty {
    margin: 0;
    padding: 14px;
    color: var(--muted);
}

.editera-group-files {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.editera-group-files h6,
.editera-group-files p {
    margin: 0;
}

.editera-group-files h6 {
    color: var(--ink);
    font: 700 14px/1.3 Arial, sans-serif;
}

.editera-group-files-description,
.editera-group-files-status,
.editera-group-files-empty {
    color: var(--muted);
    font: 13px/1.4 Arial, sans-serif;
}

.editera-group-files-controls {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.2fr) auto auto;
    gap: 8px;
    align-items: end;
}

.editera-group-files-controls label {
    display: grid;
    gap: 4px;
    color: var(--ink);
    font: 600 12px/1.3 Arial, sans-serif;
}

.editera-group-files-controls input,
.editera-group-files-controls select {
    min-width: 0;
    min-height: 36px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.editera-group-files-tree {
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.editera-group-files-tree .fancytree-container {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: 13px/1.35 Arial, sans-serif;
}

.editera-group-files-tree .fancytree-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
    padding: 5px 7px;
    color: var(--ink);
}

.editera-group-files-tree .fancytree-node:hover {
    background: color-mix(in srgb, var(--teal) 10%, transparent);
}

.editera-group-files-tree .fancytree-title {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.editera-group-files-node-actions {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: auto;
}

.editera-group-files-remove {
    flex: 0 0 auto;
    min-height: 27px;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface);
    color: var(--danger, #b42318);
    cursor: pointer;
    font: 600 12px/1 Arial, sans-serif;
}

@media (max-width: 760px) {
    .editera-group-files-controls {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .planning-plan-file-actions {
        grid-template-columns: 1fr;
    }
}

.calendar-editor-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-editor-heading h2 {
    margin: 0;
}

.calendar-editor-back {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 600 20px/1 Arial, sans-serif;
}

.training-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
    padding: 18px 0 0;
}

.training-dashboard.is-editing {
    min-height: calc(100vh - 190px);
    align-content: start;
}

.training-dashboard.is-editing>.training-dashboard-header,
.training-dashboard.is-editing>.training-dashboard-controls,
.training-dashboard.is-editing>.competition-catalog-filters,
.training-dashboard.is-editing>.training-dashboard-list {
    display: none;
}

.training-dashboard.is-editing .calendar-editor-backdrop {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: calc(100vh - 250px);
    place-items: start center;
    padding: 0 0 24px;
}

.planning-modern.is-editing {
    min-height: calc(100vh - 190px);
}

.planning-modern.is-editing>.planning-modern-toolbar,
.planning-modern.is-editing>.planning-modern-calendar,
.planning-modern.is-editing>.planning-modern-list {
    display: none;
}

.planning-modern.is-editing .calendar-editor-backdrop {
    display: grid;
    min-height: calc(100vh - 250px);
    place-items: start center;
    padding: 0 0 24px;
}

.calendar-list.is-editing {
    min-height: calc(100vh - 190px);
}

.calendar-list.is-editing>.calendar-header,
.calendar-list.is-editing>.calendar-filters,
.calendar-list.is-editing>.calendar-options,
.calendar-list.is-editing>.calendar-component {
    display: none;
}

.calendar-list.is-editing .calendar-editor-backdrop {
    display: grid;
    min-height: calc(100vh - 250px);
    place-items: start center;
    padding: 0 0 24px;
}

.training-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
}

.training-dashboard-header h3 {
    margin: 0;
    color: var(--nav);
    font-size: 22px;
    font-weight: 700;
}

.training-dashboard-search {
    display: flex;
    align-items: center;
    min-width: min(360px, 44vw);
}

.training-dashboard-search input {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.training-dashboard-tabs {
    display: flex;
    gap: 20px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--line);
}

.training-dashboard-tab {
    padding: 0 0 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: 600 14px Arial, sans-serif;
}

.training-dashboard-tab.is-active {
    color: var(--nav);
    border-bottom: 2px solid var(--teal);
}

.training-dashboard-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.import-dashboard {
    margin-top: 14px;
}

.import-dashboard-list {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.import-dashboard-filter {
    width: 100%;
    margin: 8px 0;
}

.import-job-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.import-job-summary {
    flex: 1 1 260px;
    color: var(--ink);
    font: 13px/1.4 Arial, sans-serif;
}

.import-job-details {
    flex: 1 0 100%;
    max-height: 220px;
    margin: 4px 0 0;
    padding: 8px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    white-space: pre-wrap;
    font: 12px/1.4 monospace;
}

.import-dashboard .secondary-button,
.import-job-row .secondary-button {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--nav);
    cursor: pointer;
}

.import-dashboard .secondary-button:hover,
.import-job-row .secondary-button:hover {
    border-color: var(--teal);
    color: var(--teal);
}

html:not([data-system-theme="dark"]) body .import-dashboard,
html:not([data-system-theme="dark"]) body .import-job-row {
    background: #ffffff !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
}

html:not([data-system-theme="dark"]) body .import-dashboard-filter,
html:not([data-system-theme="dark"]) body .import-job-details,
html:not([data-system-theme="dark"]) body .import-dashboard .secondary-button,
html:not([data-system-theme="dark"]) body .import-job-row .secondary-button {
    background: #f5f8f8 !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
}

@media (min-width: 761px) {
    .training-dashboard-controls {
        align-items: center;
    }

    .training-dashboard-actions {
        margin-left: auto;
    }
}

html[data-system-theme="dark"] body .admin-builder,
html[data-system-theme="dark"] body .admin-builder .admin-category-picker .builder-segment,
html[data-system-theme="dark"] body .admin-builder .admin-action-picker .builder-segment,
html[data-system-theme="dark"] body .admin-builder .analysis-mode-panel {
    background: #182022 !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .admin-builder .admin-category-picker .builder-segment:hover,
html[data-system-theme="dark"] body .admin-builder .admin-category-picker .builder-segment.is-active {
    background: #087e78 !important;
    border-color: #3aa69e !important;
    color: #ffffff !important;
}

html[data-system-theme="dark"] body .admin-builder .admin-action-picker .builder-segment:hover,
html[data-system-theme="dark"] body .admin-builder .admin-action-picker .builder-segment.is-active {
    background: #5c3b1e !important;
    border-color: #ef8c31 !important;
    color: #fff1dc !important;
}

html[data-system-theme="dark"] body .admin-builder .admin-builder-generated,
html[data-system-theme="dark"] body .admin-builder .admin-group-checklist label,
html[data-system-theme="dark"] body .admin-builder .admin-membership-field,
html[data-system-theme="dark"] body .admin-builder .admin-generated-username input {
    background: #202b2d !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

.training-dashboard-filters {
    display: flex;
    flex: 0 0 389px;
    flex-wrap: wrap;
    gap: 10px;
}

.training-dashboard-filters .training-dashboard-chip {
    width: 100%;
}

.training-workouts-dashboard .training-dashboard-data-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--nav);
    font: 600 13px/1.25 Arial, sans-serif;
}

.training-workouts-dashboard .training-dashboard-data-filter legend {
    width: 100%;
    margin: 0 0 2px;
    padding: 0;
    color: var(--muted);
    font: 700 12px/1.2 Arial, sans-serif;
}

.training-workouts-dashboard .training-dashboard-data-filter label {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    cursor: pointer;
}

.training-workouts-dashboard .training-dashboard-data-filter input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
}

.training-workouts-dashboard .training-workout-catalog-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(5, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.training-workouts-dashboard .training-workout-catalog-filters>label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 600 12px/1.2 Arial, sans-serif;
}

.training-workouts-dashboard .training-workout-catalog-filters>label input,
.training-workouts-dashboard .training-workout-catalog-filters>label select {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.training-workouts-dashboard .training-workout-catalog-filters .planning-overview-group-filter {
    grid-column: 1 / -1;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}

.training-workouts-dashboard .training-dashboard-actions .training-dashboard-data-filter {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    padding: 0 14px 0 0;
    border-right: 1px solid var(--line);
}

.training-workouts-dashboard .training-dashboard-actions .training-dashboard-data-filter legend {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.training-workouts-dashboard .training-dashboard-actions .training-dashboard-data-filter label {
    min-height: 36px;
    white-space: nowrap;
}

.training-workouts-dashboard .training-dashboard-date-wheel-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--nav);
    font: 600 13px/1.2 Arial, sans-serif;
    cursor: pointer;
    white-space: nowrap;
}

.training-workouts-dashboard .training-dashboard-date-wheel-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
}

@media (min-width: 761px) {
    .training-dashboard.training-workouts-dashboard .training-dashboard-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .training-dashboard.training-workouts-dashboard .training-workout-catalog-filters {
        width: 100%;
    }

    .training-dashboard.training-workouts-dashboard .training-dashboard-actions {
        flex: 0 0 auto;
        width: auto;
        margin-left: 0;
        align-self: flex-start;
    }
}

@media (min-width: 761px) and (max-width: 1250px) {
    .training-workouts-dashboard .training-workout-catalog-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .training-workouts-dashboard .training-workout-catalog-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .training-workouts-dashboard .training-workout-catalog-filters .planning-overview-group-filter {
        grid-column: auto;
    }

    .training-workouts-dashboard .training-dashboard-actions {
        display: flex;
        flex: 1 1 100%;
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }

    .training-workouts-dashboard .training-dashboard-actions .training-dashboard-data-filter {
        flex-wrap: wrap;
        width: 100%;
        padding: 0 0 8px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

.training-dashboard-subgroup-toggle {
    flex: 0 0 150px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--nav);
    font: 600 13px Arial, sans-serif;
}

.training-dashboard-chip,
.training-dashboard-secondary,
.training-dashboard-primary {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--nav);
    font: 600 13px Arial, sans-serif;
}

.training-dashboard-primary {
    border-color: var(--teal);
    background: var(--teal);
    color: white;
}

.training-dashboard-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 0 0 260px;
}

.training-dashboard-actions .training-dashboard-secondary {
    flex: 0 0 104px;
}

.training-dashboard-actions .training-dashboard-primary {
    flex: 1 1 auto;
}

.training-workouts-dashboard .training-dashboard-actions {
    flex: 1 1 430px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.training-workouts-dashboard .training-dashboard-actions .training-dashboard-primary,
.training-workouts-dashboard .training-dashboard-actions .training-schedule-builder {
    flex: 0 1 auto;
}

.training-workouts-dashboard .training-dashboard-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 2px;
    color: var(--muted);
    font: 600 13px/1.3 Arial, sans-serif;
}

.training-workouts-dashboard .training-dashboard-pagination .training-dashboard-secondary {
    flex: 0 0 auto;
    min-height: 36px;
}

.training-dashboard-list {
    display: grid;
    gap: 14px;
}

.training-workouts-dashboard .training-dashboard-list.is-date-wheel {
    height: clamp(300px, calc(100vh - 390px), 620px);
    align-content: start;
    padding: 0 12px 24px 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-snap-type: y mandatory;
    scrollbar-gutter: stable;
}

.training-workouts-dashboard .training-dashboard-list.is-date-wheel>.training-dashboard-section {
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.training-dashboard-subsection {
    display: grid;
    gap: 6px;
    margin: 8px 0 2px;
}

.training-dashboard-subsection-title {
    margin: 0;
    color: var(--muted);
    font: 600 13px/1.3 Arial, sans-serif;
}

.training-dashboard-list.is-list-view {
    gap: 8px;
}

.training-dashboard-list.is-list-view .training-dashboard-section {
    gap: 4px;
}

.training-dashboard-list.is-list-view .training-dashboard-card {
    grid-template-columns: 128px 68px minmax(150px, 1.2fr) minmax(260px, 2.3fr) 28px 26px;
    align-items: start;
    gap: 8px;
    min-height: 0;
    padding: 5px 8px;
}

.training-workouts-dashboard .training-dashboard-list.is-list-view .training-dashboard-card:not(:has(.training-dashboard-detail:not([hidden]))) {
    min-height: 0;
}

.training-dashboard-list.is-list-view .training-dashboard-card-top {
    display: contents;
}

.training-dashboard-list.is-list-view .training-dashboard-icon {
    display: none;
}

.training-dashboard-list.is-list-view .training-dashboard-date {
    grid-column: 1;
    grid-row: 1;
}

.training-dashboard-list.is-list-view .training-dashboard-group {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
}

.training-dashboard-list.is-list-view .training-dashboard-menu-wrap {
    grid-column: 5;
    grid-row: 1;
    margin-left: 0;
}

.training-dashboard-list.is-list-view .training-dashboard-expand {
    grid-column: 6;
    grid-row: 1;
}

.training-dashboard-list.is-list-view .training-dashboard-title-line {
    grid-column: 3;
    grid-row: 1;
    font-size: 15px;
    white-space: nowrap;
}

.training-dashboard-list.is-list-view .training-dashboard-compact-meta {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.training-dashboard-list.is-list-view .training-dashboard-meta {
    min-width: 0;
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: normal;
}

.training-dashboard-list.is-list-view .training-dashboard-avatar-row {
    display: none;
}

.training-dashboard-list.is-list-view .training-dashboard-summary {
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.training-dashboard-list.is-list-view .training-dashboard-menu-button,
.training-dashboard-list.is-list-view .training-dashboard-expand {
    width: 26px;
    height: 26px;
    font-size: 16px;
}

.training-dashboard-list.is-list-view .training-dashboard-detail {
    grid-column: 1 / -1;
    grid-row: 2;
}

@media (min-width: 761px) {

    .competitions-dashboard .training-dashboard-header,
    .camps-dashboard .training-dashboard-header {
        justify-content: flex-start;
    }

    .competitions-dashboard .training-dashboard-primary,
    .camps-dashboard .training-dashboard-primary {
        flex: 0 0 auto;
        width: auto;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-card,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-card {
        grid-template-columns: 120px 110px minmax(180px, 1.1fr) minmax(280px, 2.4fr) minmax(110px, 0.7fr) 28px;
        align-items: center;
        gap: 8px;
        min-height: 0;
        padding: 5px 8px;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-card-top,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-card-top {
        display: contents;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-icon,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-icon {
        display: none;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-date,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-date {
        grid-column: 1;
        grid-row: 1;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-group,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-group {
        grid-column: 2;
        grid-row: 1;
        margin-left: 0;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-title-line,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-title-line {
        grid-column: 3;
        grid-row: 1;
        min-width: 0;
        font-size: 15px;
        white-space: nowrap;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-summary,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-summary {
        grid-column: 4;
        grid-row: 1;
        min-width: 0;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .event-website-link,
    .camps-dashboard .training-dashboard-list.is-list-view .event-website-link {
        grid-column: 5;
        grid-row: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-menu-wrap,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-menu-wrap {
        grid-column: 6;
        grid-row: 1;
        margin-left: 0;
    }

    .competitions-dashboard .training-dashboard-list.is-list-view .training-dashboard-menu-button,
    .camps-dashboard .training-dashboard-list.is-list-view .training-dashboard-menu-button {
        width: 26px;
        height: 26px;
        font-size: 16px;
    }
}

.readiness-dashboard .training-dashboard-list.is-list-view .training-dashboard-card,
.development-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-card,
.weekly-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-card,
.season-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-card {
    grid-template-columns: 128px minmax(180px, 1.2fr) minmax(320px, 2.3fr) 28px 26px;
    align-items: start;
    gap: 8px;
    min-height: 0;
    padding: 5px 8px;
}

.season-plan-overview,
.season-plan-editor {
    display: grid;
    gap: 16px;
    width: min(1120px, 100%);
}

.season-plan-editor {
    container-type: inline-size;
}

.season-plan-overview-controls,
.season-plan-editor-top,
.season-plan-editor-actions,
.season-plan-periods-header,
.season-plan-mesocycle-header,
.season-plan-card-top,
.season-plan-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.season-plan-overview-controls,
.season-plan-editor-top,
.season-plan-periods-header,
.season-plan-card-top {
    justify-content: space-between;
}

.season-plan-card-actions {
    gap: 6px;
}

.season-plan-card-actions button {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 11px;
    line-height: 1.2;
}

.season-plan-editor-hero,
.season-plan-editor-section {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(23, 50, 58, 0.08);
}

.season-plan-editor-hero {
    align-items: flex-start;
    padding: 22px 24px;
    border-top: 4px solid var(--teal);
}

.season-plan-editor-hero h3,
.season-plan-editor-section h4 {
    font-size: 20px;
    font-weight: normal;
}

.season-plan-editor-hero p,
.season-plan-section-heading p,
.season-plan-periods-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.season-plan-editor-section {
    padding: 22px 24px;
}

.season-plan-section-heading {
    margin-bottom: 18px;
}

.season-plan-overview-controls select {
    width: min(280px, 100%);
}

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

.planning-workspace-focus {
    min-width: 0;
    position: sticky;
    top: 16px;
}

.planning-workspace-focus-slot {
    min-width: 0;
}

.planning-workspace-grid>.training-dashboard-list,
.planning-workspace-grid>.season-plan-card-list {
    min-width: 0;
}

.planning-focus-timeline {
    border: 1px solid var(--line);
    border-top: 4px solid var(--teal);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(23, 50, 58, 0.08);
    min-height: 360px;
    padding: 22px;
}

.planning-focus-timeline.is-micro,
.planning-focus-timeline.is-micro-all {
    border-top-color: #2676a1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
}

.planning-focus-timeline.is-micro .planning-focus-track,
.planning-focus-timeline.is-micro-all .planning-focus-track {
    flex: 1 1 auto;
    min-height: 230px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.planning-focus-timeline.is-micro .planning-focus-axis,
.planning-focus-timeline.is-micro-all .planning-focus-axis {
    flex: 0 0 auto;
}

.planning-focus-timeline.is-meso {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
}

.planning-focus-timeline.is-meso h3 {
    font: 600 18px/1.2 Arial, sans-serif;
}

.planning-focus-timeline.is-meso>p:not(.training-dashboard-empty) {
    margin-top: 4px;
    font: 400 13px/1.35 Arial, sans-serif;
}

.planning-focus-timeline.is-meso .planning-focus-plan-selector {
    gap: 3px;
    margin-top: 10px;
    font: 600 11px/1.2 Arial, sans-serif;
}

.planning-focus-timeline.is-meso .planning-focus-plan-selector select {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 12px;
}

.season-plan-current-mesocycle {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 10px 0 0;
    padding: 7px 9px;
    border-left: 3px solid var(--teal);
    background: color-mix(in srgb, var(--teal) 9%, var(--surface));
    color: var(--ink);
    font: 12px/1.3 Arial, sans-serif;
}

.season-plan-current-mesocycle strong {
    flex: 0 0 auto;
    color: var(--teal);
    font: 700 12px/1.3 Arial, sans-serif;
}

.planning-focus-timeline.is-meso .planning-focus-track {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.planning-focus-timeline.is-meso .planning-focus-axis {
    flex: 0 0 auto;
}

.planning-focus-timeline h3 {
    margin: 0;
    font-size: 22px;
    font-weight: normal;
}

.planning-focus-timeline>p:not(.training-dashboard-empty) {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.planning-focus-plan-selector {
    display: grid;
    gap: 4px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.planning-focus-plan-selector select {
    width: 100%;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 400 13px/1.2 Arial, sans-serif;
}

.planning-focus-selector-stack {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.planning-focus-selector-stack .planning-focus-plan-selector {
    margin-top: 0;
}

.weekly-plan-focus-overview {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.weekly-plan-focus-overview header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.weekly-plan-focus-overview header>strong {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font: 700 13px/1.25 Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weekly-plan-focus-overview>p {
    margin: 0;
    color: var(--muted);
    font: 12px/1.3 Arial, sans-serif;
}

.weekly-plan-focus-metrics {
    color: var(--ink) !important;
    font-weight: 600 !important;
}

.weekly-plan-focus-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.weekly-plan-focus-day {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    min-height: 78px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}

.weekly-plan-focus-day-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
}

.weekly-plan-focus-day-heading>strong {
    color: var(--ink);
    font: 700 10px/1.15 Arial, sans-serif;
}

.weekly-plan-focus-day-details {
    display: inline-grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: -3px -3px -3px 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--teal);
    font: 700 18px/1 Arial, sans-serif;
    cursor: pointer;
}

.weekly-plan-focus-day-details:hover,
.weekly-plan-focus-day-details:focus-visible {
    background: color-mix(in srgb, var(--teal) 12%, transparent);
    outline: 2px solid color-mix(in srgb, var(--teal) 35%, transparent);
    outline-offset: 1px;
}

.weekly-plan-focus-session {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.weekly-plan-focus-session strong,
.weekly-plan-focus-session span,
.weekly-plan-focus-empty-day {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weekly-plan-focus-session strong {
    color: var(--ink);
    font: 600 10px/1.2 Arial, sans-serif;
}

.weekly-plan-focus-session span,
.weekly-plan-focus-empty-day {
    color: var(--muted);
    font: 10px/1.2 Arial, sans-serif;
}

.weekly-plan-day-popover {
    position: fixed;
    z-index: 60;
    width: min(420px, calc(100vw - 24px));
    max-height: min(320px, calc(100vh - 24px));
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(23, 50, 58, 0.16);
}

.weekly-plan-day-popover h4,
.weekly-plan-day-popover dl {
    margin: 0;
}

.weekly-plan-day-popover-list {
    display: grid;
    gap: 8px;
}

.weekly-plan-day-popover-list article {
    display: grid;
    gap: 7px;
    padding: 9px;
    border: 1px solid var(--line);
    border-left: 3px solid #2676a1;
    border-radius: 3px;
    background: var(--surface-muted);
}

.weekly-plan-day-popover-list h4 {
    color: var(--ink);
    font: 700 13px/1.3 Arial, sans-serif;
}

.weekly-plan-day-popover-list dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 3px 10px;
    color: var(--ink);
    font: 12px/1.3 Arial, sans-serif;
}

.weekly-plan-day-popover-list dt {
    color: var(--muted);
    font-weight: 700;
}

.weekly-plan-day-popover-list dd {
    min-width: 0;
    overflow-wrap: anywhere;
}

.planning-focus-track {
    position: relative;
    min-height: 230px;
    margin-top: 28px;
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
    background: repeating-linear-gradient(90deg, transparent 0, transparent calc(12.5% - 1px), color-mix(in srgb, var(--line) 60%, transparent) calc(12.5% - 1px), color-mix(in srgb, var(--line) 60%, transparent) 12.5%);
}

.planning-focus-bar {
    position: absolute;
    top: 0;
    min-width: 52px;
    min-height: 44px;
    padding: 7px 9px;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: var(--teal);
    color: #fff;
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.planning-focus-bar:nth-child(3n + 2) {
    top: 64px;
}

.planning-focus-bar:nth-child(3n) {
    top: 128px;
}

.planning-focus-bar:nth-child(3n + 1) {
    top: 192px;
    transform: translateY(-44px);
}

.planning-focus-timeline.is-micro .planning-focus-bar {
    background: #2676a1;
}

.planning-focus-timeline.is-meso .planning-focus-track {
    display: grid;
    gap: 9px;
    min-height: 0;
    margin-top: 18px;
    border: 0;
    background: none;
}

.planning-focus-timeline.is-micro-all .planning-focus-track {
    display: grid;
    gap: 9px;
    min-height: 0;
    margin-top: 18px;
    border: 0;
    background: none;
}

.planning-focus-micro-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(180px, 1.1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.planning-focus-micro-details {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.planning-focus-micro-details strong {
    overflow: hidden;
    color: var(--ink);
    font: 600 12px/1.25 Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-focus-micro-details span {
    overflow: hidden;
    color: var(--muted);
    font: 11px/1.2 Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-focus-micro-lane {
    position: relative;
    min-width: 0;
    min-height: 38px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), color-mix(in srgb, var(--line) 60%, transparent) calc(25% - 1px), color-mix(in srgb, var(--line) 60%, transparent) 25%);
}

.planning-focus-micro-bar {
    top: 4px !important;
    bottom: 4px;
    min-width: 34px;
    min-height: 28px;
    padding: 4px 6px;
    transform: none !important;
    background: #2676a1;
}

.planning-focus-meso-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(180px, 1.1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.planning-focus-meso-details {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.planning-focus-meso-details strong {
    overflow: hidden;
    color: var(--ink);
    font: 600 12px/1.25 Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-focus-meso-details span {
    color: var(--muted);
    font: 11px/1.2 Arial, sans-serif;
}

.planning-focus-meso-lane {
    position: relative;
    min-width: 0;
    min-height: 38px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), color-mix(in srgb, var(--line) 60%, transparent) calc(25% - 1px), color-mix(in srgb, var(--line) 60%, transparent) 25%);
}

.planning-focus-meso-bar {
    top: 4px !important;
    bottom: 4px;
    min-width: 34px;
    min-height: 28px;
    padding: 4px 6px;
    transform: none !important;
    font: 11px/1.15 Arial, sans-serif;
}

.planning-focus-axis.is-meso {
    margin-left: calc(45% + 10px);
}

@media (min-width: 961px) {
    .season-plans-dashboard {
        --planning-sticky-inset: 16px;
    }

    .weekly-plans-dashboard {
        --planning-sticky-inset: 16px;
    }

    .season-plans-dashboard .planning-workspace-grid,
    .weekly-plans-dashboard .planning-workspace-grid {
        grid-template-columns: minmax(380px, 440px) minmax(0, 1fr);
    }

    .season-plans-dashboard .planning-workspace-focus,
    .weekly-plans-dashboard .planning-workspace-focus {
        position: static;
        max-block-size: var(--planning-focus-available-height, calc(100dvh - (var(--planning-sticky-inset) * 2)));
        overflow: hidden;
    }

    .season-plans-dashboard .planning-workspace-focus>.planning-focus-timeline.is-meso {
        max-block-size: 100%;
        overflow: hidden;
    }

    .weekly-plans-dashboard .planning-workspace-focus>.planning-focus-timeline.is-micro,
    .weekly-plans-dashboard .planning-workspace-focus>.planning-focus-timeline.is-micro-all {
        max-block-size: 100%;
        overflow: hidden;
    }

    .season-plans-dashboard .planning-workspace-focus.is-viewport-pinned,
    .weekly-plans-dashboard .planning-workspace-focus.is-viewport-pinned {
        position: fixed;
        top: var(--planning-sticky-inset);
        z-index: 2;
    }

    .season-plans-dashboard .planning-workspace-focus.is-viewport-pinned>.planning-focus-timeline.is-meso {
        block-size: 100%;
    }

    .weekly-plans-dashboard .planning-workspace-focus.is-viewport-pinned>.planning-focus-timeline.is-micro,
    .weekly-plans-dashboard .planning-workspace-focus.is-viewport-pinned>.planning-focus-timeline.is-micro-all {
        block-size: 100%;
    }
}

@media (max-width: 540px) {
    .planning-focus-meso-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
    }

    .planning-focus-micro-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
    }

    .planning-focus-meso-details strong {
        white-space: normal;
    }

    .planning-focus-micro-details strong,
    .planning-focus-micro-details span {
        white-space: normal;
    }

    .planning-focus-axis.is-meso {
        margin-left: 0;
    }

    .season-plan-current-mesocycle {
        display: grid;
        gap: 2px;
    }

    .weekly-plan-focus-days {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weekly-plan-focus-day {
        min-height: 0;
    }

    .weekly-plan-day-popover-list dl {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .weekly-plan-day-popover-list dd {
        margin: 0 0 7px;
    }
}

.planning-focus-bar:hover,
.planning-focus-bar:focus-visible {
    filter: brightness(0.88);
    outline: 3px solid color-mix(in srgb, var(--teal) 35%, transparent);
    outline-offset: 2px;
}

.planning-focus-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 960px) {

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

    .planning-workspace-focus {
        position: static;
    }
}

.season-plan-card-list,
.season-plan-period-list {
    display: grid;
    gap: 14px;
}

.season-plan-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
    cursor: pointer;
}

.season-plan-card:hover,
.season-plan-card:focus-visible {
    border-color: #167b74;
    outline: none;
}

.season-plan-card h4,
.season-plan-editor h3,
.season-plan-periods h4,
.season-plan-mesocycle-header h5 {
    margin: 0;
}

.season-plan-card-top p,
.season-plan-editor-top p,
.season-plan-card-goal,
.season-plan-card-summary,
.season-plan-save-status,
.season-plan-empty-periods {
    margin: 4px 0 0;
    color: var(--muted);
}

.season-plan-card-goal {
    max-width: 78ch;
    color: var(--ink);
}

.season-plan-card-summary {
    font-size: 13px;
}

.season-plan-timeline {
    margin: 16px 0 8px;
}

.season-plan-timeline-track {
    position: relative;
    height: 24px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--surface-muted);
}

.season-plan-timeline-segment {
    position: absolute;
    top: 3px;
    bottom: 3px;
    min-width: 7px;
    border-radius: 3px;
}

.season-plan-timeline-labels {
    display: flex;
    justify-content: center;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.season-plan-editor-back {
    flex: 0 0 auto;
}

.season-plan-identity,
.season-plan-period-fields {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.season-plan-identity label,
.season-plan-period-fields label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font: bold 11px Arial, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.season-plan-identity label:nth-child(1) {
    grid-column: span 3;
}

.season-plan-identity label:nth-child(2) {
    grid-column: span 5;
}

.season-plan-identity label:nth-child(3) {
    grid-column: span 4;
}

.season-plan-identity label:nth-child(4),
.season-plan-identity label:nth-child(5) {
    grid-column: span 3;
}

.season-plan-identity label:nth-child(6) {
    grid-column: span 6;
}

.season-plan-identity label:nth-child(7) {
    grid-column: 1 / -1;
}

@container (max-width: 760px) {
    .season-plan-identity {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .season-plan-identity label:nth-child(n) {
        grid-column: auto;
    }

    .season-plan-identity label:nth-child(7) {
        grid-column: 1 / -1;
    }
}

.season-plan-period-fields label:nth-child(1) {
    grid-column: span 3;
}

.season-plan-period-fields label:nth-child(2),
.season-plan-period-fields label:nth-child(3),
.season-plan-period-fields label:nth-child(4) {
    grid-column: span 2;
}

.season-plan-period-fields label:nth-child(5) {
    grid-column: span 3;
}

.season-plan-identity textarea,
.season-plan-period-fields textarea {
    min-height: 82px;
    resize: vertical;
}

.season-plan-identity input[type="date"],
.season-plan-period-fields input[type="date"],
.season-plan-mesocycle input[type="date"],
.planning-editor-form input[type="date"] {
    min-width: 11rem;
}

.season-plan-period-fields {
    grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 0.8fr) repeat(2, minmax(11rem, 1fr)) minmax(180px, 1.4fr);
}

.season-plan-period-fields label:nth-child(n) {
    grid-column: auto;
}

.season-plan-periods {
    display: grid;
    gap: 12px;
}

.season-plan-period-editor {
    border: 1px solid var(--line);
    border-left: 4px solid #167b74;
    border-radius: 4px;
    background: var(--surface-muted);
    padding: 0 16px 16px;
}

.season-plan-period-editor summary {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    cursor: pointer;
    font-weight: 700;
}

.season-plan-period-editor summary small {
    color: var(--muted);
    font-weight: 400;
}

.season-plan-phase-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.season-plan-remove {
    border-color: #b84b55;
    color: #9f3541;
}

.season-plan-mesocycle-header {
    justify-content: space-between;
    margin-top: 16px;
}

.season-plan-mesocycles {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.season-plan-mesocycle {
    display: grid;
    grid-template-columns: minmax(150px, 1.35fr) repeat(2, minmax(120px, .9fr)) minmax(150px, 1.3fr) minmax(120px, .9fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.season-plan-mesocycle label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font: bold 10px Arial, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.season-plan-save-status {
    min-height: 20px;
}

.planning-overview,
.planning-dashboard,
.planning-editor {
    display: grid;
    gap: 16px;
    width: min(1080px, 100%);
}

#planning-fields>.planning-overview {
    grid-column: 1 / -1;
    width: 100%;
}

#planning-fields>.group-model-dashboard {
    grid-column: 1 / -1;
    width: 100%;
}

#planning-fields>.macro-plan-dashboard {
    grid-column: 1 / -1;
    width: 100%;
}

.planning-overview-hero,
.planning-editor-hero,
.planning-editor-section,
.planning-direction-panel,
.planning-macro-timeline {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(23, 50, 58, 0.08);
}

.planning-overview-hero,
.planning-editor-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-top: 4px solid var(--teal);
}

.planning-overview h3,
.planning-dashboard h3,
.planning-editor h3,
.planning-direction-panel h4,
.planning-macro-timeline h4,
.planning-card h4,
.planning-macro-timeline-item h5 {
    margin: 0;
    font-weight: normal;
}

.planning-overview h3 {
    font-size: 20px;
}

.planning-overview-hero p,
.planning-dashboard-controls p,
.planning-editor-hero p,
.planning-card p,
.planning-macro-timeline-item p,
.planning-direction-panel p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.planning-overview-hero p,
.planning-direction-panel p {
    font-size: 14px;
}

.planning-overview-group-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 11px;
    min-width: min(360px, 100%);
    margin: 0;
    padding: 7px 10px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.planning-overview-group-filter legend {
    padding: 0 4px;
    color: var(--muted);
    font-size: 11px;
}

.planning-overview-group-filter label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
}

.planning-overview-group-filter input {
    inline-size: 16px;
    block-size: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.planning-overview-actions,
.planning-editor-actions,
.planning-dashboard-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.planning-overview-actions {
    flex-wrap: wrap;
}

.group-model-dashboard .planning-dashboard-controls,
.macro-plan-dashboard .planning-dashboard-controls {
    align-items: flex-start;
    flex-wrap: wrap;
}

.group-model-dashboard .planning-card-list,
.macro-plan-dashboard .planning-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.group-model-dashboard .planning-card,
.macro-plan-dashboard .planning-card {
    min-height: 150px;
    padding: 16px;
}

.group-model-dashboard .planning-card h4,
.macro-plan-dashboard .planning-card h4 {
    font-size: 15px;
}

.group-model-dashboard .planning-card p:not(.planning-card-meta),
.macro-plan-dashboard .planning-card p:not(.planning-card-meta) {
    font-size: 14px;
    line-height: 1.4;
}

.planning-card-print {
    align-self: flex-start;
    min-height: 30px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
}

.planning-dashboard-controls {
    justify-content: space-between;
}

.planning-card-list,
.planning-overview-content {
    display: grid;
    gap: 14px;
}

.planning-overview-content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.planning-overview-group {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.planning-overview-group .planning-direction-panel {
    min-height: 118px;
    padding: 16px;
}

.planning-overview-group .planning-direction-panel h4,
.planning-overview-summary h4 {
    font-size: 15px;
}

.planning-overview-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.planning-overview-summary h4 {
    grid-column: 1 / -1;
    margin: 0;
    font-weight: normal;
}

.planning-overview-summary-item {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 14px/1.3 inherit;
    text-align: left;
    cursor: pointer;
}

.planning-overview-summary-item:hover,
.planning-overview-summary-item:focus-visible {
    border-color: var(--teal);
    outline: none;
}

.planning-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 5px;
    background: var(--surface);
    cursor: pointer;
}

.planning-card:hover,
.planning-card:focus-visible {
    border-color: #167b74;
    outline: none;
}

.planning-card-meta,
.planning-card-summary {
    font-size: 13px;
}

.planning-editor-section,
.planning-direction-panel,
.planning-macro-timeline {
    padding: 22px 24px;
}

.planning-editor-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.planning-editor-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font: bold 11px Arial, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.planning-editor-form label:nth-child(n + 4) {
    grid-column: 1 / -1;
}

.planning-editor-form textarea {
    min-height: 96px;
    resize: vertical;
}

.planning-editor-status {
    min-height: 20px;
    margin: 0;
    color: var(--muted);
}

.planning-macro-timeline {
    display: grid;
    gap: 12px;
}

.planning-hierarchy-timeline {
    display: grid;
    gap: 12px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(23, 50, 58, 0.08);
}

.planning-hierarchy-timeline h4,
.planning-hierarchy-timeline p {
    margin: 0;
}

.planning-hierarchy-timeline p,
.planning-hierarchy-axis {
    color: var(--muted);
    font-size: 13px;
}

.planning-hierarchy-lane {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.planning-hierarchy-lane strong {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.planning-hierarchy-track {
    position: relative;
    min-height: 34px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.planning-hierarchy-bar {
    position: absolute;
    top: 4px;
    bottom: 4px;
    min-width: 12px;
    overflow: hidden;
    padding: 0 7px;
    border: 0;
    border-radius: 3px;
    color: #fff;
    font: 12px/1 Arial, sans-serif;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.planning-hierarchy-bar.is-macro {
    background: #3676af;
}

.planning-hierarchy-bar.is-meso {
    background: #a23f5b;
}

.planning-hierarchy-bar.is-micro {
    background: #4b5ca8;
}

.planning-hierarchy-bar:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.planning-hierarchy-axis {
    padding-left: 84px;
}

.planning-macro-timeline-item {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 4px solid #3676af;
    background: var(--surface-muted);
    cursor: pointer;
}

.planning-linked-season {
    width: 100%;
    margin-top: 6px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.planning-linked-season:hover,
.planning-linked-season:focus-visible {
    border-color: var(--teal);
    outline: none;
}

@media (max-width: 760px) {

    .planning-overview-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .group-model-dashboard .planning-card-list,
    .macro-plan-dashboard .planning-card-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .planning-overview-group-filter {
        min-width: 0;
        width: 100%;
    }

    .planning-overview-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .planning-workspace-focus {
        position: static;
        order: -1;
    }

    .planning-focus-timeline {
        min-height: 310px;
        padding: 18px 16px;
    }

    .planning-focus-track {
        min-height: 200px;
    }

    .planning-focus-bar:nth-child(3n + 2) {
        top: 58px;
    }

    .planning-focus-bar:nth-child(3n) {
        top: 116px;
    }

    .planning-focus-bar:nth-child(3n + 1) {
        top: 174px;
        transform: translateY(-44px);
    }

    .season-plan-overview-controls,
    .season-plan-editor-top,
    .season-plan-card-top,
    .season-plan-periods-header,
    .season-plan-mesocycle-header {
        align-items: stretch;
        flex-direction: column;
    }

    .season-plan-overview-controls select,
    .season-plan-overview-controls button,
    .season-plan-editor-actions button,
    .season-plan-card-actions button,
    .season-plan-periods-header button,
    .season-plan-mesocycle-header button {
        width: 100%;
        min-height: 42px;
    }

    .season-plan-identity,
    .season-plan-period-fields,
    .season-plan-mesocycle {
        grid-template-columns: minmax(0, 1fr);
    }

    .season-plan-identity label,
    .season-plan-period-fields label {
        grid-column: auto;
    }

    .season-plan-editor-hero,
    .season-plan-editor-section {
        padding: 18px 16px;
    }

    .season-plan-period-editor {
        padding: 0 12px 12px;
    }

    .season-plan-period-editor summary {
        grid-template-columns: 10px minmax(0, 1fr);
    }

    .season-plan-period-editor summary small {
        grid-column: 2;
    }

    .planning-overview-hero,
    .planning-editor-hero,
    .planning-dashboard-controls,
    .planning-editor-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .planning-overview-group-filter,
    .planning-overview-actions button,
    .planning-dashboard-controls button,
    .planning-editor-actions button,
    .planning-card-print {
        width: 100%;
        min-height: 42px;
    }

    .planning-editor-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .planning-editor-form label:nth-child(n) {
        grid-column: auto;
    }

    .planning-overview-hero,
    .planning-editor-hero,
    .planning-editor-section,
    .planning-direction-panel,
    .planning-macro-timeline {
        padding: 18px 16px;
    }

    .planning-hierarchy-timeline {
        padding: 18px 16px;
    }

    .planning-hierarchy-lane {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .planning-hierarchy-axis {
        padding-left: 0;
    }
}

.readiness-dashboard .training-dashboard-list.is-list-view .training-dashboard-date,
.development-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-date,
.weekly-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-date,
.season-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-date {
    grid-column: 1;
}

.readiness-dashboard .training-dashboard-list.is-list-view .training-dashboard-title-line,
.development-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-title-line,
.weekly-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-title-line,
.season-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-title-line {
    grid-column: 2;
    grid-row: 1;
    font-size: 15px;
    white-space: nowrap;
}

.readiness-dashboard .training-dashboard-list.is-list-view .training-dashboard-summary,
.development-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-summary,
.weekly-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-summary,
.season-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-summary {
    grid-column: 3;
    grid-row: 1;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: normal;
}

.readiness-dashboard .training-dashboard-list.is-list-view .training-dashboard-menu-wrap,
.development-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-menu-wrap,
.weekly-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-menu-wrap,
.season-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-menu-wrap {
    grid-column: 4;
}

.readiness-dashboard .training-dashboard-list.is-list-view .training-dashboard-expand,
.development-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-expand,
.weekly-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-expand,
.season-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-expand {
    grid-column: 5;
}

@media (min-width: 761px) {
    @media (min-width: 1401px) {
        body:has(.season-plans-dashboard) {
            max-width: none;
        }
    }

    .training-dashboard-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 16px;
        justify-content: start;
    }

    .training-dashboard-filters,
    .training-dashboard-actions {
        width: auto;
    }

    .training-dashboard-actions {
        flex: 0 0 auto;
    }

    .workspace:has(.training-workouts-dashboard .training-dashboard-list.is-list-view) {
        width: min(1560px, 100%);
    }

    .workspace:has(.training-workouts-dashboard .training-dashboard-list:not(.is-list-view)) {
        width: min(1560px, 100%);
    }

    .workspace:has(.readiness-dashboard .training-dashboard-list.is-list-view),
    .workspace:has(.development-plans-dashboard .training-dashboard-list.is-list-view),
    .workspace:has(.weekly-plans-dashboard),
    .workspace:has(.season-plans-dashboard) {
        width: min(1560px, 100%);
    }

    .workspace:has(.season-plans-dashboard) {
        width: 100%;
    }

    #planning-fields:has(.training-workouts-dashboard .training-dashboard-list.is-list-view) {
        grid-template-columns: minmax(0, 1fr);
    }

    #planning-fields:has(.training-workouts-dashboard .training-dashboard-list:not(.is-list-view)) {
        grid-template-columns: minmax(0, 1fr);
    }

    #planning-fields:has(.readiness-dashboard .training-dashboard-list.is-list-view),
    #planning-fields:has(.development-plans-dashboard .training-dashboard-list.is-list-view),
    #planning-fields:has(.weekly-plans-dashboard),
    #planning-fields:has(.season-plans-dashboard) {
        grid-template-columns: minmax(0, 1fr);
    }

    .workspace:has(.training-workouts-dashboard .training-dashboard-list.is-list-view) .workspace-heading {
        justify-content: flex-start;
    }

    .workspace:has(.training-workouts-dashboard .training-dashboard-list.is-list-view) .workspace-description {
        flex: 0 1 470px;
    }

    .workspace:has(.readiness-dashboard .training-dashboard-list.is-list-view) .workspace-description,
    .workspace:has(.development-plans-dashboard .training-dashboard-list.is-list-view) .workspace-description,
    .workspace:has(.weekly-plans-dashboard .training-dashboard-list.is-list-view) .workspace-description,
    .workspace:has(.season-plans-dashboard .training-dashboard-list.is-list-view) .workspace-description {
        flex: 0 1 470px;
    }

    .training-workouts-dashboard:has(.training-dashboard-list.is-list-view) .training-dashboard-controls {
        justify-content: flex-start;
    }
}

.training-dashboard-empty {
    padding: 32px 20px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.planning-plan-file-restore:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.training-dashboard-empty-compact {
    padding: 8px 12px;
    border-style: solid;
    font-size: 12px;
    text-align: left;
}

.training-dashboard-schedule-status {
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid var(--teal);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
}

.training-dashboard-schedule-status[data-error] {
    border-color: #b85c5c;
    color: #9a3f3f;
}

.training-dashboard-card {
    display: grid;
    gap: 7px;
    padding: 11px 14px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(23, 50, 58, 0.04);
    position: relative;
}

.training-dashboard-section {
    display: grid;
    gap: 10px;
}

.training-dashboard-section-title {
    margin: 10px 0 0;
    color: var(--muted);
    font: 700 13px Arial, sans-serif;
    text-transform: uppercase;
}

.training-workouts-dashboard .training-dashboard-list:not(.is-list-view) .training-dashboard-session-columns {
    display: grid;
    grid-template-columns: 360px 42px 360px;
    gap: 10px;
    justify-content: start;
}

.training-workouts-dashboard .training-dashboard-list:not(.is-list-view) .training-dashboard-session-columns.is-day-expanded {
    grid-template-columns: 360px 42px 360px 360px;
}

.training-dashboard-day-toggle {
    align-self: start;
    width: 42px;
    min-height: 28px;
    padding: 4px 0;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    color: var(--nav);
    font: 700 10px Arial, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    outline: 0;
    box-shadow: none;
}

.training-dashboard-day-toggle:hover,
.training-dashboard-day-toggle:focus-visible {
    background: transparent;
    color: var(--teal);
    text-decoration: underline;
    outline: 0;
    box-shadow: none;
}

.training-dashboard-session-column-title {
    margin: 0;
    color: var(--muted);
    font: 700 12px Arial, sans-serif;
    text-transform: uppercase;
}

.training-dashboard-session-cards {
    display: grid;
    gap: 10px;
}

@media (max-width: 760px) {
    .training-workouts-dashboard .training-dashboard-list:not(.is-list-view) .training-dashboard-session-columns {
        grid-template-columns: minmax(0, 1fr);
        overflow-x: visible;
    }

    .training-workouts-dashboard .training-dashboard-list:not(.is-list-view) .training-dashboard-session-columns.is-day-expanded {
        grid-template-columns: minmax(0, 1fr);
    }

    .training-dashboard-day-toggle {
        min-height: 36px;
        writing-mode: horizontal-tb;
    }
}

.training-dashboard-menu-wrap {
    position: relative;
    margin-left: auto;
}

.training-dashboard-menu-button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
}

.admin-swimmer-profile .admin-swimmer-avatar-button {
    width: auto;
    height: 34px;
    min-width: 0;
    padding: 5px 11px 5px 7px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.2;
}

.editera-workspace .editera-avatar-chip {
    width: auto;
    height: 34px;
    min-width: 0;
    padding: 5px 11px 5px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.2;
}

.editera-workspace .editera-avatar-chip-image,
.editera-workspace .editera-avatar-chip-fallback {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    border-radius: 50%;
}

.editera-workspace .editera-avatar-chip-image {
    display: block;
    object-fit: cover;
}

:root {
    --avatar-radius: 50%;
    --avatar-size-small: 24px;
    --avatar-size-card: 34px;
    --avatar-size-menu: 42px;
}

.simbot-avatar {
    display: block;
    width: var(--avatar-size, var(--avatar-size-small));
    height: var(--avatar-size, var(--avatar-size-small));
    padding: 0;
    border: 0;
    border-radius: var(--avatar-radius);
    background: transparent;
    object-fit: cover;
    object-position: center;
    overflow: hidden;
}

.simbot-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--avatar-size, var(--avatar-size-small));
    height: var(--avatar-size, var(--avatar-size-small));
    border: 0;
    border-radius: var(--avatar-radius);
}

.auth-user-avatar.simbot-avatar,
.auth-user-avatar.simbot-avatar-fallback,
.admin-swimmer-avatar-button-image.simbot-avatar,
.editera-avatar-chip-image.simbot-avatar,
.training-dashboard-avatar.simbot-avatar {
    --avatar-size: var(--avatar-size-small);
}

.auth-menu-avatar.simbot-avatar,
.auth-menu-avatar.simbot-avatar-fallback {
    --avatar-size: var(--avatar-size-menu);
}

.training-dashboard-avatar.simbot-avatar {
    --avatar-size: var(--avatar-size-card);
}

.training-dashboard-menu {
    position: absolute;
    top: 38px;
    right: 0;
    z-index: 5;
    display: grid;
    min-width: 150px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.training-dashboard-menu[hidden] {
    display: none;
}

.readiness-dashboard .training-dashboard-menu,
.development-plans-dashboard .training-dashboard-menu {
    right: 0;
    left: auto;
}

.training-dashboard-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    font-size: 13px;
}

.training-dashboard-menu-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 4px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.training-dashboard-menu-link:hover,
.training-dashboard-menu-link:focus-visible {
    background: var(--surface-muted);
    color: var(--nav);
    text-decoration: underline;
}

.admin-swimmer-delete-wrap {
    display: block;
}

.training-dashboard-menu .admin-swimmer-delete-wrap button {
    color: #9d352a;
}

.training-dashboard-menu .admin-swimmer-delete-wrap button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.training-dashboard-menu button:hover {
    background: var(--surface-muted);
}

.training-dashboard-menu button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.training-dashboard-menu .admin-swimmer-registration-action {
    color: #9d352a;
}

.training-dashboard-menu .admin-swimmer-registration-action .training-dashboard-menu-icon {
    color: #9d352a;
}

.training-dashboard-menu .admin-swimmer-registration-action:disabled {
    cursor: not-allowed;
}

.training-dashboard-menu-icon {
    width: 18px;
    color: var(--muted);
    font-size: 16px;
    text-align: center;
}

.training-dashboard-expand {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
}

.training-dashboard-detail {
    max-height: 320px;
    overflow: auto;
    padding: 10px 0 2px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    white-space: pre-wrap;
    font: 12px/1.4 Arial, sans-serif;
}

.training-dashboard-detail[hidden] {
    display: none;
}

.training-dashboard-pdf-detail {
    display: grid;
    gap: 8px;
    max-height: none;
}

.training-dashboard-pdf-open {
    justify-self: start;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
}

.training-dashboard-pdf-preview {
    display: block;
    width: 100%;
    height: min(720px, 72vh);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.training-dashboard-pdf-unavailable {
    max-height: none;
}

.season-plan-pdf-detail {
    max-height: none;
    overflow: visible;
}

.season-plan-pdf-viewer {
    display: grid;
    gap: 8px;
    width: 70%;
    margin-inline: auto;
}

.season-plan-pdf-toolbar,
.season-plan-pdf-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.season-plan-pdf-toolbar {
    flex-wrap: wrap;
    justify-content: space-between;
}

.season-plan-pdf-icon-button {
    display: inline-grid;
    place-items: center;
    width: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
}

.season-plan-pdf-icon-button:disabled {
    opacity: 0.45;
    cursor: default;
}

.season-plan-pdf-page-status,
.season-plan-pdf-zoom-status {
    min-width: 78px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.season-plan-pdf-open {
    margin-left: auto;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
}

.season-plan-pdf-canvas-wrap {
    display: grid;
    place-items: start center;
    min-height: 252px;
    max-height: 546px;
    padding: 10px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.season-plan-pdf-canvas {
    display: block;
    max-width: none;
    box-shadow: 0 2px 10px rgba(23, 50, 58, 0.2);
}

.season-plan-pdf-message {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 760px) {
    .season-plan-pdf-viewer {
        width: 100%;
    }

    .season-plan-pdf-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .season-plan-pdf-open {
        grid-column: 1 / -1;
        margin-left: 0;
    }

    .season-plan-pdf-canvas-wrap {
        min-height: 300px;
        max-height: 62vh;
        padding: 6px;
    }
}

.training-dashboard-summary-detail {
    display: grid;
    gap: 14px;
    white-space: normal;
}

.workout-category-summary {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.workout-category-summary:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.workout-category-summary h5 {
    margin: 0 0 12px;
    color: var(--nav);
    font: bold 17px Georgia, "Times New Roman", serif;
}

.info-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 8px;
}

.info-tile {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.info-tile-title {
    margin: 0 0 5px;
    color: var(--muted);
    font: bold 11px Arial, sans-serif;
}

.info-tile-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--ink);
    font: 12px/1.35 Arial, sans-serif;
    text-align: left;
}

.info-tile-future {
    display: flex;
    align-items: center;
    min-height: 120px;
    color: var(--muted);
    font: 12px/1.4 Arial, sans-serif;
    text-align: left;
}

.training-dashboard-card:not(:has(.training-dashboard-detail:not([hidden]))) {
    min-height: 118px;
}

.training-workouts-dashboard .training-dashboard-card {
    gap: 7px;
    padding: 11px 14px 10px;
}

.training-workouts-dashboard .training-dashboard-card:not(:has(.training-dashboard-detail:not([hidden]))) {
    min-height: 118px;
}

.training-workouts-dashboard .training-dashboard-card-top {
    gap: 12px;
    font-size: 14px;
}

.training-workouts-dashboard .training-dashboard-menu-button,
.training-workouts-dashboard .training-dashboard-expand {
    width: 32px;
    height: 32px;
    font-size: 18px;
}

.training-workouts-dashboard .training-dashboard-title-line {
    font-size: 18px;
}

.training-dashboard-test-data {
    flex: 0 0 auto;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid #8ca8ae;
    border-radius: 4px;
    background: #e8f1f3;
    color: #173f4a;
    font: 700 11px/1.2 Arial, sans-serif;
    white-space: nowrap;
}

.training-workouts-dashboard .training-dashboard-data-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    min-height: 24px;
}

.training-workouts-dashboard .training-dashboard-data-tags>.workout-effort-tag,
.training-workouts-dashboard .training-dashboard-data-tags>.training-dashboard-test-data,
.training-workouts-dashboard .training-dashboard-data-tags>.training-dashboard-pulse-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    box-sizing: border-box;
    height: 26px;
    min-height: 26px;
    margin-top: 0;
    padding: 3px 8px;
    font: 700 12px/1.2 Arial, sans-serif;
}

.training-workouts-dashboard .training-dashboard-meta {
    font-size: 12px;
}

.training-workouts-dashboard .training-dashboard-summary {
    font-size: 14px;
    line-height: 1.5;
}

.training-workouts-dashboard .training-dashboard-avatar-row {
    min-height: 34px;
    padding-top: 2px;
}

.training-workouts-dashboard .training-dashboard-avatar-row .training-dashboard-avatar,
.training-workouts-dashboard .training-dashboard-avatar-more {
    width: 34px;
    height: 34px;
    margin-left: -7px;
    border-width: 2px;
    font-size: 11px;
}

.training-workouts-dashboard .training-dashboard-avatar-row .training-dashboard-avatar:first-child {
    margin-left: 0;
}

.training-dashboard-compact-meta {
    display: contents;
}

.training-workouts-dashboard .training-dashboard-meta {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.training-workouts-dashboard .training-dashboard-compact-meta .training-dashboard-summary {
    flex: 0 0 auto;
}

.training-dashboard-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

.training-dashboard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 10px;
    color: var(--nav);
}

.training-dashboard-icon .workout-polar-heart {
    color: #d60036;
    font: 700 15px/1 Arial, sans-serif;
    text-shadow: none;
}

.training-dashboard-group {
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid var(--teal);
    border-radius: 999px;
    background: rgba(8, 126, 120, 0.08);
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
}

.training-dashboard-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--nav);
    font-size: 18px;
    font-weight: 700;
}

.training-dashboard-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.training-dashboard-summary {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
}

.competitions-dashboard .competition-catalog-filters,
.camps-dashboard .competition-catalog-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
    gap: 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.competitions-dashboard .competition-catalog-filters label,
.camps-dashboard .competition-catalog-filters label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font: 600 12px/1.2 Arial, sans-serif;
}

.competitions-dashboard .competition-catalog-filters input,
.competitions-dashboard .competition-catalog-filters select,
.camps-dashboard .competition-catalog-filters input,
.camps-dashboard .competition-catalog-filters select {
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 14px/1.25 Arial, sans-serif;
}

.competitions-dashboard .competition-catalog-actions,
.camps-dashboard .competition-catalog-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
}

.competitions-dashboard .competition-catalog-actions .training-dashboard-primary,
.camps-dashboard .competition-catalog-actions .training-dashboard-primary {
    min-height: 40px;
    white-space: nowrap;
}

.competitions-dashboard .training-dashboard-section,
.camps-dashboard .training-dashboard-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.competitions-dashboard .training-dashboard-group,
.camps-dashboard .training-dashboard-group {
    margin-left: 0;
}

.competition-card-groups {
    position: relative;
    flex: 0 0 86px;
}

.competition-card-groups-toggle {
    width: 86px;
    min-width: 86px;
    min-height: 28px;
    padding: 4px 6px;
    cursor: pointer;
}

.camps-editor-links .event-primary-field {
    grid-column: 1 / -1;
}

.competition-editor-activity-information {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}

.competition-editor-activity-information>h3 {
    grid-column: 1 / -1;
}

.competition-editor-activity-information .event-primary-field {
    min-width: 0;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.competition-editor-activity-information .modal-input {
    min-height: 42px;
    margin: 6px 0 0;
    padding: 9px 11px;
    border-color: #aebfbd;
    border-radius: 5px;
    background: #fbfdfc;
    color: var(--ink);
    font: 400 14px/1.35 Arial, sans-serif;
}

.competition-editor-activity-information select.modal-input {
    padding-right: 30px;
    font-weight: 500;
}

.competition-editor-activity-information .modal-input:focus {
    border-color: var(--teal);
    outline: 3px solid rgba(8, 126, 120, 0.16);
}

.activity-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--muted);
    font: 600 12px/1.35 Arial, sans-serif;
}

.activity-card-details span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.competition-catalog-card-status span.activity-status-registration_open {
    border-color: #4b8c75;
    background: #edf7f1;
    color: #266348;
}

.competition-catalog-card-status span.activity-status-full {
    border-color: #c7851c;
    background: #fff4d9;
    color: #82540d;
}

.competition-catalog-card-status span.activity-status-completed {
    border-color: #71817c;
    background: #eef2f0;
    color: #455651;
}

.competition-catalog-card-status span.activity-status-cancelled {
    border-color: #b85858;
    background: #fff0f0;
    color: #922f2f;
}

@media (max-width: 760px) {
    .competition-editor-activity-information {
        grid-template-columns: minmax(0, 1fr);
    }
}

.competition-card-groups-popover {
    position: absolute;
    z-index: 6;
    top: calc(100% + 6px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: min(360px, calc(100vw - 48px));
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--teal);
    border-radius: 5px;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(23, 50, 58, 0.16);
    color: var(--ink);
}

.competition-card-groups-popover ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.competition-card-groups-popover li {
    font: 600 12px/1.35 Arial, sans-serif;
    white-space: nowrap;
}

.competitions-dashboard .training-dashboard-section-title {
    grid-column: 1 / -1;
}

.competition-catalog-card-status {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 22px;
    color: var(--muted);
    font: 700 11px/1 Arial, sans-serif;
}

.competition-catalog-card-status span {
    padding: 4px 6px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface-muted);
}

.competition-catalog-card-status span.is-soon {
    border-color: #c7851c;
    background: #fff4d9;
    color: #82540d;
}

.competition-catalog-card-status span.is-overdue {
    border-color: #b85858;
    background: #fff0f0;
    color: #922f2f;
}

.competition-catalog-card-status span.has-document {
    border-color: #5a8e78;
    background: #edf7f1;
    color: #266348;
}

.competition-catalog-load-more {
    justify-self: center;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--nav);
    font: 600 13px Arial, sans-serif;
}

@media (max-width: 760px) {

    .competitions-dashboard .competition-catalog-filters,
    .camps-dashboard .competition-catalog-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .competitions-dashboard .training-dashboard-section,
    .camps-dashboard .training-dashboard-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .competitions-dashboard .competition-catalog-actions,
    .camps-dashboard .competition-catalog-actions {
        justify-content: flex-end;
    }
}

.training-dashboard-plan-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.training-dashboard-plan-summary span {
    max-width: 100%;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.weekly-plans-dashboard .training-dashboard-menu-wrap {
    margin-left: 0;
}

.training-dashboard-plan-status {
    margin-left: auto;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font: 700 11px/1 Arial, sans-serif;
    white-space: nowrap;
}

.training-dashboard-plan-status[data-status="Klar"] {
    border-color: var(--teal);
    background: #eaf4f1;
    color: var(--nav);
}

.training-dashboard-plan-status[data-status="Behöver kompletteras"] {
    border-color: #d6a35d;
    background: #fff7e8;
    color: #76501d;
}

.training-dashboard-plan-status[data-status="Utkast"] {
    background: var(--surface-muted);
}

.training-dashboard-weekly-summary {
    display: grid;
    gap: 4px;
}

.training-dashboard-weekly-focus {
    color: var(--ink);
    font: 600 14px/1.35 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.training-dashboard-weekly-metrics,
.training-dashboard-weekly-coaches {
    color: var(--muted);
    font: 12px/1.35 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.weekly-plans-dashboard .training-dashboard-card {
    grid-template-columns: minmax(0, 1fr) 218px;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.weekly-plans-dashboard .training-dashboard-title-line,
.weekly-plans-dashboard .training-dashboard-weekly-summary {
    grid-column: 1;
}

.weekly-plans-dashboard .training-dashboard-card-top {
    grid-column: 1 / -1;
}

.weekly-plan-test-data-grid {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: end;
    display: grid;
    grid-template-columns: 25px repeat(3, minmax(0, 1fr));
    grid-auto-rows: 14px;
    gap: 2px;
    width: 218px;
    color: var(--muted);
    font: 700 9px/1 Arial, sans-serif;
}

.weekly-plan-test-data-heading,
.weekly-plan-test-data-day {
    display: flex;
    align-items: center;
}

.weekly-plan-test-data-heading {
    justify-content: center;
    font-size: 8px;
}

.weekly-plan-test-data-day {
    justify-content: flex-start;
}

.weekly-plan-test-data-cell {
    width: 100%;
    min-width: 0;
    min-height: 14px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--surface-muted);
}

button.weekly-plan-test-data-cell.is-filled {
    cursor: pointer;
}

.weekly-plan-test-data-cell.is-filled[data-period="Morgon"] {
    border-color: #7eb9d6;
    background: #a9d7f1;
}

.weekly-plan-test-data-cell.is-filled[data-period="Dag"] {
    border-color: #d1b451;
    background: #f7df81;
}

.weekly-plan-test-data-cell.is-filled[data-period="Kväll"] {
    border-color: #928bbd;
    background: #c8c4df;
}

button.weekly-plan-test-data-cell.is-filled:hover,
button.weekly-plan-test-data-cell.is-filled:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 1px;
}

.training-dashboard-plan-detail {
    white-space: pre-line;
}

.training-dashboard-card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.training-dashboard-card-actions button {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 12px;
}

.training-dashboard-avatars {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.training-dashboard-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dfe7ea, #b8c3cb);
    color: var(--nav);
    font-size: 10px;
    font-weight: 700;
    object-fit: cover;
}

.training-dashboard-avatar-row {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding-top: 2px;
}

.training-dashboard-avatar-row .training-dashboard-avatar {
    width: 34px;
    height: 34px;
    margin-left: -7px;
    border: 2px solid var(--surface);
    font-size: 11px;
}

.training-dashboard-avatar-row .training-dashboard-avatar:first-child {
    margin-left: 0;
}

.training-dashboard-avatar-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: -7px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--ink);
    font: 700 12px Arial, sans-serif;
}

.workout-workspace {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(390px, 450px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    min-width: 0;
}

.workout-setup-pane,
.workout-editor-pane {
    min-height: 100%;
}

.workout-setup-pane {
    align-self: start;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.workout-setup {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(23, 50, 58, 0.07);
    min-height: 0;
}

.workout-setup-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.workout-setup-header h3,
.workout-editor-header h3 {
    margin: 0;
    color: var(--nav);
    font-size: 22px;
    font-weight: 600;
}

.workout-setup-cancel {
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    color: var(--teal);
    font-size: 24px;
    line-height: 1;
}

.workout-setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.workout-setup-field {
    min-width: 0;
}

.workout-setup-field-wide {
    grid-column: 1 / -1;
}

.workout-setup-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    white-space: nowrap;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.workout-setup-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.workout-setup-field>label,
.workout-setup-field>span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.workout-setup-field input,
.workout-setup-field select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 15px Arial, sans-serif;
}

.workout-effort-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    color: #102326;
    font-size: 12px;
    font-weight: 700;
}

.workout-effort-tag[data-effort-color="gray"] {
    background: #d2d7d8;
}

.workout-effort-tag[data-effort-color="blue"] {
    background: #a9d7f1;
}

.workout-effort-tag[data-effort-color="green"] {
    background: #a9dfbd;
}

.workout-effort-tag[data-effort-color="yellow"] {
    background: #f7df81;
}

.workout-effort-tag[data-effort-color="red"] {
    background: #f0a5a5;
}

.workout-subgroups {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 44px;
    padding: 7px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.workout-subgroup {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 0;
    border-radius: 999px;
    background: #dfeaf0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.workout-subgroup.is-selected {
    background: var(--teal);
    color: #ffffff;
}

.workout-add-all {
    width: fit-content;
    margin-top: 4px;
    padding: 8px 12px;
    border: 1px solid var(--teal);
    border-radius: 5px;
    background: transparent;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
}

.workout-remove-all {
    width: fit-content;
    margin-top: 4px;
    padding: 8px 12px;
    border: 1px solid #b85c5c;
    border-radius: 5px;
    background: transparent;
    color: #9a3f3f;
    font-size: 12px;
    font-weight: 700;
}

.workout-remove-all:disabled {
    border-color: var(--line);
    background: transparent;
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.55;
}

.workout-setup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.workout-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 22.92%);
    min-height: 620px;
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(23, 50, 58, 0.07);
    transition: grid-template-columns 180ms ease-out;
}

.workout-editor.has-open-set-drawer,
.workout-editor.has-open-test-drawer {
    grid-template-columns: minmax(0, 1fr) minmax(270px, calc(22.92% + 7.5cm));
}

.workout-editor-main {
    display: grid;
    grid-template-rows: auto auto minmax(360px, 1fr);
    min-width: 0;
}

.workout-editor-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.workout-editor-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-left: auto;
}

.workout-set-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: #b33939;
    font: 700 20px/1 Arial, sans-serif;
}

.workout-set-heart:hover,
.workout-set-heart:focus-visible,
.workout-set-heart.is-active {
    border-color: #b33939;
    background: #b33939;
    color: #ffffff;
}

.workout-test-notes-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: #8b5b16;
    font: 700 19px/1 Arial, sans-serif;
}

.workout-test-notes-button:hover,
.workout-test-notes-button:focus-visible,
.workout-test-notes-button.is-active {
    border-color: #8b5b16;
    background: #8b5b16;
    color: #ffffff;
}

.workout-pulse-button,
.workout-pulse-watch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--teal);
    font: 700 22px/1 Arial, sans-serif;
}

.workout-pulse-button {
    border-color: #d60036;
    background: #fff1f4;
    color: #d60036;
}

.workout-pulse-button .workout-polar-heart {
    color: currentColor;
    font: 700 22px/1 Arial, sans-serif;
    text-shadow: none;
}

.workout-pulse-button:hover,
.workout-pulse-button:focus-visible,
.workout-pulse-watch-button:hover,
.workout-pulse-watch-button:focus-visible {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.workout-pulse-button:hover,
.workout-pulse-button:focus-visible {
    border-color: #aa002b;
    background: #d60036;
}

.workout-pulse-watch-button {
    color: #2d5f8d;
}

.workout-pulse-watch-button:disabled {
    border-color: var(--line);
    background: var(--surface-muted);
    color: var(--muted);
    cursor: not-allowed;
}

.training-dashboard-pulse-count {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    box-sizing: border-box;
    padding: 3px 8px;
    border: 1px solid #5ca56f;
    border-radius: 4px;
    background: #e2f3e5;
    color: #1e6634;
    font: 700 12px/1.2 Arial, sans-serif;
    font-weight: 700;
}

.workout-set-drawer {
    position: absolute;
    z-index: 4;
    top: 59px;
    right: 0;
    width: 100%;
    height: calc(100% - 59px);
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    background: #f4f0d6;
    box-shadow: -14px 0 28px rgba(23, 50, 58, 0.2);
    animation: workout-set-drawer-in 180ms ease-out;
}

.workout-set-drawer[hidden] {
    display: none;
}

@keyframes workout-set-drawer-in {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.workout-set-drawer-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.workout-set-drawer-header h4 {
    margin: 0;
    color: var(--ink);
    font: 700 16px/1.2 Arial, sans-serif;
}

.workout-set-category-filters {
    display: flex;
    align-items: center;
    gap: 4px;
}

.workout-set-category-filter {
    min-height: 28px;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.workout-set-category-filter.is-active,
.workout-set-category-filter:hover,
.workout-set-category-filter:focus-visible {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.workout-set-drawer-header .training-dashboard-primary {
    margin-left: auto;
}

.workout-set-drawer-close,
.workout-set-note-remove {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
}

.workout-set-drawer-close {
    width: auto;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.workout-set-notes {
    display: grid;
    gap: 13px;
}

.workout-set-notes-empty {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

.workout-set-note {
    position: relative;
    display: grid;
    gap: 9px;
    padding: 15px;
    border: 1px solid #d5c665;
    border-radius: 3px;
    background: #fff7a8;
    box-shadow: 3px 4px 0 rgba(157, 137, 27, 0.18);
    cursor: pointer;
}

.workout-set-note-global-test {
    background: #ccefe1;
    border-color: #86c6ad;
}

.workout-set-note-group-favorite {
    background: #dbe9ff;
    border-color: #9bbce5;
}

.workout-set-note-group-test {
    background: #f9d9e4;
    border-color: #dc9ab6;
}

.workout-test-note-1 {
    background: #fff7a8;
    border-color: #d5c665;
}

.workout-test-note-2 {
    background: #ccefe1;
    border-color: #86c6ad;
}

.workout-test-note-3 {
    background: #dbe9ff;
    border-color: #9bbce5;
}

.workout-test-note-4 {
    background: #f9d9e4;
    border-color: #dc9ab6;
}

.workout-set-note input,
.workout-set-note textarea,
.workout-set-note select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(43, 55, 49, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
}

.workout-set-note input {
    min-height: 30px;
    font-weight: 700;
}

.workout-set-note textarea {
    min-width: 0;
    max-width: 100%;
    resize: vertical;
    min-height: 122px;
    padding: 8px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.workout-set-note-options {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.workout-set-note-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.workout-set-note-header>input {
    flex: 1 1 90px;
    min-width: 0;
    height: 30px;
    min-height: 30px;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 20px;
}

.workout-set-note-summary {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 26px;
    box-sizing: border-box;
    padding: 5px 6px;
    border-top: 1px solid rgba(43, 55, 49, 0.2);
    border-bottom: 1px solid rgba(43, 55, 49, 0.2);
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.workout-set-note-options select,
.workout-set-group-picker-button {
    min-height: 30px;
    max-width: 108px;
    padding: 4px 6px;
    border: 1px solid rgba(43, 55, 49, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font-size: 11px;
}

.workout-set-group-picker {
    position: relative;
}

.workout-set-group-picker-button {
    overflow: hidden;
    max-width: 118px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workout-set-note-groups {
    position: absolute;
    z-index: 2;
    top: calc(100% + 4px);
    right: 0;
    display: grid;
    gap: 5px;
    min-width: 160px;
    max-height: 190px;
    padding: 6px 8px 6px 4px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: 0 8px 18px rgba(23, 50, 58, 0.18);
}

.workout-set-note-groups[hidden] {
    display: none;
}

.workout-set-note-groups label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 16px;
    font-size: 11px;
    line-height: 1;
}

.workout-set-note-groups input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: checkbox;
    flex: 0 0 14px;
    width: 14px !important;
    min-width: 14px;
    min-height: 14px !important;
    height: 14px !important;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: initial;
    border-radius: 0;
    background: initial;
}

.workout-set-note-paste {
    min-height: 30px;
    padding: 4px 7px;
    border: 1px solid var(--teal);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.workout-set-note-paste:hover,
.workout-set-note-paste:focus-visible {
    background: var(--teal);
    color: #ffffff;
}

.workout-test-note-print {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(43, 55, 49, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font-size: 17px;
    line-height: 1;
}

.workout-test-note-print:hover,
.workout-test-note-print:focus-visible {
    background: var(--teal);
    border-color: var(--teal);
    color: #ffffff;
}

.workout-set-note-remove {
    width: 30px;
    height: 30px;
    position: static;
    color: #b33939;
    font-size: 16px;
}

.workout-editor-tools[hidden] {
    display: none;
}

.workout-editor-side-tools {
    position: relative;
    z-index: 5;
    justify-content: flex-end;
    min-height: 59px;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.workout-editor-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--teal);
    font-size: 19px;
    line-height: 1;
}

.workout-editor-tool[hidden] {
    display: none;
}

.workout-editor-tool:hover,
.workout-editor-tool:focus-visible {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.workout-editor-back {
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    color: var(--teal);
    font-size: 24px;
    line-height: 1;
}

.workout-editor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.strength-workout-builder {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}

.strength-workout-builder h4 {
    margin: 0 0 10px;
    color: var(--nav);
    font-size: 15px;
}

.strength-workout-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.strength-workout-controls select,
.strength-workout-controls .strength-workout-add {
    grid-column: 1 / -1;
}

.strength-workout-controls select,
.strength-workout-controls input,
.strength-workout-add {
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.strength-workout-add {
    border-color: var(--teal);
    color: var(--teal);
    font-weight: 700;
}

.workout-editor-textarea {
    width: 100%;
    min-height: 360px;
    padding: 18px 20px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    color: var(--ink);
    font: 16px/1.55 Arial, sans-serif;
    resize: vertical;
}

.workout-hashtag-picker {
    position: fixed;
    z-index: 30;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--teal);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(23, 50, 58, 0.2);
}

.workout-hashtag-picker-option {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--ink);
    text-align: left;
}

.workout-hashtag-picker-option:hover,
.workout-hashtag-picker-option.is-active {
    background: var(--surface-muted);
    color: var(--teal);
}

.workout-hashtag-caret-mirror {
    position: fixed;
    top: 0;
    left: -10000px;
    overflow: hidden;
    visibility: hidden;
    overflow-wrap: break-word;
}

.workout-analysis-panel {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-muted);
}

.workout-calculation-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.workout-calculation-heading h2 {
    margin: 0;
}

.workout-calculation-explanation,
.workout-calculation-total,
.workout-calculation-status {
    margin: 0;
    color: var(--ink);
    line-height: 1.5;
}

.workout-calculation-line {
    max-height: 110px;
    margin: 0;
    padding: 10px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 14px/1.45 monospace;
    white-space: pre-wrap;
}

.workout-calculation-list {
    display: grid;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.workout-calculation-row {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.workout-calculation-row:last-child {
    border-bottom: 0;
}

.workout-calculation-row.is-selected {
    background: #dcefeb;
    box-shadow: inset 3px 0 0 var(--teal);
}

.workout-analysis-title {
    margin: 0;
    color: var(--nav);
    font: 700 13px Arial, sans-serif;
}

.workout-analysis-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.workout-analysis-scope button {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font: 700 11px Arial, sans-serif;
}

.workout-analysis-scope button.is-active {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.workout-analysis-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.workout-analysis-grid.workout-analysis-category-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

@media (min-width: 1200px) {
    .workspace:has(.workout-analysis-panel) {
        width: min(1920px, 100%);
    }
}

.workout-analysis-card {
    min-height: 78px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.workout-analysis-card h5 {
    margin: 0 0 8px;
    color: var(--teal);
    font: 700 11px Arial, sans-serif;
}

.workout-analysis-card p {
    margin: 0;
    color: var(--ink);
    font: 700 13px/1.35 Arial, sans-serif;
}

@media (max-width: 900px) {
    .workout-analysis-grid {
        grid-template-columns: repeat(3, minmax(110px, 1fr));
    }

    .workout-analysis-grid.workout-analysis-category-grid {
        grid-template-columns: repeat(3, minmax(110px, 1fr));
    }

    .workout-analysis-category-grid .info-tile-future {
        display: none;
    }
}

@media (max-width: 600px) {
    .workout-analysis-grid {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }

    .workout-analysis-grid.workout-analysis-category-grid {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }
}

.workout-editor-side {
    position: relative;
    min-width: 0;
    border-left: 1px solid var(--line);
}

.workout-editor-side .workout-editor-swimmers {
    padding-top: 18px;
}

.workout-editor-side .workout-editor-swimmers {
    padding-top: 16px;
}

.workout-setup .workout-editor-extra-group {
    margin-top: 2px;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.workout-polar-modal {
    width: min(1680px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 20px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 22px 60px rgba(23, 50, 58, 0.28);
}

.workout-polar-modal::backdrop {
    background: rgba(23, 50, 58, 0.38);
}

.workout-polar-modal[data-watch-only] .workout-polar-session-bar,
.workout-polar-modal[data-watch-only] .workout-polar-view-all,
.workout-polar-modal[data-watch-only] .workout-polar-tv-button,
.workout-polar-modal[data-watch-only] .workout-polar-card-view-toggle {
    display: none;
}

.workout-polar-detail-modal {
    width: min(1280px, calc(100vw - 64px));
    max-height: calc(100vh - 48px);
    padding: 24px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 22px 60px rgba(23, 50, 58, 0.28);
}

.workout-polar-detail-modal::backdrop {
    background: rgba(23, 50, 58, 0.48);
}

.workout-polar-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.workout-polar-detail-identity {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
}

.workout-polar-detail-avatar {
    display: flex;
    flex: 0 0 auto;
    width: 1px;
    height: 1px;
}

.workout-polar-detail-avatar-image,
.workout-polar-detail-avatar-image.simbot-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.workout-polar-detail-avatar-image.simbot-avatar-fallback {
    display: grid;
    place-items: center;
    background: var(--surface-muted);
    color: var(--nav);
    font: 700 28px/1 Arial, sans-serif;
}

.workout-polar-detail-title {
    min-width: 0;
}

.workout-polar-detail-topline {
    display: flex;
    align-items: baseline;
    gap: 16px;
    min-width: 0;
}

.workout-polar-detail-app,
.workout-polar-detail-workout,
.workout-polar-detail-source {
    margin: 0;
}

.workout-polar-detail-app {
    flex: 0 0 auto;
    color: var(--nav);
    font: 700 18px/1.2 Arial, sans-serif;
}

.workout-polar-detail-workout,
.workout-polar-detail-source {
    color: var(--muted);
    font: 13px/1.35 Arial, sans-serif;
}

.workout-polar-detail-header h3 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--nav);
    font: 700 18px/1.2 Arial, sans-serif;
}

.workout-polar-detail-close {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
}

.workout-polar-detail-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px 16px;
    margin: 0 0 20px;
}

.workout-polar-detail-stat {
    min-width: 0;
}

.workout-polar-detail-stats dt {
    color: var(--muted);
    font: 12px/1.2 Arial, sans-serif;
}

.workout-polar-detail-stats dd {
    margin: 4px 0 0;
    color: var(--ink);
    font: 700 18px/1.2 Arial, sans-serif;
}

.workout-polar-detail-references {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: -6px 0 12px;
}

.workout-polar-detail-reference {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ink);
    font: 600 13px/1 Arial, sans-serif;
    white-space: nowrap;
}

.workout-polar-detail-reference input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--nav);
}

.workout-polar-detail-chart {
    height: min(58vh, 560px);
    min-height: 360px;
    padding: 14px;
    border: 1px solid var(--line);
    background: #fff;
}

.workout-polar-detail-chart svg {
    display: block;
    width: 100%;
    height: 100%;
}

.workout-polar-detail-grid-line {
    stroke: var(--line);
    stroke-width: 1;
}

.workout-polar-detail-axis-label {
    fill: var(--muted);
    font: 12px Arial, sans-serif;
}

.workout-polar-detail-curve-segment {
    stroke-width: 2.5;
    stroke-linecap: round;
}

.workout-polar-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.workout-polar-header-identity {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
}

.workout-polar-modal-title {
    flex: 1 1 auto;
    min-width: 0;
}

.workout-polar-group-avatars {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
}

.workout-polar-group-avatar,
.workout-polar-group-avatar-fallback {
    display: grid;
    align-self: stretch;
    width: auto;
    min-width: 0;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
    overflow: hidden;
}

.workout-polar-group-avatar-fallback {
    place-items: center;
    background: var(--surface-muted);
    color: var(--nav);
    font: 700 12px/1 Arial, sans-serif;
}

.workout-polar-group-avatar+.workout-polar-group-avatar,
.workout-polar-group-avatar-fallback+.workout-polar-group-avatar-fallback,
.workout-polar-group-avatar+.workout-polar-group-avatar-fallback,
.workout-polar-group-avatar-fallback+.workout-polar-group-avatar {
    margin-left: -14px;
}

.workout-polar-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.workout-polar-print-select {
    width: min(190px, 22vw);
    min-height: 36px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 13px Arial, sans-serif;
}

.workout-polar-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    font: 700 19px/1 Arial, sans-serif;
}

.workout-polar-print-action {
    border-color: #087f7a;
    background: #e7f4f1;
    color: #075e5a;
}

.workout-polar-email-action {
    border-color: #2779b9;
    background: #e7f2fb;
    color: #145f98;
    font-size: 21px;
}

.workout-polar-print-action:hover,
.workout-polar-print-action:focus-visible {
    border-color: #075e5a;
    background: #087f7a;
    color: #ffffff;
}

.workout-polar-email-action:hover,
.workout-polar-email-action:focus-visible {
    border-color: #145f98;
    background: #2779b9;
    color: #ffffff;
}

.workout-polar-print-select:disabled,
.workout-polar-print-button:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.workout-polar-session-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    background: var(--surface-muted);
}

.workout-polar-session-status {
    flex: 1 1 220px;
    margin: 0;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.4;
}

.workout-polar-session-timer {
    flex: 0 0 auto;
    color: var(--nav);
    font: 700 14px/1 Arial, sans-serif;
    white-space: nowrap;
}

.workout-polar-gateway-summary {
    flex: 0 1 220px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.workout-polar-session-picker {
    display: grid;
    flex: 0 1 260px;
    gap: 3px;
    min-width: 180px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.workout-polar-session-picker select {
    width: 100%;
    min-height: 38px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: 13px Arial, sans-serif;
}

.workout-polar-session-picker select:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.workout-polar-session-count {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.workout-polar-selected-session {
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.workout-polar-session-button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--teal);
    border-radius: 5px;
    background: var(--teal);
    color: #fff;
    font-weight: 700;
}

.workout-polar-session-button[data-active="true"] {
    border-color: #aa242b;
    background: #aa242b;
}

.workout-polar-session-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.workout-polar-session-controls {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.workout-polar-session-pause {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 700;
}

.workout-polar-modal-header h3 {
    margin: 0;
    color: var(--nav);
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workout-polar-source {
    margin: 3px 0 0;
    color: var(--muted);
    font: 13px/1.3 Arial, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workout-polar-workout {
    margin: 5px 0 0;
    color: var(--ink);
    font: 600 13px/1.3 Arial, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workout-polar-close {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
}

.workout-polar-view-all,
.workout-polar-card-view-toggle {
    display: grid;
    place-items: center;
    min-width: 34px;
    min-height: 34px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 700 18px/1 Arial, sans-serif;
}

.workout-polar-tv-button {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--teal);
    border-radius: 5px;
    background: var(--teal);
    color: #fff;
    font-weight: 700;
}

.workout-polar-tv-button:hover,
.workout-polar-tv-button:focus-visible {
    border-color: #06655f;
    background: #06655f;
}

.workout-polar-message {
    grid-column: 1 / -1;
    margin: 0 0 10px;
    color: var(--muted);
    font: 13px/1.45 Arial, sans-serif;
}

.workout-polar-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding-bottom: 4px;
}

.workout-polar-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
    height: clamp(184px, 17.6vw, 224px);
    min-width: 0;
    padding: 12px;
    box-sizing: border-box;
    border: 2px solid #82909b;
    border-left-width: 6px;
    border-radius: 6px;
    background: var(--surface);
}

.workout-polar-session-delete {
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #aa242b;
    border-radius: 4px;
    background: #fff;
    color: #8f1e26;
    font-weight: 700;
}

.workout-polar-card-view-toggle {
    grid-column: 3;
    grid-row: 1;
}

.workout-polar-pulse-view,
.workout-polar-graph-view {
    grid-column: 1 / -1;
    overflow: hidden;
}

.workout-polar-pulse-view {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    row-gap: 5px;
    grid-row: 2;
    min-height: 0;
}

.workout-polar-card[data-view="graph"] .workout-polar-pulse-view,
.workout-polar-card[data-view="pulse"] .workout-polar-graph-view {
    display: none;
}

.workout-polar-card-name {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
}

.workout-polar-battery {
    --battery-level: 0;
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    gap: 4px;
    align-self: center;
    min-width: 0;
    color: var(--ink);
    font: 700 12px/1 Arial, sans-serif;
    white-space: nowrap;
}

.workout-polar-battery::before {
    box-sizing: border-box;
    width: 20px;
    height: 11px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    background: linear-gradient(to right, #087f4d 0 var(--battery-level), transparent var(--battery-level) 100%);
    content: "";
}

.workout-polar-battery::after {
    width: 2px;
    height: 5px;
    margin-left: -6px;
    border-radius: 0 1px 1px 0;
    background: currentColor;
    content: "";
}

.workout-polar-battery.is-low {
    color: #aa242b;
}

.workout-polar-battery.is-low::before {
    background: linear-gradient(to right, #aa242b 0 var(--battery-level), transparent var(--battery-level) 100%);
}

.workout-polar-graph-view {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 0;
}

.workout-polar-graph {
    position: relative;
    display: grid;
    min-height: 0;
    height: 100%;
    place-items: center;
    margin: 0;
    border-bottom: 1px solid #111;
    border-left: 1px solid #111;
    box-sizing: border-box;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.42);
}

.workout-polar-graph-status {
    padding: 8px;
    color: var(--muted);
    font: 600 12px/1.3 Arial, sans-serif;
    text-align: center;
}

.workout-polar-graph svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.workout-polar-graph polyline {
    fill: none;
    stroke: var(--nav);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.workout-polar-graph.is-interactive {
    cursor: zoom-in;
}

.workout-polar-card[data-zone="1"] {
    border-color: #6b7280;
    background: #e5e7eb;
}

.workout-polar-card[data-zone="2"] {
    border-color: #0072ce;
    background: #cbe8ff;
}

.workout-polar-card[data-zone="3"] {
    border-color: #009b48;
    background: #c7f2d6;
}

.workout-polar-card[data-zone="4"] {
    border-color: #f58220;
    background: #ffe0b2;
}

.workout-polar-card[data-zone="5"] {
    border-color: #e31b23;
    background: #ffd0d0;
}

.workout-polar-card h4,
.workout-polar-card p {
    margin: 0;
}

.workout-polar-card h4 {
    overflow-wrap: anywhere;
    color: var(--nav);
    font: 700 23px/1 Arial, sans-serif;
}

.workout-polar-live-reading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    container-type: inline-size;
}

.workout-polar-heart {
    display: inline-block;
    color: #d60036;
    font: 700 clamp(34px, 4.1vw, 54px)/1 Arial, sans-serif;
    text-shadow: 0 1px 0 #fff;
}

.workout-polar-heart.is-live {
    animation: workout-polar-heartbeat .9s ease-in-out infinite;
}

@keyframes workout-polar-heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.18);
    }

    55% {
        transform: scale(.95);
    }
}

.workout-polar-heart-rate,
.workout-polar-percentage {
    color: var(--ink);
    font: 800 clamp(31px, 4.4vw, 58px)/1 Arial, sans-serif;
    white-space: nowrap;
}

.workout-polar-percentage {
    justify-self: end;
    padding-left: 8px;
}

.workout-polar-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-top: 5px;
    border-top: 1px solid rgba(18, 50, 58, .35);
}

.workout-polar-max,
.workout-polar-session-max {
    color: var(--ink);
    font: 700 clamp(12px, 1.1vw, 16px)/1.2 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.workout-polar-session-max {
    text-align: right;
}

.workout-polar-card-gateway-status {
    grid-column: 1 / -1;
    min-height: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #8f1e26;
    font: 700 11px/1.25 Arial, sans-serif;
}

@media (max-width: 1450px) {
    .workout-polar-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .workout-polar-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .workout-polar-session-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .workout-polar-session-controls {
        width: 100%;
    }

    .workout-polar-session-controls button {
        flex: 1 1 0;
    }

    .workout-polar-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .workout-polar-card {
        height: 184px;
    }

    .workout-polar-session-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .workout-polar-session-button {
        width: 100%;
    }

    .workout-polar-session-picker {
        width: 100%;
        max-width: none;
    }

    .workout-polar-modal-header {
        align-items: flex-start;
    }

    .workout-polar-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 5px;
    }

    .workout-polar-print-select {
        width: min(155px, 42vw);
    }

    .workout-polar-tv-button {
        padding: 7px 9px;
        font-size: 12px;
    }
}

@media (max-width: 700px) {
    .workout-polar-graph.is-interactive {
        cursor: default;
        pointer-events: none;
    }

    .workout-polar-detail-modal {
        display: none;
    }

    .backup-modes {
        grid-template-columns: 1fr;
    }

    .backup-table-actions {
        min-width: 160px;
    }
}

.workout-editor-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--line);
}

.workout-editor-tab {
    padding: 13px 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
}

.workout-editor-tab.is-active {
    border-bottom-color: var(--teal);
    color: var(--teal);
}

.workout-editor-swimmers {
    display: grid;
    gap: 2px;
    padding: 16px;
}

.workout-editor-attendance-status {
    min-height: 18px;
    margin: 12px 16px 0;
    color: var(--muted);
    font: 12px/1.4 Arial, sans-serif;
}

.workout-editor-extra-group {
    display: grid;
    gap: 8px;
    padding: 14px 16px 0;
    border-bottom: 1px solid var(--line);
}

.workout-editor-extra-group label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.workout-extra-group-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 5px 10px;
    padding: 2px 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.workout-extra-group-options label {
    padding: 6px 8px;
    color: var(--ink);
    font: 13px Arial, sans-serif;
}

.workout-editor-extra-group select {
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
}

.auth-user-avatar,
.auth-menu-avatar,
.admin-swimmer-avatar-button-image,
.editera-avatar-chip-image,
.training-dashboard-avatar:is(img) {
    display: block;
    box-sizing: border-box;
    border: 0;
    background: transparent;
}

.workout-editor-extra-swimmers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 12px;
}

.workout-editor-extra-swimmer {
    padding: 6px 9px;
    border: 1px solid var(--teal);
    border-radius: 999px;
    background: transparent;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
}

.workout-editor-swimmer {
    display: grid;
    grid-template-columns: 18px 10px minmax(0, 1fr) 36px 2px 44px;
    align-items: center;
    column-gap: 0;
    row-gap: 3px;
    min-width: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
}

.workout-editor-attendance {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
    cursor: pointer;
}

.workout-editor-swimmer-name {
    grid-column: 3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workout-editor-swimmer-metrics {
    grid-column: 3 / -1;
    grid-row: 2;
    min-width: 0;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workout-editor-swimmer-toggle {
    grid-column: 6;
    grid-row: 1;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
}

.workout-editor-swimmer-pulse {
    grid-column: 4;
    grid-row: 1;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #aa242b;
    font-size: 18px;
}

.workout-editor-swimmer-pulse:disabled {
    color: var(--line);
    cursor: default;
}

.workout-editor-swimmer-pulse:not(:disabled):hover,
.workout-editor-swimmer-pulse:not(:disabled):focus-visible {
    background: #ffe0e0;
}

.workout-swimmer-pulse-picker {
    width: min(430px, calc(100vw - 32px));
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
}

.workout-swimmer-pulse-picker::backdrop {
    background: rgba(23, 50, 58, .45);
}

.workout-swimmer-pulse-picker h3 {
    margin: 0 0 14px;
}

.workout-swimmer-pulse-picker select {
    width: 100%;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.workout-swimmer-pulse-picker-status {
    min-height: 18px;
    margin: 10px 0;
    color: var(--muted);
    font-size: 13px;
}

.workout-editor-swimmer-toggle:hover {
    background: transparent;
    color: var(--teal);
}

.workout-editor-swimmer-details {
    display: block;
    min-width: 0;
    padding: 14px 0 16px;
    border-bottom: 1px solid var(--line);
}

.workout-editor-swimmer-details[hidden] {
    display: none;
}

.workout-editor-swimmer-details .workout-analysis-category-grid {
    grid-template-columns: minmax(0, 1fr);
}

.workout-editor-swimmer-detail h5 {
    margin: 0 0 5px;
    color: var(--muted);
    font: 700 12px Arial, sans-serif;
}

.workout-editor-swimmer-detail p {
    margin: 0;
    color: var(--ink);
    font: 14px/1.4 Arial, sans-serif;
}

.workout-strength-swimmer-detail {
    display: grid;
    gap: 7px;
}

.workout-strength-swimmer-detail label {
    color: var(--muted);
    font: 700 12px Arial, sans-serif;
}

.workout-strength-swimmer-detail input,
.workout-strength-swimmer-detail textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font: 14px Arial, sans-serif;
}

.workout-strength-swimmer-detail textarea {
    min-height: 72px;
    resize: vertical;
}

.workout-editor-absence-reasons h5 {
    margin: 0 0 9px;
    color: var(--muted);
    font: 700 12px Arial, sans-serif;
}

.workout-editor-absence-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.workout-editor-absence-choices label {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
}

.workout-editor-absence-choices input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
}

.workout-analysis-absence {
    grid-column: 1 / -1;
    padding: 14px;
    border-left: 4px solid var(--teal);
    background: var(--surface-muted);
}

.workout-analysis-absence h5 {
    margin: 0 0 5px;
    color: var(--teal-dark);
    font-size: 14px;
}

.workout-analysis-absence p {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
}

@media (max-width: 760px) {

    .workout-workspace,
    .workout-setup-grid,
    .workout-editor {
        grid-template-columns: 1fr;
    }

    .workout-editor-side {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

@media (max-width: 600px) {
    .planning-modern-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .planning-modern-new {
        width: 100%;
    }

    .planning-editor-grid {
        grid-template-columns: 1fr;
    }

    .planning-editor-field.is-wide {
        grid-column: auto;
    }

    .weekly-plan-creation {
        margin-top: 10px;
        padding: 16px;
    }

    .weekly-plan-creation-form,
    .weekly-plan-creation-methods {
        grid-template-columns: 1fr;
    }

    .weekly-plan-creation-actions .training-dashboard-primary {
        width: 100%;
    }

    .weekly-plan-editor-context {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .weekly-plan-editor-day {
        padding: 8px;
    }

    .weekly-plan-order-drawer {
        width: 100%;
        border-left-width: 0;
    }

    .weekly-plan-order-drawer>header {
        padding: 16px 14px 10px;
    }

    .weekly-plan-order-help {
        padding: 10px 14px;
    }

    .weekly-plan-layout-rows {
        padding: 12px 14px 20px;
    }

    .weekly-plan-layout-row {
        grid-template-columns: 26px minmax(0, 1fr);
        gap: 8px;
        padding: 11px;
    }

    .weekly-plan-layout-move {
        grid-column: 2;
        grid-row: 2;
    }

    .weekly-plan-layout-move button {
        width: 44px;
        min-height: 42px;
    }

    .weekly-plan-modal .calendar-editor-heading {
        grid-template-columns: 34px minmax(0, 1fr) auto;
    }

    .weekly-plan-save-status {
        grid-column: 2 / -1;
    }
}

@media (max-width: 760px) {
    .calendar-header {
        flex-wrap: wrap;
    }

    .calendar-weather {
        flex-basis: 100%;
        justify-content: flex-start;
        margin-left: 48px;
        text-align: left;
    }

    .calendar-forecast-popover {
        right: auto;
        left: 0;
        width: min(760px, calc(100vw - 28px));
    }

    .calendar-forecast-days {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-forecast-hours {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .calendar-component {
        padding: 12px 8px;
    }

    .calendar-component .fc .fc-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .calendar-component .fc .fc-toolbar-title {
        font-size: 18px;
    }

    .calendar-component .fc .fc-daygrid-day-frame {
        min-height: 78px;
        padding: 2px;
    }

    .calendar-event {
        padding: 3px;
        font-size: 10px;
    }

    .calendar-event-actions {
        display: none;
    }
}

@media (max-width: 600px) {
    .calendar-header {
        padding: 8px 12px 0;
    }

    .calendar-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 10px 12px 0;
    }

    .calendar-filter {
        min-width: 0;
        min-height: 38px;
        gap: 5px;
        padding: 4px 6px;
        border-left-width: 3px;
        font-size: 12px;
    }

    .calendar-filter-holiday {
        grid-column: span 2;
    }

    .calendar-filter input[type="color"] {
        width: 26px;
        height: 24px;
        margin-left: auto;
    }

    .calendar-group-filter {
        display: grid;
        grid-column: span 2;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px 8px;
        min-width: 0;
        padding: 4px 7px 7px;
        font-size: 12px;
    }

    .calendar-group-filter legend {
        grid-column: 1 / -1;
    }

    .calendar-group-filter label {
        min-width: 0;
        gap: 4px;
    }

    .calendar-group-filter input {
        flex: 0 0 16px !important;
        width: 16px !important;
        height: 16px !important;
    }

    .calendar-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 10px;
        padding: 10px 12px 0;
    }

    .calendar-option {
        min-height: 32px;
        gap: 5px;
        font-size: 12px;
    }

    .calendar-component {
        padding: 14px 12px;
    }

    .calendar-component .fc .fc-header-toolbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
    }

    .calendar-component .fc .fc-header-toolbar .fc-toolbar-chunk:first-child {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .calendar-component .fc .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
        min-width: 0;
    }

    .calendar-component .fc .fc-header-toolbar .fc-toolbar-chunk:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    .calendar-component .fc .fc-toolbar-title {
        font-size: 17px;
        line-height: 1.15;
    }

    .calendar-component .fc .fc-button {
        min-height: 32px;
        padding: 5px 9px;
        font-size: 12px;
    }
}

.planning-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.planning-groups label {
    display: flex;
    gap: 7px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
    font: 13px Arial, sans-serif;
}

.analysis-mode-panel[hidden] {
    display: none;
}

.analysis-mode-title {
    flex: 1 1 100%;
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: normal;
}

.graph-panel h2 {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: 22px;
}

.graph-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.graph-panel-heading[hidden] {
    display: none;
}

.graph-field label,
.graph-status,
.graph-chart-status,
.graph-legend {
    color: var(--muted);
    font-family: Arial, sans-serif;
}

.graph-field select,
.graph-field input {
    border-color: #b9c9ca;
    border-radius: 4px;
    background: #ffffff;
    color: var(--ink);
}

.graph-field-checkbox label {
    color: var(--ink);
}

.graph-chart-title {
    color: var(--teal);
}

.graph-canvas-wrap {
    background: #f7faf9;
    border-color: #dce7e5;
    border-radius: 4px;
}

.graph-tooltip {
    border-color: var(--teal);
    border-radius: 4px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(23, 50, 58, 0.18);
}

.answer-header {
    margin-top: 0;
}

.answer-header h2 {
    color: var(--ink);
    font-size: 22px;
}

.answer-action {
    background: #50686d;
    border-radius: 4px;
}

.answer-action:hover {
    background: #3e565a;
}

#result {
    min-height: 130px;
    margin-bottom: 0;
    background: #f7faf9;
    color: var(--ink);
    border: 1px solid #dce7e5;
    border-radius: 4px;
}

.timed-answer {
    display: grid;
    gap: 10px;
}

.timed-answer h3,
.timed-answer p {
    margin: 0;
    color: var(--nav);
    font-size: 15px;
}

.timed-answer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.timed-answer-table th,
.timed-answer-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.timed-answer-table th {
    background: var(--surface-muted);
    color: var(--nav);
    font-size: 12px;
}

.timed-answer-split {
    padding: 2px 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
    background: transparent;
    color: var(--teal);
    font: inherit;
    font-weight: 700;
}

.local-splits-tooltip {
    position: fixed;
    z-index: 1200;
    width: min(850px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    box-shadow: 0 6px 18px rgba(23, 50, 58, .18);
    color: var(--ink);
    overflow: hidden;
    font-size: 12px;
    pointer-events: none;
}

.local-splits-tooltip strong {
    display: block;
    margin-bottom: 6px;
    color: var(--nav);
}

.local-splits-tooltip .pb-split-test-table {
    width: 100%;
    margin: 0;
    font-size: 11px;
}

.local-splits-tooltip .pb-split-test-table th,
.local-splits-tooltip .pb-split-test-table td {
    padding: 3px 5px;
    white-space: nowrap;
}

@media (max-width: 760px) {

    .timed-answer-table,
    .timed-answer-table tbody,
    .timed-answer-table tr,
    .timed-answer-table th,
    .timed-answer-table td {
        display: block;
    }

    .timed-answer-table thead {
        display: none;
    }

    .timed-answer-table tr {
        padding: 8px 0;
        border-bottom: 1px solid var(--line);
    }

    .timed-answer-table td {
        padding: 3px 0;
        border: 0;
    }

    .timed-answer-table td::before {
        display: inline-block;
        width: 92px;
        color: var(--muted);
        content: attr(data-label);
        font-size: 12px;
    }
}

#history {
    margin-top: 10px;
}

.history-item {
    background: var(--surface-muted);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 4px;
}

.history-item:hover {
    background: #e5efed;
}

.footer {
    margin: 0;
    padding: 15px 28px;
    background: var(--surface);
}

.mobile-nav-toggle {
    display: none;
}

@media (max-width: 760px) {
    .header {
        min-height: 64px;
        padding: 8px 14px;
    }

    .header .logo {
        height: 40px;
    }

    .header .jss-logo {
        display: none;
    }

    .title-block {
        text-align: left;
    }

    h1 {
        font-size: 20px;
    }

    .mobile-nav-toggle {
        display: block;
        flex: 0 0 42px;
        height: 38px;
        padding: 0;
        font-size: 20px;
    }

    .app-shell {
        display: block;
    }

    .app-nav {
        display: none;
        padding: 14px;
    }

    .app-nav.is-open {
        display: block;
    }

    .workspace {
        padding: 20px 14px;
    }

    .workspace-heading {
        display: block;
        margin-bottom: 16px;
    }

    .workspace-heading h2 {
        font-size: 25px;
    }

    .workspace-description {
        margin-top: 8px;
    }

    .query-builder,
    .answer-panel {
        padding: 15px;
    }

    .answer-header {
        align-items: flex-start;
    }

    .answer-actions {
        max-width: none;
    }
}

@media (max-width: 560px) {
    #planning-fields {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #planning-fields>.planning-form {
        position: static;
    }

    body {
        padding: 14px;
    }

    .header {
        gap: 10px;
    }

    .logo {
        height: 58px;
    }

    .jss-logo {
        height: 44px;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 12px;
    }

    .container input {
        flex-basis: 100%;
    }

    .question-actions {
        width: 100%;
    }

    .answer-header {
        align-items: flex-start;
    }

    .answer-actions {
        max-width: 70%;
    }

    .answer-action,
    .manual-link,
    button {
        padding: 10px 12px;
    }

    .modal-backdrop {
        padding: 14px;
    }

    .modal {
        width: min(420px, calc(100vw - 28px));
        max-height: calc(100vh - 28px);
        padding: 18px;
    }

    .weekly-plan-editor-backdrop {
        padding: 14px;
    }

    .weekly-plan-modal {
        width: calc(100vw - 28px);
        max-height: calc(100vh - 28px);
    }
}

@media print {

    html,
    body {
        background: white;
    }

    /* Keep the shared app header (logos, name, version, club) visible on every
               printed/PDF view; a body.printing-* class marks which single element is
               allowed to show alongside it, regardless of any other element's own state. */
    body>*:not(.header):not(.footer) {
        display: none !important;
    }

    body.printing-answer #answer-print {
        display: block !important;
        margin-top: 18px;
    }

    body.printing-answer .auth-actions,
    body.printing-answer .mobile-nav-toggle,
    body.printing-answer #auth-gate,
    body.printing-answer .app-shell {
        display: none !important;
    }

    #answer-print pre {
        background: none;
        border: none;
        padding: 0;
        color: #111;
        font: 14px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
        white-space: pre-wrap;
    }

    #answer-print .print-document-avatar,
    #answer-print .print-document-avatar-fallback {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        margin: 0 0 10px;
        border: 1px solid #cfd7d8;
        border-radius: 50%;
        color: #123f72;
        font: 700 16px Arial, sans-serif;
        object-fit: cover;
    }

    #answer-print .print-table-avatar,
    #answer-print .print-table-avatar-fallback {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: 1px solid #cfd7d8;
        border-radius: 50%;
        color: #123f72;
        font: 700 10px Arial, sans-serif;
        object-fit: cover;
    }

    #answer-print .print-document-avatar-fallback,
    #answer-print .print-table-avatar-fallback {
        background: #e7eff0;
    }

    #answer-print .print-document-avatar,
    #answer-print .print-table-avatar {
        background: transparent;
        overflow: hidden;
    }

    #answer-print h2 {
        margin: 0 0 14px;
        color: #123f72;
        font: 700 18px Arial, sans-serif;
    }

    #answer-print .print-table-subtitle {
        margin: -7px 0 14px;
        color: #425f63;
        font: 13px/1.4 Arial, sans-serif;
    }

    #answer-print .print-group-heading {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 20px 0 8px;
        color: #123f72;
        font: 700 15px Arial, sans-serif;
    }

    #answer-print table {
        width: 100%;
        border-collapse: collapse;
        color: #111;
        font: 12px/1.35 Arial, sans-serif;
    }

    #answer-print th,
    #answer-print td {
        padding: 7px 8px;
        border-bottom: 1px solid #cfd7d8;
        text-align: left;
        vertical-align: top;
    }

    #answer-print th {
        border-bottom: 2px solid #55777c;
        color: #123f72;
        font-weight: 700;
    }

    #answer-print thead {
        display: table-header-group;
    }

    #answer-print .timed-answer-table {
        display: table;
    }

    #answer-print .timed-answer-table thead {
        display: table-header-group;
    }

    #answer-print .timed-answer-table tbody {
        display: table-row-group;
    }

    #answer-print .timed-answer-table tr {
        display: table-row;
        padding: 0;
        border: 0;
    }

    #answer-print .timed-answer-table th,
    #answer-print .timed-answer-table td {
        display: table-cell;
        padding: 7px 8px;
        border-bottom: 1px solid #cfd7d8;
    }

    #answer-print .timed-answer-table td::before {
        display: none;
        content: none;
    }

    #answer-print tr {
        break-inside: avoid;
    }

    .footer {
        display: block !important;
        color: #555;
        margin-top: 18px;
    }

    .header {
        border-bottom-color: #ccc;
        color: #111;
    }

    .header h1 {
        color: #123f72;
    }

    .header .subtitle {
        color: #555;
    }

    body.printing-graph #graph-panel {
        display: block !important;
        background: none;
        padding: 0;
        margin-top: 18px;
    }

    body.printing-graph .app-shell {
        display: block !important;
        min-height: 0;
    }

    body.printing-graph .app-nav,
    body.printing-graph .workspace-heading,
    body.printing-graph #overview-panel,
    body.printing-graph #query-builder,
    body.printing-graph #answer-panel {
        display: none !important;
    }

    #graph-panel {
        width: auto;
        max-height: none;
        overflow: visible;
        background: white;
        color: #111;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    #graph-panel .graph-controls,
    #graph-panel .modal-actions {
        display: none !important;
    }

    #graph-panel h2,
    #graph-panel .graph-chart-title {
        color: #123f72;
    }

    #graph-status,
    .graph-chart-status,
    .graph-legend {
        color: #333;
    }

    .graph-charts {
        gap: 10px;
    }

    .graph-chart-block .graph-chart-title {
        margin: 0 0 2px;
        font-size: 13px;
    }

    .graph-chart-block .graph-chart-status {
        margin-bottom: 4px;
        font-size: 11px;
    }

    .graph-canvas-wrap {
        background: white;
        border: 1px solid #ccc;
    }

    .graph-canvas-wrap svg {
        height: 230px;
    }

    .graph-legend {
        margin-top: 4px;
        font-size: 11px;
    }

    .graph-tooltip {
        display: none !important;
    }

    .graph-charts svg text {
        fill: #333;
    }

    .graph-charts svg line {
        stroke: #999;
    }

    .graph-chart-block {
        break-inside: avoid;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --app-bg: #0f1415;
        --surface: #182022;
        --surface-muted: #202b2d;
        --ink: #edf5f3;
        --muted: #a9bab8;
        --line: #3a4b4d;
        --nav: #081012;
        --nav-hover: #1b3438;
    }

    html {
        color-scheme: dark;
    }

    body {
        background: var(--app-bg);
        color: var(--ink);
    }

    .header,
    .query-builder,
    .answer-panel,
    .planning-form,
    .planning-list,
    .graph-panel,
    .modal,
    .overview-item,
    .workspace-help-button {
        background: var(--surface);
        color: var(--ink);
        border-color: var(--line);
    }

    .builder-field select,
    .builder-field input,
    .builder-field textarea,
    .graph-field select,
    .graph-field input,
    .modal-input,
    .auth-gate-input,
    .planning-range-value {
        background: #11191b;
        color: var(--ink);
        border-color: var(--line);
    }

    input:not([type="range"]),
    select,
    textarea,
    .auth-gate-input,
    .modal-input,
    .planning-range-value {
        background-color: #11191b !important;
        color: #edf5f3 !important;
        border-color: #3a4b4d !important;
        -webkit-text-fill-color: #edf5f3 !important;
    }

    select option {
        background-color: #11191b;
        color: #edf5f3;
    }

    body .builder-field select,
    body .builder-field input:not([type="range"]),
    body .builder-field textarea,
    body .planning-form select,
    body .planning-form input:not([type="range"]),
    body .planning-form textarea,
    body .planning-list select,
    body .planning-list input:not([type="range"]),
    body .planning-list textarea,
    body .auth-gate-input,
    body .modal-input {
        background: #11191b !important;
        color: #edf5f3 !important;
        border-color: #3a4b4d !important;
        -webkit-text-fill-color: #edf5f3 !important;
    }

    #admin-modal .modal-command {
        background: #11191b !important;
        color: #edf5f3 !important;
        border-color: #3a4b4d !important;
    }

    .auth-gate-panel {
        background: #687275;
        border-color: var(--accent);
    }

    .auth-gate-panel h1,
    .auth-gate-label {
        color: var(--ink);
    }

    .auth-gate-panel p {
        color: var(--muted);
    }

    .planning-card,
    .planning-calendar-day,
    .planning-calendar-weekday,
    .planning-calendar-week {
        background: var(--surface-muted);
        color: var(--ink);
    }

    .planning-calendar-event {
        background: #21413f;
        color: #e7f5f2;
    }

    #result,
    .graph-canvas-wrap {
        background: #11191b;
        color: var(--ink);
        border-color: var(--line);
    }

    .status-tag {
        background: #4d321b;
        border-color: #c77b2a;
        color: #ffd09a;
    }

    .workout-setup-header,
    .workout-setup,
    .workout-editor,
    .workout-editor-side,
    .workout-editor-extra-group {
        background: var(--surface);
        color: var(--ink);
        border-color: var(--line);
    }

    .workout-setup-header h3,
    .workout-editor-header h3,
    .workout-setup-field>label,
    .workout-setup-field>span,
    .workout-editor-extra-group label {
        color: var(--ink);
    }

    .workout-setup-field input,
    .workout-setup-field select,
    .workout-editor-extra-group select,
    .workout-subgroups,
    .workout-editor-textarea {
        background: #11191b;
        color: var(--ink);
        border-color: var(--line);
        -webkit-text-fill-color: var(--ink);
    }

    .workout-subgroup {
        background: #21413f;
        color: #edf5f3;
    }

    .workout-subgroup.is-selected,
    .workout-add-all {
        background: var(--teal);
        color: #ffffff;
    }

    .workout-remove-all {
        border-color: #d47777;
        color: #ffb2b2;
    }

    .workout-remove-all:disabled {
        border-color: var(--line);
        color: var(--muted);
    }

    .workout-editor-extra-swimmer {
        background: #21413f;
        color: #edf5f3;
        border-color: #3aa69e;
    }

    .workout-analysis-panel,
    .workout-analysis-card,
    .workout-analysis-scope button {
        background: #202b2d;
        color: #edf5f3;
        border-color: #3a4b4d;
    }

    .workout-analysis-title,
    .workout-analysis-card p {
        color: #edf5f3;
    }

    .workout-analysis-card h5 {
        color: #75d6cc;
    }

    .workout-analysis-scope button.is-active {
        background: #087e78;
        border-color: #3aa69e;
        color: #ffffff;
    }
}

html[data-system-theme="dark"] body .builder-field select,
html[data-system-theme="dark"] body .builder-field input:not([type="range"]),
html[data-system-theme="dark"] body .builder-field textarea,
html[data-system-theme="dark"] body .planning-form select,
html[data-system-theme="dark"] body .planning-form input:not([type="range"]),
html[data-system-theme="dark"] body .planning-form textarea,
html[data-system-theme="dark"] body .planning-list select,
html[data-system-theme="dark"] body .planning-list input:not([type="range"]),
html[data-system-theme="dark"] body .planning-list textarea,
html[data-system-theme="dark"] body .auth-gate-input,
html[data-system-theme="dark"] body .modal-input {
    background: #11191b !important;
    background-color: #11191b !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
    -webkit-text-fill-color: #edf5f3 !important;
    color-scheme: dark !important;
}

html[data-system-theme="dark"] body #admin-modal .modal-command {
    background: #11191b !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .header,
html[data-system-theme="dark"] body .query-builder,
html[data-system-theme="dark"] body .answer-panel,
html[data-system-theme="dark"] body .planning-form,
html[data-system-theme="dark"] body .planning-list,
html[data-system-theme="dark"] body .graph-panel,
html[data-system-theme="dark"] body .overview-item,
html[data-system-theme="dark"] body .workspace-help-button,
html[data-system-theme="dark"] body .auth-gate-panel,
html[data-system-theme="dark"] body .modal {
    background: #182022 !important;
    background-color: #182022 !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body,
html[data-system-theme="dark"] body .app-shell,
html[data-system-theme="dark"] body .workspace,
html[data-system-theme="dark"] body .overview-panel,
html[data-system-theme="dark"] body .planning-panel,
html[data-system-theme="dark"] body .workspace-help,
html[data-system-theme="dark"] body .builder-header,
html[data-system-theme="dark"] body .builder-fields,
html[data-system-theme="dark"] body .analysis-mode-panel {
    background: #0f1415 !important;
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body .header,
html[data-system-theme="dark"] body .app-nav,
html[data-system-theme="dark"] body .query-builder,
html[data-system-theme="dark"] body .answer-panel,
html[data-system-theme="dark"] body .graph-panel,
html[data-system-theme="dark"] body .overview-intro,
html[data-system-theme="dark"] body .overview-item,
html[data-system-theme="dark"] body .planning-form,
html[data-system-theme="dark"] body .planning-list,
html[data-system-theme="dark"] body .planning-modern,
html[data-system-theme="dark"] body .planning-modern-list,
html[data-system-theme="dark"] body .training-dashboard-card,
html[data-system-theme="dark"] body .training-dashboard-empty,
html[data-system-theme="dark"] body .workspace-help,
html[data-system-theme="dark"] body .modal,
html[data-system-theme="dark"] body .auth-gate-panel {
    background: #182022 !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body h1,
html[data-system-theme="dark"] body h2,
html[data-system-theme="dark"] body h3,
html[data-system-theme="dark"] body h4,
html[data-system-theme="dark"] body h5,
html[data-system-theme="dark"] body p,
html[data-system-theme="dark"] body label,
html[data-system-theme="dark"] body .nav-heading,
html[data-system-theme="dark"] body .nav-group-title,
html[data-system-theme="dark"] body .workspace-description,
html[data-system-theme="dark"] body .workspace-kicker,
html[data-system-theme="dark"] body .builder-field label,
html[data-system-theme="dark"] body .planning-editor-field label,
html[data-system-theme="dark"] body .planning-form h4,
html[data-system-theme="dark"] body .planning-list h4,
html[data-system-theme="dark"] body .training-dashboard-title-line,
html[data-system-theme="dark"] body .training-dashboard-summary,
html[data-system-theme="dark"] body .training-dashboard-date {
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body .subtitle,
html[data-system-theme="dark"] body .muted,
html[data-system-theme="dark"] body .workspace-description,
html[data-system-theme="dark"] body .training-dashboard-meta,
html[data-system-theme="dark"] body .training-dashboard-empty,
html[data-system-theme="dark"] body .answer-status,
html[data-system-theme="dark"] body .answer-source,
html[data-system-theme="dark"] body .graph-status,
html[data-system-theme="dark"] body .graph-chart-status,
html[data-system-theme="dark"] body .graph-legend {
    color: #a9bab8 !important;
}

html[data-system-theme="dark"] body .answer-status[data-success="true"],
html[data-system-theme="dark"] body .graph-status[data-success="true"],
html[data-system-theme="dark"] body .graph-chart-status[data-success="true"] {
    color: #a7f3d0 !important;
}

html[data-system-theme="dark"] body .answer-status[data-error="true"],
html[data-system-theme="dark"] body .graph-status[data-error="true"],
html[data-system-theme="dark"] body .graph-chart-status[data-error="true"] {
    color: #fecaca !important;
}

html[data-system-theme="dark"] body .nav-item,
html[data-system-theme="dark"] body .nav-group-title,
html[data-system-theme="dark"] body .manual-link,
html[data-system-theme="dark"] body a,
html[data-system-theme="dark"] body .training-dashboard-tab,
html[data-system-theme="dark"] body .training-dashboard-secondary,
html[data-system-theme="dark"] body .training-dashboard-chip {
    color: #dceae7 !important;
    background: transparent;
}

html[data-system-theme="dark"] body .nav-item:hover,
html[data-system-theme="dark"] body .nav-item.is-active,
html[data-system-theme="dark"] body .nav-group-title:hover,
html[data-system-theme="dark"] body .manual-link:hover {
    background: #1b3438 !important;
    color: #ffffff !important;
}

html[data-system-theme="dark"] body input,
html[data-system-theme="dark"] body select,
html[data-system-theme="dark"] body textarea,
html[data-system-theme="dark"] body .builder-field input,
html[data-system-theme="dark"] body .builder-field select,
html[data-system-theme="dark"] body .builder-field textarea,
html[data-system-theme="dark"] body .planning-editor-group-select,
html[data-system-theme="dark"] body .planning-textarea,
html[data-system-theme="dark"] body .graph-field input,
html[data-system-theme="dark"] body .graph-field select {
    background: #11191b !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
    -webkit-text-fill-color: #edf5f3 !important;
    color-scheme: dark !important;
}

html[data-system-theme="dark"] body select option {
    background: #11191b !important;
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body button,
html[data-system-theme="dark"] body .workspace-help-button,
html[data-system-theme="dark"] body .answer-action,
html[data-system-theme="dark"] body .modal-actions button {
    background: #21413f;
    color: #edf5f3;
    border-color: #3a6f6a;
}

html[data-system-theme="dark"] body .modal-cancel {
    background: #1f2937;
    color: #f8fafc;
    border-color: #64748b;
}

html[data-system-theme="dark"] body button:hover,
html[data-system-theme="dark"] body .workspace-help-button:hover,
html[data-system-theme="dark"] body .answer-action:hover,
html[data-system-theme="dark"] body .modal-actions button:hover {
    background: #2c5b56;
    color: #ffffff;
}

html[data-system-theme="dark"] body .modal-cancel:hover {
    background: #374151;
    color: #ffffff;
}

html[data-system-theme="dark"] body .training-dashboard-primary,
html[data-system-theme="dark"] body .planning-modern-new,
html[data-system-theme="dark"] body .planning-save-button,
html[data-system-theme="dark"] body .auth-gate-submit {
    background: #087e78 !important;
    color: #ffffff !important;
    border-color: #3aa69e !important;
}

html[data-system-theme="dark"] body .training-dashboard-header h3,
html[data-system-theme="dark"] body .training-dashboard-tabs,
html[data-system-theme="dark"] body .training-dashboard-tabs button,
html[data-system-theme="dark"] body .training-dashboard-tab,
html[data-system-theme="dark"] body .training-dashboard-tab.is-active {
    display: flex;
    color: #edf5f3 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

html[data-system-theme="dark"] body .training-dashboard-header h3 {
    display: block;
}

html[data-system-theme="dark"] body .training-dashboard-tabs {
    border-bottom-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .training-dashboard-tab.is-active {
    border-bottom-color: #3aa69e !important;
}

html[data-system-theme="dark"] body .planning-card,
html[data-system-theme="dark"] body .planning-modern-card,
html[data-system-theme="dark"] body .history-item,
html[data-system-theme="dark"] body .planning-calendar-day,
html[data-system-theme="dark"] body .planning-calendar-week,
html[data-system-theme="dark"] body .planning-calendar-weekday,
html[data-system-theme="dark"] body .planning-editor-field output {
    background: #202b2d !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .planning-calendar-event,
html[data-system-theme="dark"] body .calendar-event {
    background: #21413f !important;
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body #result,
html[data-system-theme="dark"] body pre,
html[data-system-theme="dark"] body code,
html[data-system-theme="dark"] body .graph-canvas-wrap {
    background: #11191b !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .graph-charts svg text {
    fill: #edf5f3 !important;
}

html[data-system-theme="dark"] body .graph-charts svg line {
    stroke: #607577 !important;
}

html[data-system-theme="dark"] {
    --app-bg: #0f1415;
    --surface: #182022;
    --surface-muted: #202b2d;
    --ink: #edf5f3;
    --muted: #a9bab8;
    --line: #3a4b4d;
    --nav: #081012;
    --nav-hover: #1b3438;
    color-scheme: dark;
}

/* System-wide dark-theme contrast layer. */
html[data-system-theme="dark"] body * {
    text-shadow: none;
}

html[data-system-theme="dark"] body h1,
html[data-system-theme="dark"] body h2,
html[data-system-theme="dark"] body h3,
html[data-system-theme="dark"] body h4,
html[data-system-theme="dark"] body h5,
html[data-system-theme="dark"] body h6,
html[data-system-theme="dark"] body p,
html[data-system-theme="dark"] body li,
html[data-system-theme="dark"] body dt,
html[data-system-theme="dark"] body dd,
html[data-system-theme="dark"] body label,
html[data-system-theme="dark"] body strong,
html[data-system-theme="dark"] body small,
html[data-system-theme="dark"] body .nav-heading,
html[data-system-theme="dark"] body .nav-item,
html[data-system-theme="dark"] body .nav-group-title,
html[data-system-theme="dark"] body .workspace-kicker,
html[data-system-theme="dark"] body .workspace-description,
html[data-system-theme="dark"] body .subtitle,
html[data-system-theme="dark"] body .footer,
html[data-system-theme="dark"] body .footer a {
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body .subtitle,
html[data-system-theme="dark"] body .workspace-description,
html[data-system-theme="dark"] body .workspace-kicker,
html[data-system-theme="dark"] body .muted,
html[data-system-theme="dark"] body .answer-status,
html[data-system-theme="dark"] body .answer-source,
html[data-system-theme="dark"] body .nav-status,
html[data-system-theme="dark"] body .graph-status,
html[data-system-theme="dark"] body .graph-chart-status,
html[data-system-theme="dark"] body .graph-legend,
html[data-system-theme="dark"] body .training-dashboard-meta {
    color: #a9bab8 !important;
}

html[data-system-theme="dark"] body a:not(.button):not(.workspace-help-button),
html[data-system-theme="dark"] body .toc a,
html[data-system-theme="dark"] body .manual-link {
    color: #75d6cc !important;
}

html[data-system-theme="dark"] body input,
html[data-system-theme="dark"] body select,
html[data-system-theme="dark"] body textarea,
html[data-system-theme="dark"] body output,
html[data-system-theme="dark"] body pre,
html[data-system-theme="dark"] body code {
    background-color: #11191b !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
    -webkit-text-fill-color: #edf5f3 !important;
    color-scheme: dark !important;
}

html[data-system-theme="dark"] body button,
html[data-system-theme="dark"] body .button,
html[data-system-theme="dark"] body .workspace-help-button,
html[data-system-theme="dark"] body .answer-action,
html[data-system-theme="dark"] body .modal-actions button,
html[data-system-theme="dark"] body .builder-actions button {
    color: #edf5f3 !important;
    border-color: #3a6f6a !important;
}

html[data-system-theme="dark"] body .header,
html[data-system-theme="dark"] body .app-nav,
html[data-system-theme="dark"] body .workspace,
html[data-system-theme="dark"] body .query-builder,
html[data-system-theme="dark"] body .answer-panel,
html[data-system-theme="dark"] body .graph-panel,
html[data-system-theme="dark"] body .planning-panel,
html[data-system-theme="dark"] body .planning-modern,
html[data-system-theme="dark"] body .planning-form,
html[data-system-theme="dark"] body .planning-list,
html[data-system-theme="dark"] body .overview-intro,
html[data-system-theme="dark"] body .overview-item,
html[data-system-theme="dark"] body .modal,
html[data-system-theme="dark"] body .auth-gate-panel,
html[data-system-theme="dark"] body .planning-card,
html[data-system-theme="dark"] body .planning-modern-card,
html[data-system-theme="dark"] body .training-dashboard-card,
html[data-system-theme="dark"] body .history-item,
html[data-system-theme="dark"] body .panel-note,
html[data-system-theme="dark"] body .mini-panel,
html[data-system-theme="dark"] body .mini-choice {
    background-color: #182022 !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .planning-calendar-day,
html[data-system-theme="dark"] body .planning-calendar-week,
html[data-system-theme="dark"] body .planning-calendar-weekday,
html[data-system-theme="dark"] body .planning-editor-field output,
html[data-system-theme="dark"] body .admin-group-checklist label,
html[data-system-theme="dark"] body .planning-groups label {
    background-color: #202b2d !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .planning-calendar-event,
html[data-system-theme="dark"] body .calendar-event,
html[data-system-theme="dark"] body .status-tag {
    background-color: #21413f !important;
    color: #edf5f3 !important;
    border-color: #3aa69e !important;
}

html[data-system-theme="dark"] body .status-tag-alpha {
    background: #352a52 !important;
    color: #e6d9ff !important;
    border-color: #9b7bd1 !important;
}

html[data-system-theme="dark"] body .status-tag-pre-alpha {
    background: #183b4b !important;
    color: #c8efff !important;
    border-color: #56a8c7 !important;
}

html[data-system-theme="dark"] body .status-tag-beta {
    background: #4a321a !important;
    color: #ffe0ad !important;
    border-color: #d69a4b !important;
}

html[data-system-theme="dark"] body .status-tag-gm {
    background: #17483f !important;
    color: #c6fff0 !important;
    border-color: #48c8ad !important;
}

html[data-system-theme="dark"] body .status-tag-drift {
    background: #193b61 !important;
    color: #cfe5ff !important;
    border-color: #68a7e2 !important;
}

html[data-system-theme="dark"] body .status-tag-not-started {
    background: #30383b !important;
    color: #e1e8e8 !important;
    border-color: #89999b !important;
}

/* Keep status colors distinct from the shared dark-theme badge rule. */
html[data-system-theme="dark"] body #overview-status-list .status-tag.status-tag-alpha,
html[data-system-theme="dark"] body .nav-item .status-tag.status-tag-alpha {
    background: #352a52 !important;
    color: #e6d9ff !important;
    border-color: #9b7bd1 !important;
}

html[data-system-theme="dark"] body #overview-status-list .status-tag.status-tag-pre-alpha,
html[data-system-theme="dark"] body .nav-item .status-tag.status-tag-pre-alpha {
    background: #183b4b !important;
    color: #c8efff !important;
    border-color: #56a8c7 !important;
}

html[data-system-theme="dark"] body #overview-status-list .status-tag.status-tag-beta,
html[data-system-theme="dark"] body .nav-item .status-tag.status-tag-beta {
    background: #4a321a !important;
    color: #ffe0ad !important;
    border-color: #d69a4b !important;
}

html[data-system-theme="dark"] body #overview-status-list .status-tag.status-tag-gm,
html[data-system-theme="dark"] body .nav-item .status-tag.status-tag-gm {
    background: #17483f !important;
    color: #c6fff0 !important;
    border-color: #48c8ad !important;
}

html[data-system-theme="dark"] body #overview-status-list .status-tag.status-tag-drift,
html[data-system-theme="dark"] body .nav-item .status-tag.status-tag-drift {
    background: #193b61 !important;
    color: #cfe5ff !important;
    border-color: #68a7e2 !important;
}

html[data-system-theme="dark"] body #overview-status-list .status-tag.status-tag-not-started,
html[data-system-theme="dark"] body .nav-item .status-tag.status-tag-not-started {
    background: #30383b !important;
    color: #e1e8e8 !important;
    border-color: #89999b !important;
}

body #overview-status-list .status-tag.status-tag-alpha,
body .nav-item .status-tag.status-tag-alpha {
    background: #e5d9ff !important;
    color: #3e276e !important;
    border-color: #8d6bc4 !important;
}

body #overview-status-list .status-tag.status-tag-pre-alpha,
body .nav-item .status-tag.status-tag-pre-alpha {
    background: #c9efff !important;
    color: #164e66 !important;
    border-color: #4e9dbc !important;
}

body #overview-status-list .status-tag.status-tag-beta,
body .nav-item .status-tag.status-tag-beta {
    background: #ffe0ad !important;
    color: #6e3b0c !important;
    border-color: #c77b2a !important;
}

body #overview-status-list .status-tag.status-tag-gm,
body .nav-item .status-tag.status-tag-gm {
    background: #b9f1e4 !important;
    color: #064e48 !important;
    border-color: #168078 !important;
}

body #overview-status-list .status-tag.status-tag-drift,
body .nav-item .status-tag.status-tag-drift {
    background: #c8e1ff !important;
    color: #173f69 !important;
    border-color: #3d7fbd !important;
}

body #overview-status-list .status-tag.status-tag-not-started,
body .nav-item .status-tag.status-tag-not-started {
    background: #dfe6e7 !important;
    color: #354346 !important;
    border-color: #728487 !important;
}

html[data-system-theme="dark"] body .training-dashboard-menu,
html[data-system-theme="dark"] body .training-dashboard-menu-button,
html[data-system-theme="dark"] body .training-dashboard-detail {
    background: #1c292b !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .training-dashboard-menu button:hover,
html[data-system-theme="dark"] body .training-dashboard-menu-button:hover,
html[data-system-theme="dark"] body .training-dashboard-expand:hover {
    background: #21413f !important;
    color: #ffffff !important;
}

html[data-system-theme="dark"] body .workout-editor-swimmer-toggle,
html[data-system-theme="dark"] body .workout-editor-swimmer-toggle:hover {
    width: 18px !important;
    height: 24px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #a9bab8 !important;
}

html[data-system-theme="dark"] body .poolside-set-item.is-completed button {
    border-color: #4f9b68 !important;
    background: #193a29 !important;
    color: #a7f3c0 !important;
}

html[data-system-theme="dark"] body .poolside-set-item.is-skipped button {
    color: #a9bab8 !important;
}

html[data-system-theme="dark"] body .poolside-set-actions button:first-child {
    border-color: #4f9b68 !important;
    background: #193a29 !important;
    color: #a7f3c0 !important;
}

html[data-system-theme="dark"] body .poolside-set-actions button:last-child {
    border-color: #b9824b !important;
    background: #3d2b1d !important;
    color: #f4c58e !important;
}

html[data-system-theme="dark"] body .poolside-finish button:nth-child(2) {
    border-color: #c58a48 !important;
    background: #49321e !important;
    color: #ffd49a !important;
}

html[data-system-theme="dark"] body .event-pm-preview,
html[data-system-theme="dark"] body .graph-tooltip {
    background: #182022 !important;
    color: #edf5f3 !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .weekly-plan-modal {
    background: #1c292b !important;
    border-color: #3a4b4d !important;
}

html[data-system-theme="dark"] body .weekly-plan-layout,
html[data-system-theme="dark"] body .weekly-plan-editor-row.is-freetext,
html[data-system-theme="dark"] body .weekly-plan-layout-row.is-freetext {
    background: #202b2d !important;
}

html[data-system-theme="dark"] body .weekly-plan-editor-row.is-spacer,
html[data-system-theme="dark"] body .weekly-plan-layout-row.is-spacer {
    background: #182022 !important;
}

html[data-system-theme="dark"] body .weekly-plan-coach-picker-menu label:hover {
    background: #21413f !important;
}

html[data-system-theme="dark"] body .weekly-plan-coach-picker-menu label:has(input:checked) {
    background: #1c4b47 !important;
    color: #ffffff !important;
}

html[data-system-theme="dark"] body .season-plan-group-select option {
    background: #11191b !important;
    color: #edf5f3 !important;
}

html[data-system-theme="dark"] body .season-plan-group-select option:checked {
    background: #087e78 !important;
    color: #ffffff !important;
}

/* Keep the dark page on one coherent surface hierarchy. */
html[data-system-theme="dark"] body,
html[data-system-theme="dark"] body .app-shell,
html[data-system-theme="dark"] body .workspace,
html[data-system-theme="dark"] body .overview-panel,
html[data-system-theme="dark"] body .planning-panel {
    background: #141e20 !important;
}

html[data-system-theme="dark"] body .header,
html[data-system-theme="dark"] body .app-nav,
html[data-system-theme="dark"] body .query-builder,
html[data-system-theme="dark"] body .answer-panel,
html[data-system-theme="dark"] body .graph-panel,
html[data-system-theme="dark"] body .overview-intro,
html[data-system-theme="dark"] body .overview-item,
html[data-system-theme="dark"] body .planning-modern,
html[data-system-theme="dark"] body .planning-form,
html[data-system-theme="dark"] body .planning-list,
html[data-system-theme="dark"] body .training-dashboard-card,
html[data-system-theme="dark"] body .modal,
html[data-system-theme="dark"] body .auth-gate-panel {
    background: #1c292b !important;
}

html[data-system-theme="dark"] body .training-dashboard,
html[data-system-theme="dark"] body .training-dashboard-list,
html[data-system-theme="dark"] body .training-dashboard-controls,
html[data-system-theme="dark"] body .training-dashboard-tabs,
html[data-system-theme="dark"] body .training-dashboard-header {
    background: transparent !important;
}

html[data-system-theme="dark"] body .auth-gate-panel {
    background: #596265 !important;
}

html[data-system-theme="dark"] body .training-dashboard-empty,
html[data-system-theme="dark"] body .planning-card,
html[data-system-theme="dark"] body .planning-modern-card,
html[data-system-theme="dark"] body .history-item,
html[data-system-theme="dark"] body .planning-calendar-day,
html[data-system-theme="dark"] body .planning-calendar-week,
html[data-system-theme="dark"] body .planning-calendar-weekday {
    background: #223134 !important;
}

/* Mobile application layout: same workflows, touch-first composition. */
@media (max-width: 760px) {

    .overview-dashboard-grid,
    body.is-swimmer-account .overview-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .overview-statuses,
    .overview-activities,
    .overview-week-pulse {
        padding: 10px;
    }

    .overview-statuses h4,
    .overview-activities h4,
    .overview-week-pulse-heading h4 {
        font-size: 11px;
        letter-spacing: 0.04em;
        overflow-wrap: anywhere;
    }

    .overview-week-pulse-heading {
        display: grid;
        gap: 3px;
    }

    #overview-week-pulse-period {
        font-size: 10px;
        overflow-wrap: anywhere;
    }

    .overview-week-pulse-item,
    .overview-activity-category li {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
        min-height: 0;
        padding: 6px 4px;
    }

    .overview-week-pulse-arrow {
        display: none;
    }

    .overview-week-pulse-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .overview-week-pulse-item {
        min-height: 56px;
    }

    body {
        overflow-x: hidden;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 20;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        grid-template-rows: auto auto;
        column-gap: 10px;
        row-gap: 5px;
        align-items: center;
        min-height: 96px;
        margin: 0;
        padding: 10px 14px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
    }

    .header .logo {
        grid-column: 1;
        grid-row: 1;
        width: 42px;
        height: 42px;
        object-fit: contain;
    }

    .header .jss-logo {
        display: block;
        grid-column: 3;
        grid-row: 1;
        align-self: center;
        justify-self: center;
        height: 28px;
        width: auto;
    }

    .header .title-block .subtitle {
        display: block;
        margin-top: 1px;
        font-size: 11px;
        line-height: 1.2;
    }

    .title-block {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        align-items: center;
        text-align: center;
    }

    .title-block h1 {
        overflow: hidden;
        font-size: 20px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-actions {
        display: grid;
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: minmax(36px, 1fr) minmax(0, auto) minmax(36px, 1fr);
        gap: 6px;
        min-width: 0;
        width: 100%;
    }

    .auth-actions .auth-user-menu-wrap,
    .auth-actions #auth-login-button {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        min-width: 0;
        max-width: 100%;
    }

    .auth-actions .auth-logout-status {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .header .auth-user:not([hidden]) {
        display: inline-flex;
    }

    #auth-user {
        order: 0;
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        justify-content: center;
        white-space: normal;
    }

    #auth-user>span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    #auth-logout-button {
        order: 1;
    }

    .workspace-help-button {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        grid-column: 1;
        grid-row: 2;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        font-size: 20px;
    }

    .app-shell {
        display: block;
    }

    .app-nav {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        z-index: auto;
        max-height: none;
        overflow: visible;
        padding: 16px;
        background: var(--nav);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
        border-bottom: 1px solid var(--line);
    }

    .app-nav .nav-item,
    .app-nav .nav-group-title {
        width: 100%;
        min-height: 44px;
        margin: 2px 0;
        padding: 11px 12px;
        text-align: left;
    }

    .workspace {
        min-width: 0;
        padding: 30px 12px 28px;
    }

    .workspace-heading {
        display: block;
        position: relative;
        z-index: 1;
        margin-bottom: 14px;
        padding-top: 4px;
    }

    .workspace-kicker {
        display: block;
        min-height: 18px;
        margin: 0 0 6px;
        visibility: visible;
        opacity: 1;
    }

    .workspace-heading h2 {
        font-size: 26px;
    }

    .workspace-description {
        margin: 7px 0 0;
        font-size: 13px;
    }

    .workspace-heading-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
    }

    .query-builder,
    .answer-panel,
    .graph-panel,
    .planning-form,
    .planning-list,
    .planning-modern {
        min-width: 0;
        padding: 14px;
        border-radius: 8px;
    }

    .builder-header,
    .answer-header,
    .planning-modern-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .builder-fields,
    .planning-editor-grid,
    .planning-form,
    .planning-list {
        grid-template-columns: 1fr;
    }

    .builder-field,
    .planning-editor-field,
    .planning-form>*,
    .planning-list>* {
        min-width: 0;
        width: 100%;
    }

    .weekly-plan-editor-metadata,
    .weekly-plan-editor-row-fields {
        grid-template-columns: 1fr;
    }

    .weekly-plan-editor-row-fields label:nth-child(5) {
        grid-row: auto;
    }

    .weekly-plan-editor-rows-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .builder-field input,
    .builder-field select,
    .builder-field textarea,
    .planning-editor-field input,
    .planning-editor-field select,
    .planning-editor-field textarea,
    .planning-textarea {
        min-height: 44px;
        font-size: 16px;
    }

    .club-maintenance-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        width: 100%;
    }

    .club-maintenance-form .club-maintenance-name,
    .club-maintenance-form .club-maintenance-save,
    .club-maintenance-form .club-maintenance-status {
        grid-column: auto;
    }

    .club-record-report .audit-table,
    .club-record-report .audit-table tbody,
    .club-record-report .audit-table tr,
    .club-record-report .audit-table td {
        display: block;
        width: 100%;
    }

    .club-record-report .audit-table thead {
        display: none;
    }

    .club-record-report .audit-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 10px;
        border: 1px solid var(--line);
    }

    .club-record-report .audit-table td {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 8px;
        border: 0;
        border-bottom: 1px solid var(--line);
        text-align: right;
    }

    .club-record-report .audit-table td:first-child {
        grid-column: 1 / -1;
        background: var(--surface-muted);
        font-weight: 700;
        text-align: left;
    }

    .club-record-report .audit-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 600;
        text-align: left;
    }

    .builder-actions,
    .modal-actions,
    .answer-actions,
    .training-dashboard-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .builder-actions button,
    .modal-actions button,
    .answer-actions button,
    .training-dashboard-actions button {
        width: 100%;
        min-height: 44px;
    }

    .training-dashboard {
        gap: 12px;
        padding-top: 8px;
    }

    .training-dashboard-header {
        display: block;
    }

    .training-dashboard-search {
        width: 100%;
        min-width: 0;
        margin-top: 10px;
    }

    .training-dashboard-tabs {
        gap: 16px;
        overflow-x: auto;
    }

    .training-dashboard-controls,
    .training-dashboard-filters {
        align-items: stretch;
        flex-direction: column;
        flex-basis: auto;
        width: 100%;
    }

    .training-dashboard-chip,
    .training-dashboard-secondary,
    .training-dashboard-primary {
        width: 100%;
        min-height: 44px;
        border-radius: 6px;
        text-align: left;
    }

    .training-dashboard-section-title {
        margin-top: 6px;
    }

    .training-dashboard-card {
        gap: 7px;
        padding: 12px;
    }

    .workout-set-drawer {
        width: 100%;
        border-left: 0;
    }

    .workout-set-drawer-header .training-dashboard-primary {
        width: auto;
        min-height: 40px;
    }

    .workout-set-note-options {
        grid-template-columns: 1fr;
    }

    .training-dashboard-card-top {
        flex-wrap: wrap;
    }

    .training-dashboard-list.is-list-view .training-dashboard-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 8px;
    }

    .readiness-dashboard .training-dashboard-list.is-list-view .training-dashboard-card,
    .development-plans-dashboard .training-dashboard-list.is-list-view .training-dashboard-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .training-dashboard-list.is-list-view .training-dashboard-title-line {
        grid-column: 1;
        grid-row: 1;
    }

    .training-dashboard-list.is-list-view .training-dashboard-compact-meta {
        grid-column: 1;
        grid-row: 2;
    }

    .training-dashboard-list.is-list-view .training-dashboard-card-top {
        display: flex;
        grid-column: 2;
        grid-row: 1;
        flex-wrap: nowrap;
    }

    .training-dashboard-list.is-list-view .training-dashboard-detail {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .training-dashboard-group {
        margin-left: 0;
    }

    .training-dashboard-meta {
        overflow-wrap: anywhere;
        line-height: 1.4;
    }

    .training-dashboard-menu {
        right: auto;
        left: 0;
    }

    .workout-workspace {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .workout-setup-pane,
    .workout-editor-pane {
        width: 100%;
        min-height: 0;
    }

    .workout-setup-header,
    .workout-editor-header {
        padding: 14px;
    }

    .workout-editor-tool {
        width: 40px;
        height: 40px;
    }

    .workout-setup,
    .workout-editor {
        min-height: 0;
        border-radius: 8px;
    }

    .workout-setup-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .workout-editor {
        display: flex;
        flex-direction: column;
    }

    .workout-editor-main {
        min-height: 430px;
    }

    .workout-editor-side {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .workout-editor-textarea {
        min-height: 300px;
        padding: 14px;
        font-size: 16px;
    }

    .strength-workout-builder {
        padding: 14px;
    }

    .strength-workout-controls {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .strength-workout-controls select,
    .strength-workout-controls input,
    .strength-workout-add {
        min-height: 44px;
    }

    .workout-analysis-panel {
        grid-column: auto;
        width: 100%;
        padding: 12px;
    }

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

    .workout-editor-swimmer {
        min-height: 44px;
    }

    .workout-editor-swimmer-details {
        grid-template-columns: 1fr;
    }

    .workout-editor-absence-choices {
        grid-template-columns: 1fr;
    }

    .modal-backdrop {
        padding: 12px;
    }

    .modal {
        width: min(100%, 520px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        padding: 16px;
    }

    .auth-gate {
        padding: 16px;
    }

    .auth-gate-panel {
        padding: 28px 22px;
    }

    .auth-gate-logos {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        gap: 8px;
        align-items: center;
    }

    .auth-gate-logos>img:first-child {
        position: static;
        grid-column: 1;
        grid-row: 1;
        width: 48px;
        height: 48px;
    }

    .auth-gate-title-block {
        display: flex;
        grid-column: 2;
        grid-row: 1;
    }

    .auth-gate-title-block h1 {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        min-width: 0;
        margin: 0;
        font-size: 17px;
        line-height: 1.2;
        white-space: normal;
    }

    .auth-gate-title-block .auth-gate-club-name,
    .auth-gate-title-block .auth-gate-slogan {
        grid-column: 2;
        min-width: 0;
        margin: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .auth-gate-title-block .auth-gate-club-name {
        grid-row: 3;
        font-size: 11px;
    }

    .auth-gate-title-block .auth-gate-slogan {
        grid-row: 2;
        font-size: 10px;
    }

    .auth-gate-club-logo {
        position: relative;
        grid-column: 3;
        grid-row: 1;
        justify-self: center;
        align-self: center;
        gap: 1px;
    }

    .auth-gate-club-logo>img {
        width: 48px;
        height: 48px;
    }

    .auth-gate-language {
        gap: 2px;
    }

    .auth-gate-language .auth-language-options {
        gap: 1px;
    }

    .auth-gate-language .auth-language-option,
    .auth-gate-language .auth-weather-mood {
        width: 18px;
    }

    .auth-gate-language .auth-language-flag {
        width: 18px;
        font-size: 15px;
    }

    .auth-gate-language .auth-weather-mood {
        font-size: 16px;
    }

    .auth-gate-language .auth-weather-popover {
        display: none;
    }

    .auth-gate-brand p {
        margin-bottom: 18px;
    }

    .auth-gate-brand .auth-gate-intro {
        margin-top: 24px;
    }

}

@media (max-width: 360px) {
    .auth-gate-panel {
        padding: 24px 16px;
    }

    .auth-gate-logos {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 6px;
    }

    .auth-gate-logos>img:first-child,
    .auth-gate-club-logo>img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 760px) {

    /* Search and analysis mobile workflow. */
    .builder-header h3,
    .admin-builder .builder-header h3 {
        font-size: 20px;
    }

    .builder-fields {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .builder-segmented-field,
    .builder-toggle,
    .admin-builder .admin-category-picker,
    .admin-builder .admin-action-picker {
        width: 100%;
    }

    .builder-segmented,
    .admin-builder .admin-category-picker .builder-segmented,
    .admin-builder .admin-action-picker .builder-segmented {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 6px;
        overflow: visible;
        border: 0;
    }

    .builder-segment,
    .admin-builder .admin-category-picker .builder-segment,
    .admin-builder .admin-action-picker .builder-segment {
        min-height: 44px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 5px;
        text-align: left;
    }

    .analysis-mode-panel {
        display: grid;
        gap: 10px;
        padding: 14px;
    }

    .analysis-mode-panel p {
        overflow-wrap: anywhere;
    }

    .graph-controls {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .graph-field,
    .graph-field-checkbox,
    .graph-year-fields {
        width: 100%;
        min-width: 0;
    }

    .graph-field select,
    .graph-field input {
        min-height: 44px;
        font-size: 16px;
    }

    .graph-canvas-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .graph-canvas-wrap svg {
        min-width: 620px;
    }

    .answer-panel pre,
    #result,
    .planning-card p,
    .planning-modern-card p {
        max-width: 100%;
        overflow-x: auto;
        overflow-wrap: anywhere;
    }

    .planning-card-actions,
    .planning-modern-card-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .planning-card-actions button,
    .planning-modern-card-actions button {
        min-height: 42px;
    }

    .planning-editor-range {
        grid-template-columns: minmax(0, 1fr) 54px;
    }

    .planning-calendar {
        overflow-x: auto;
        min-width: 620px;
    }
}

@media (min-width: 761px) {

    .readiness-dashboard .training-dashboard-controls,
    .development-plans-dashboard .training-dashboard-controls,
    .weekly-plans-dashboard .training-dashboard-controls,
    .season-plans-dashboard .training-dashboard-controls {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        width: 100%;
    }

    .readiness-dashboard .training-dashboard-filters,
    .development-plans-dashboard .training-dashboard-filters,
    .weekly-plans-dashboard .training-dashboard-filters,
    .season-plans-dashboard .training-dashboard-filters {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .readiness-dashboard .training-dashboard-actions,
    .development-plans-dashboard .training-dashboard-actions,
    .weekly-plans-dashboard .training-dashboard-actions,
    .season-plans-dashboard .training-dashboard-actions {
        flex: 0 0 auto;
        width: auto;
        margin-left: auto;
    }

    .weekly-plans-dashboard .training-dashboard-filters,
    .season-plans-dashboard .training-dashboard-filters {
        flex: 0 0 280px;
    }

    .weekly-plans-dashboard .training-dashboard-actions {
        order: -1;
        margin-left: 0;
    }
}

.simbot-avatar:not(.simbot-avatar-fallback) {
    box-sizing: border-box;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    object-fit: cover;
    object-position: center;
}

/* An explicit light preference must override the operating system's dark media query. */
html[data-system-theme="light"] {
    --app-bg: #edf1f3;
    --surface: #ffffff;
    --surface-muted: #f5f8f8;
    --ink: #17323a;
    --muted: #62747a;
    --line: #d5dfe0;
    --nav: #14363d;
    --nav-hover: #1c4a53;
    color-scheme: light;
}

html[data-system-theme="light"] body,
html[data-system-theme="light"] body .app-shell,
html[data-system-theme="light"] body .workspace,
html[data-system-theme="light"] body .overview-panel,
html[data-system-theme="light"] body .planning-panel,
html[data-system-theme="light"] body .builder-fields,
html[data-system-theme="light"] body .analysis-mode-panel {
    background: #edf1f3 !important;
    color: #17323a !important;
}

html[data-system-theme="light"] body .header,
html[data-system-theme="light"] body .app-nav,
html[data-system-theme="light"] body .query-builder,
html[data-system-theme="light"] body .answer-panel,
html[data-system-theme="light"] body .graph-panel,
html[data-system-theme="light"] body .overview-intro,
html[data-system-theme="light"] body .overview-item,
html[data-system-theme="light"] body .planning-form,
html[data-system-theme="light"] body .planning-list,
html[data-system-theme="light"] body .training-dashboard-card,
html[data-system-theme="light"] body .workspace-help,
html[data-system-theme="light"] body .modal,
html[data-system-theme="light"] body .auth-gate-panel {
    background: #ffffff !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
}

html[data-system-theme="light"] body input,
html[data-system-theme="light"] body select,
html[data-system-theme="light"] body textarea,
html[data-system-theme="light"] body pre,
html[data-system-theme="light"] body .graph-canvas-wrap {
    background: #ffffff !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
    -webkit-text-fill-color: #17323a !important;
    color-scheme: light !important;
}

html[data-system-theme="light"] body .season-plan-group-select option {
    background: #ffffff !important;
    color: #17323a !important;
}

html[data-system-theme="light"] body .season-plan-group-select option:checked {
    background: #087e78 !important;
    color: #ffffff !important;
}

html[data-system-theme="light"] body .calendar-editor input,
html[data-system-theme="light"] body .calendar-editor select,
html[data-system-theme="light"] body .calendar-editor textarea {
    background: #ffffff !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
    -webkit-text-fill-color: #17323a !important;
    color-scheme: light !important;
}

html[data-system-theme="light"] body h1,
html[data-system-theme="light"] body h2,
html[data-system-theme="light"] body h3,
html[data-system-theme="light"] body h4,
html[data-system-theme="light"] body h5,
html[data-system-theme="light"] body h6,
html[data-system-theme="light"] body p,
html[data-system-theme="light"] body label,
html[data-system-theme="light"] body strong,
html[data-system-theme="light"] body .workspace-description,
html[data-system-theme="light"] body .workspace-kicker {
    color: #17323a !important;
}

html[data-system-theme="light"] body .app-nav {
    background: #ffffff !important;
    color: #17323a !important;
}

html[data-system-theme="light"] body #app-nav-tree,
html[data-system-theme="light"] body #app-nav-tree ul {
    color: #244b52 !important;
}

html[data-system-theme="light"] body #app-nav-tree .fancytree-node {
    color: #244b52 !important;
}

html[data-system-theme="light"] body #app-nav-tree .fancytree-node:hover,
html[data-system-theme="light"] body #app-nav-tree .fancytree-active>.fancytree-node,
html[data-system-theme="light"] body #app-nav-tree .simbot-tree-active>.fancytree-node {
    background: #e4f0f1 !important;
    color: #12383f !important;
    border-left-color: #d86f2b !important;
}

html[data-system-theme="light"] body #app-nav-tree .fancytree-expander,
html[data-system-theme="light"] body #app-nav-tree .fancytree-icon {
    color: #244b52 !important;
}

html[data-system-theme="light"] body .nav-heading {
    color: #45666b !important;
}

html[data-system-theme="light"] body .workout-setup-header,
html[data-system-theme="light"] body .workout-setup,
html[data-system-theme="light"] body .workout-editor,
html[data-system-theme="light"] body .workout-editor-side,
html[data-system-theme="light"] body .workout-editor-extra-group {
    background: #ffffff !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
}

html[data-system-theme="light"] body .workout-setup-header h3,
html[data-system-theme="light"] body .workout-editor-header h3,
html[data-system-theme="light"] body .workout-setup-field>label,
html[data-system-theme="light"] body .workout-setup-field>span,
html[data-system-theme="light"] body .workout-editor-extra-group label {
    color: #17323a !important;
}

html[data-system-theme="light"] body .workout-setup-field input,
html[data-system-theme="light"] body .workout-setup-field select,
html[data-system-theme="light"] body .workout-editor-extra-group select,
html[data-system-theme="light"] body .workout-subgroups,
html[data-system-theme="light"] body .workout-editor-textarea {
    background: #f5f8f8 !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
    -webkit-text-fill-color: #17323a !important;
}

html[data-system-theme="light"] body .workout-subgroup {
    background: #dfeaf0 !important;
    color: #17323a !important;
}

html[data-system-theme="light"] body .workout-subgroup.is-selected,
html[data-system-theme="light"] body .workout-add-all {
    background: #087e78 !important;
    color: #ffffff !important;
}

html[data-system-theme="light"] body .workout-remove-all {
    border-color: #b85c5c !important;
    color: #9a3f3f !important;
}

html[data-system-theme="light"] body .workout-editor-extra-swimmer {
    background: #f5f8f8 !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
}

html[data-system-theme="light"] body .workout-analysis-panel,
html[data-system-theme="light"] body .workout-analysis-card,
html[data-system-theme="light"] body .workout-analysis-scope button {
    background: #f5f8f8 !important;
    color: #17323a !important;
    border-color: #d5dfe0 !important;
}

html[data-system-theme="light"] body .workout-analysis-title,
html[data-system-theme="light"] body .workout-analysis-card p {
    color: #17323a !important;
}

html[data-system-theme="light"] body .workout-analysis-card h5 {
    color: #087e78 !important;
}

html[data-system-theme="light"] body .workout-analysis-scope button.is-active {
    background: #087e78 !important;
    border-color: #087e78 !important;
    color: #ffffff !important;
}

@media (max-width: 760px) {
    body {
        padding: 12px;
    }

    .header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .app-shell {
        min-height: calc(100vh - 58px);
    }

    .app-nav {
        padding: 12px 10px;
    }

    .workspace {
        padding: 12px 0;
    }

    .workspace-heading {
        gap: 8px;
        margin-bottom: 12px;
    }

    .workspace-heading h2 {
        font-size: 22px;
    }

    .workspace-description {
        font-size: 13px;
    }

    .overview-intro {
        margin: calc(14px - 6mm) auto 14px;
        padding: 14px 16px;
    }

    .overview-intro p {
        font-size: 15px;
        line-height: 1.35;
    }

    .query-builder,
    .planning-panel,
    .analysis-mode-panel,
    .training-dashboard {
        padding: 12px;
    }

    .training-dashboard-header,
    .training-dashboard-controls {
        gap: 8px;
    }

    #app-nav-tree .fancytree-node {
        min-height: 32px;
        font-size: 13px;
    }
}

/* Touch tablets retain the full workflow while gaining tablet-sized navigation and controls. */
@media (min-width: 761px) and (max-width: 1366px) {

    body.is-touch-tablet .overview-weather,
    body[data-display-profile="ipad"] .overview-weather {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        grid-template-areas:
            "location source condition actions"
            "details details details details";
    }

    body.is-touch-tablet .overview-weather-details,
    body[data-display-profile="ipad"] .overview-weather-details {
        flex-wrap: wrap;
        overflow-x: visible;
        white-space: normal;
    }

    body.is-touch-tablet .overview-weather-details>span,
    body[data-display-profile="ipad"] .overview-weather-details>span {
        flex: 0 1 auto;
        min-width: 0;
    }

    body.is-touch-tablet {
        max-width: none;
        padding: 0;
    }

    body.is-touch-tablet .header {
        min-height: 68px;
        padding: 9px 18px;
    }

    body.is-touch-tablet .header-countdown {
        display: none;
    }

    body.is-touch-tablet .logo {
        height: 46px;
    }

    body.is-touch-tablet .jss-logo {
        height: 36px;
        margin-left: 10px;
    }

    body.is-touch-tablet .app-shell {
        grid-template-columns: 210px minmax(0, 1fr);
        min-height: calc(100vh - 68px);
    }

    body.is-touch-tablet .app-nav {
        padding: 16px 10px;
    }

    body.is-touch-tablet #app-nav-tree .fancytree-node {
        min-height: 42px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    body.is-touch-tablet .workspace {
        width: 100%;
        padding: 24px;
    }

    body.is-touch-tablet .workspace-heading {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 18px;
    }

    body.is-touch-tablet .workspace-description {
        flex: 1 1 300px;
    }

    body.is-touch-tablet .workspace-heading-actions {
        flex-wrap: wrap;
    }

    body.is-touch-tablet .workspace-help-button,
    body.is-touch-tablet .workspace-back-button {
        min-height: 42px;
    }

    body.is-touch-tablet a.workspace-help-button {
        font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Arial, sans-serif;
    }

    body.is-touch-tablet .overview-dashboard-grid,
    body.is-touch-tablet .overview-week-pulse-list,
    body.is-touch-tablet .swimmer-overview-details,
    body.is-touch-tablet .swimmer-overview-insights,
    body.is-touch-tablet .swimmer-overview-training-periods {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.is-touch-tablet .builder-fields,
    body.is-touch-tablet .planning-editor-grid,
    body.is-touch-tablet .weekly-plan-editor-metadata,
    body.is-touch-tablet .weekly-plan-editor-row-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.is-touch-tablet .training-dashboard-controls,
    body.is-touch-tablet .training-dashboard-filters {
        flex-basis: 100%;
        width: 100%;
    }

    body.is-touch-tablet .training-dashboard-actions {
        margin-left: 0;
    }

    body.is-touch-tablet .workout-workspace,
    body[data-display-profile="ipad"] .workout-workspace {
        grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
        gap: 16px;
    }

    body.is-touch-tablet .workout-editor,
    body[data-display-profile="ipad"] .workout-editor {
        grid-template-columns: minmax(0, 1fr) minmax(205px, 31%);
    }

    body.is-touch-tablet .world-aquatics-controls,
    body[data-display-profile="ipad"] .world-aquatics-controls {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.is-touch-tablet .event-editor,
    body[data-display-profile="ipad"] .event-editor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(100%, 920px);
    }

    body.is-touch-tablet .roles-risk-guide,
    body[data-display-profile="ipad"] .roles-risk-guide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Keep the shared application shell fluid across all iPad landscape widths. */
@media (min-width: 761px) and (max-width: 1400px) {
    body {
        max-width: none;
        padding: 0;
    }

    .header {
        min-height: 68px;
        padding: 9px 18px;
    }

    .header-countdown {
        display: none;
    }

    .app-shell {
        grid-template-columns: 210px minmax(0, 1fr);
        min-height: calc(100vh - 68px);
    }

    .app-nav {
        padding: 16px 10px;
    }

    .workspace {
        width: 100%;
        padding: 24px;
    }
}

.relay-results-panel {
    display: grid;
    width: 100%;
    max-width: 1240px;
    gap: 16px;
}

.relay-results-controls {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 12px;
}

.relay-results-controls label {
    display: grid;
    min-width: 0;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.relay-results-controls select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.relay-results-status {
    margin: 0;
    color: var(--muted);
}

.relay-results-chart {
    min-height: 0;
}

.relay-results-chart summary,
.relay-result-item h4 {
    margin: 0;
    color: var(--ink);
}

.relay-results-chart summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.relay-results-chart svg {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.relay-results-chart text {
    fill: var(--muted);
    font: 11px Arial, sans-serif;
}

.relay-results-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.relay-result-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 5px;
    background: var(--surface);
}

.relay-result-item>p {
    margin: 7px 0 12px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.relay-competition-group {
    grid-column: 1 / -1;
    min-width: 0;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 5px;
    background: var(--surface);
}

.relay-competition-group summary {
    padding: 8px 12px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.relay-competition-summary {
    display: list-item;
}

.relay-competition-summary-text {
    min-width: 0;
}

.relay-competition-print {
    float: right;
    min-height: 34px;
    margin-left: auto;
    padding: 5px 10px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: transparent;
    color: var(--teal);
    font: 600 13px/1.2 Arial, sans-serif;
}

.relay-competition-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 12px 12px;
}

.relay-event-group {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.relay-event-group.has-multiple-results {
    grid-column: 1 / -1;
}

.relay-event-results {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.relay-event-group.has-multiple-results .relay-event-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.relay-event-heading {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.relay-result-members {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 24px;
}

.relay-result-members li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.relay-member-link {
    min-height: 0;
    padding: 2px 7px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: transparent;
    color: var(--teal);
    font: 12px/1.25 Arial, sans-serif;
}

.relay-member-link-dialog {
    width: min(480px, calc(100vw - 32px));
}

.relay-member-link-dialog form {
    display: grid;
    gap: 14px;
}

.relay-member-link-dialog h4,
.relay-member-link-dialog p {
    margin: 0;
}

.relay-member-link-dialog>form>p {
    color: var(--muted);
}

.relay-member-link-dialog label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.relay-member-link-dialog select {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.relay-member-import-fields {
    display: grid;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.relay-member-import-fields select[multiple] {
    min-height: 106px;
}

.relay-member-link-warning {
    color: var(--danger, #a22d25) !important;
    font-weight: 600;
}

.relay-member-link-status {
    min-height: 18px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .relay-results-controls {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .relay-member-link-dialog .modal-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .relay-results-controls,
    .relay-results-list,
    .relay-competition-results,
    .relay-event-group.has-multiple-results .relay-event-results {
        grid-template-columns: minmax(0, 1fr);
    }

    .relay-results-controls select {
        min-height: 44px;
        font-size: 16px;
    }

    .relay-result-item {
        padding: 14px;
    }

    .relay-competition-print {
        flex: 0 0 auto;
        min-height: 40px;
    }
}

@media (min-width: 761px) {
    body.is-season-plan-workspace .workspace {
        width: 100%;
        max-width: none;
    }
}

/* Påminnelseruta – visas på alla enheter */
.reminder-backdrop {
    z-index: 45;
}

.reminder-modal {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 4px solid var(--accent);
    box-sizing: border-box;
}

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

.reminder-modal .reminder-header h2 {
    margin: 0;
}

.reminder-close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.reminder-intro,
.reminder-status {
    margin: 0;
    color: var(--muted);
}

.reminder-status:empty {
    display: none;
}

.reminder-status.is-error {
    color: #b42318;
}

.reminder-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    min-height: 0;
}

.reminder-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.reminder-info {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.reminder-info strong {
    overflow-wrap: anywhere;
}

.reminder-meta {
    color: var(--muted);
    font-size: 14px;
}

.reminder-when {
    color: var(--teal);
    font-weight: 600;
}

.reminder-when.is-past {
    color: var(--accent);
}

.reminder-actions,
.reminder-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.reminder-actions button,
.reminder-footer button,
.reminder-footer select {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.reminder-actions .reminder-open {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.reminder-footer {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.reminder-snooze-label {
    color: var(--muted);
}

@media (max-width: 560px) {
    .reminder-backdrop {
        padding: 12px;
    }

    .reminder-modal {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
        padding: 16px;
    }

    .reminder-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .reminder-actions button {
        padding: 0 6px;
    }

    .reminder-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .reminder-snooze-label,
    .reminder-footer select {
        grid-column: 1 / -1;
    }
}