/* ============================================================================
   TRAINING PLANNER MODULE — Styles
   Uses the Football Intelligence Platform design system (var tokens from styles.css)
   ============================================================================ */

/* ── Module Container ────────────────────────────────────────────────────── */
.tp-module {
    --tp-enhanced: var(--success);
    --tp-uploaded: var(--success);
    --tp-accent-text: var(--text-inverse);

    padding: 0;
}
.tp-module > *:not(.tp-toolbar) {
    margin-left: 24px;
    margin-right: 24px;
}

/* toolbar and title styles inherited from styles.css shared rules */
.tp-toolbar { justify-content: space-between; }

/* ── Filter Bar ──────────────────────────────────────────────────────────── */
.tp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    align-items: flex-end;
}

.tp-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tp-filter-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Extends .hub-select — only overrides listed here */
.tp-filter-select {
    padding: 7px 28px 7px 10px;
    background-position: right 8px center;
    min-width: 130px;
    transition: border-color 0.2s;
}

.tp-filter-input {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--surface-field);
    color: var(--text-primary);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-md);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    width: 75px;
}

.tp-filter-input:hover {
    border-color: var(--text-tertiary);
}

.tp-filter-input:focus {
    border-color: var(--accent);
}

.tp-filter-input::placeholder {
    color: var(--text-tertiary);
}

.tp-module input[type="number"] {
    -moz-appearance: textfield;
}

.tp-module input[type="number"]::-webkit-outer-spin-button,
.tp-module input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tp-search-btn {
    min-height: 32px;
    padding: 6px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--accent);
    color: var(--text-inverse);
    border: 1px solid var(--accent);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-end;
}

.tp-search-btn:hover {
    background: var(--accent-hover);
}

.tp-search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Finder filters mirror the compact reference layout without moving shared navigation. */
.tp-module[data-mode="finder"] #tp-finder-filters {
    align-items: flex-end;
    gap: 22px;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--surface-raised);
    border-color: var(--ink-line);
}

.tp-module[data-mode="finder"] #tp-finder-filters .tp-filter-group {
    gap: 7px;
}

.tp-module[data-mode="finder"] #tp-finder-filters .tp-filter-label {
    font-size: 0.66rem;
    letter-spacing: 1px;
}

.tp-module[data-mode="finder"] #tp-finder-filters .tp-filter-select,
.tp-module[data-mode="finder"] #tp-finder-filters .tp-filter-input {
    height: 38px;
    min-height: 38px;
    min-width: 150px;
    padding: 0 14px;
    font-size: 0.82rem;
    font-weight: 500;
}

.tp-module[data-mode="finder"] #tp-finder-filters #tp-finder-drill-name {
    min-width: 220px;
}

.tp-module[data-mode="finder"] #tp-finder-filters #tp-finder-player-format {
    min-width: 110px;
}

.tp-module[data-mode="finder"] #tp-finder-filters .tp-search-btn {
    height: 38px;
    min-height: 38px;
    padding: 0 22px;
}

/* ── Context Strip ───────────────────────────────────────────────────────── */
.tp-context-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.tp-context-strip strong {
    color: var(--text-primary);
}

.tp-context-muted {
    color: var(--text-tertiary);
}

.tp-context-divider {
    width: 1px;
    height: 16px;
    background: var(--ink-line);
}

.tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tp-badge.regression {
    background: rgba(3, 71, 82, 0.25);
    color: var(--accent-teal);
}

.tp-badge.average {
    background: var(--accent-soft);
    color: var(--accent);
}

.tp-badge.fallback {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

/* ── KPI Summary Cards ───────────────────────────────────────────────────── */
.tp-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.tp-kpi-card {
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: center;
    transition: border-color 0.2s, transform 0.15s;
}

.tp-kpi-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.tp-kpi-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.tp-kpi-label .tp-unit {
    font-weight: 400;
    color: var(--text-tertiary);
}

.tp-kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.tp-kpi-permin {
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.8;
    margin-top: 4px;
    font-weight: 500;
}

.tp-model-warning {
    margin: -8px 0 16px 0;
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--warning);
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-sm);
    line-height: 1.4;
}

/* ── Confidence Range Chart ──────────────────────────────────────────────── */
.tp-chart-section {
    margin-bottom: 24px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}

.tp-chart-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
}

/* New gauge row layout */
.tp-gauge-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ink-line);
}

.tp-gauge-row:last-child {
    border-bottom: none;
}

.tp-gauge-label {
    width: 90px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
}

.tp-gauge-track {
    flex: 1;
    height: 8px;
    background: var(--surface-raised);
    border-radius: var(--radius-4);
    position: relative;
    min-width: 120px;
    border: 1px solid var(--ink-line);
}

.tp-gauge-range {
    position: absolute;
    top: -1px;
    height: 8px;
    background: var(--accent-soft);
    border-radius: var(--radius-4);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.tp-gauge-no-data {
    position: absolute;
    inset: 2px 0;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--text-secondary) 14%, transparent);
}

.tp-gauge-marker {
    position: absolute;
    top: -6px;
    width: 5px;
    height: 20px;
    background: var(--accent);
    border-radius: var(--radius-3);
    transform: translateX(-50%);
    z-index: 2;
    border: 1px solid var(--ink-line-strong);
}

.tp-gauge-marker.regression {
    background: var(--accent-teal);
    border: 1px solid var(--ink-line-strong);
}

.tp-gauge-marker.fallback {
    background: var(--warning);
    border: 1px solid var(--ink-line-strong);
}

.tp-gauge-p25,
.tp-gauge-p75 {
    position: absolute;
    top: -2px;
    width: 1px;
    height: 12px;
    background: var(--text-tertiary);
    opacity: 0.4;
    transform: translateX(-50%);
}

.tp-gauge-value {
    width: 48px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.tp-gauge-permin {
    width: 48px;
    font-size: 0.65rem;
    color: var(--accent);
    opacity: 0.8;
    text-align: right;
    flex-shrink: 0;
    font-weight: 500;
}

.tp-gauge-range-text {
    width: 72px;
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-align: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.tp-gauge-method {
    width: 100px;
    font-size: 0.6rem;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.tp-gauge-method.regression {
    color: var(--zscore-high-color);
}

.tp-gauge-method.enhanced {
    color: var(--tp-enhanced);
}

.tp-gauge-method.average {
    color: var(--accent);
}

.tp-gauge-method.fallback {
    color: var(--warning);
}

.tp-gauge-method.high,
.tp-gauge-method.medium {
    color: var(--accent);
}

.tp-gauge-method.low {
    color: var(--warning);
}

.tp-gauge-method.missing,
.tp-gauge-row.is-missing .tp-gauge-value,
.tp-gauge-row.is-missing .tp-gauge-permin {
    color: var(--text-tertiary);
}

/* ── Model Legend ───────────────────────────────────────────────────────── */
.tp-model-legend {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--surface-raised);
    border-radius: var(--radius-sm);
    border: 1px solid var(--ink-line);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.tp-legend-body {
    margin-top: 8px;
}

.tp-legend-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
}

.tp-legend-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.tp-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    display: inline-block;
    flex-shrink: 0;
    position: relative;
    top: 1px;
}

.tp-legend-dot.enhanced {
    background: var(--tp-enhanced);
}

.tp-legend-dot.regression {
    background: var(--zscore-high-color);
}

.tp-legend-dot.average {
    background: var(--accent);
}

.tp-legend-dot.fallback {
    background: var(--warning);
}

.tp-legend-r2 {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ink-line);
}

/* ── Exclude Filter Bar ──────────────────────────────────────────────────── */
.tp-exclude-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 10px;
}

.tp-exclude-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tp-exclude-sep {
    width: 1px;
    height: 18px;
    background: var(--ink-line);
    margin: 0 4px;
}

.tp-exclude-chip {
    padding: 3px 10px;
    font-size: 0.68rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--surface-raised);
    color: var(--text-secondary);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.tp-exclude-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.tp-exclude-chip.excluded {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border-color: var(--danger);
    color: var(--danger);
    text-decoration: line-through;
}

.tp-exclude-chip.small {
    font-size: 0.62rem;
    padding: 2px 8px;
}

.tp-exclude-chip.reset {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.tp-exclude-chip.reset:hover {
    background: var(--accent);
    color: var(--text-inverse);
}

/* ── Drill Results Table ─────────────────────────────────────────────────── */
.tp-results-section {
    margin-top: 20px;
}

.tp-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.tp-results-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
}

.tp-results-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tp-results-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    text-align: right;
}

.tp-results-scale {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.tp-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--ink-line);
}

/* Base table styles provided by .hub-table — only overrides here */
.tp-table {
    font-size: 0.82rem;
}

.tp-finder-table {
    background: var(--surface-recess);
}

.tp-finder-table thead tr.tp-finder-group-row th {
    top: 0;
    z-index: 12;
    height: 22px;
    padding: 5px 10px;
    background: var(--surface-recess);
    border-bottom: 1px solid var(--ink-line);
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-align: center;
}

.tp-finder-table thead tr.tp-finder-label-row th {
    top: 22px;
    z-index: 11;
}

.tp-finder-table th.tp-sortable {
    cursor: pointer;
    user-select: none;
}

.tp-finder-table th.tp-sortable:hover,
.tp-finder-table th.tp-sortable.is-sorted {
    color: var(--text-primary);
}

.tp-sort-caret {
    color: var(--text-secondary);
    margin-left: 4px;
    font-size: 0.58rem;
}

.tp-finder-name {
    min-width: 210px;
    max-width: 320px;
}

.tp-drill-name-main {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
}

.tp-finder-name .tp-drill-hash {
    color: var(--text-secondary);
}

.tp-heat-td {
    min-width: 62px;
}

.tp-heat-cell {
    display: inline-flex;
    justify-content: flex-end;
    min-width: 50px;
    padding: 4px 7px;
    border-radius: var(--radius-4);
    background: color-mix(in srgb, var(--accent-teal) var(--tp-heat-pct), transparent);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1.1;
}

.tp-heat-cell.is-hot {
    color: color-mix(in srgb, var(--accent-teal) 28%, var(--text-primary));
}

.tp-intensity {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-width: 92px;
}

.tp-intensity-track {
    width: 54px;
    height: 5px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--text-secondary) 12%, transparent);
    overflow: hidden;
    position: relative;
}

.tp-intensity-track span {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--tp-intensity-width);
    border-radius: var(--radius-pill);
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--accent-dark) 70%, var(--surface-recess)),
        var(--accent-teal)
    );
}

.tp-intensity-score {
    width: 30px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.tp-intensity-high .tp-intensity-score {
    color: var(--accent-teal);
}

.tp-intensity-mid .tp-intensity-score {
    color: color-mix(in srgb, var(--accent-teal) 58%, var(--text-secondary));
}

.tp-intensity-low .tp-intensity-score {
    color: var(--accent-dark);
}

.tp-total-cell {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.tp-null-value {
    color: var(--text-tertiary);
}

.tp-finder-footnote {
    margin-top: 10px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

.tp-module[data-mode="finder"] .tp-results-section {
    margin-top: 0;
}

.tp-module[data-mode="finder"] .tp-finder-results-header {
    justify-content: flex-start;
    gap: 0;
    margin: 4px 2px 12px;
}

.tp-module[data-mode="finder"] .tp-finder-results-header .tp-results-title {
    font-size: 0.86rem;
    letter-spacing: 1.4px;
}

.tp-module[data-mode="finder"] .tp-finder-results-header .tp-results-count {
    margin-left: 14px;
    color: var(--text-secondary);
}

.tp-module[data-mode="finder"] .tp-finder-results-header .tp-results-scale {
    margin-left: auto;
}

.tp-module[data-mode="finder"] .tp-exclude-bar {
    gap: 5px 6px;
    margin: -2px 0 12px;
    padding: 0;
}

.tp-module[data-mode="finder"] .tp-exclude-label {
    font-size: 0.62rem;
    letter-spacing: 0.7px;
}

.tp-module[data-mode="finder"] .tp-exclude-chip {
    padding: 2px 8px;
    background: transparent;
    font-size: 0.62rem;
}

.tp-module[data-mode="finder"] .tp-exclude-chip.small {
    padding: 2px 7px;
    font-size: 0.6rem;
}

.tp-module[data-mode="finder"] .tp-table-wrap {
    border: 0;
    background: transparent;
    border-radius: var(--radius-md);
}

.tp-module[data-mode="finder"] .tp-finder-table {
    overflow: hidden;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    background: var(--surface-recess);
    font-size: 0.82rem;
    min-width: 91.5rem;
    table-layout: fixed;
    width: 100%;
}

.tp-module[data-mode="finder"] .tp-finder-col-index {
    width: 2.25rem;
}

.tp-module[data-mode="finder"] .tp-finder-col-drill {
    width: auto;
}

.tp-module[data-mode="finder"] .tp-finder-col-format {
    width: 6rem;
}

.tp-module[data-mode="finder"] .tp-finder-col-pitch {
    width: 6.25rem;
}

.tp-module[data-mode="finder"] .tp-finder-col-duration {
    width: 4.75rem;
}

.tp-module[data-mode="finder"] .tp-finder-col-intensity {
    width: 6.5rem;
}

.tp-module[data-mode="finder"] .tp-finder-col-heat {
    width: 4.25rem;
}

.tp-module[data-mode="finder"] .tp-finder-col-total {
    width: 4.75rem;
}

.tp-module[data-mode="finder"] .tp-finder-col-video {
    width: 3.75rem;
}

.tp-module[data-mode="finder"] .tp-finder-table thead tr.tp-finder-group-row th {
    position: sticky;
    top: 0;
    z-index: 12;
    height: 22px;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--surface-recess) 86%, var(--surface-chrome));
    border-bottom: 1px solid var(--ink-line);
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-align: center;
}

.tp-module[data-mode="finder"] .tp-finder-table thead tr.tp-finder-label-row th {
    top: 22px;
    padding: 10px;
    background: var(--surface-raised);
    border-bottom: 2px solid var(--ink-line);
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-align: right;
}

.tp-module[data-mode="finder"] .tp-finder-table thead tr.tp-finder-label-row th:first-child,
.tp-module[data-mode="finder"] .tp-finder-table thead tr.tp-finder-label-row th:nth-child(2),
.tp-module[data-mode="finder"] .tp-finder-table thead tr.tp-finder-label-row th:nth-child(3),
.tp-module[data-mode="finder"] .tp-finder-table thead tr.tp-finder-label-row th:nth-child(4) {
    text-align: left;
}

.tp-module[data-mode="finder"] .tp-finder-table th.tp-sortable:hover,
.tp-module[data-mode="finder"] .tp-finder-table th.tp-sortable.is-sorted {
    color: var(--text-primary);
}

.tp-module[data-mode="finder"] .tp-finder-table th.tp-sortable.is-sorted .tp-sort-caret {
    color: var(--accent);
}

.tp-module[data-mode="finder"] .tp-finder-table td {
    padding: 9px 10px;
    text-align: right;
    border-bottom: 1px solid var(--ink-line);
    vertical-align: middle;
}

.tp-module[data-mode="finder"] .tp-finder-table td:first-child,
.tp-module[data-mode="finder"] .tp-finder-table td:nth-child(2),
.tp-module[data-mode="finder"] .tp-finder-table td:nth-child(3),
.tp-module[data-mode="finder"] .tp-finder-table td:nth-child(4) {
    text-align: left;
}

.tp-module[data-mode="finder"] .tp-finder-table tbody td:first-child {
    width: 30px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.tp-module[data-mode="finder"] .tp-finder-table th.tp-finder-align-left,
.tp-module[data-mode="finder"] .tp-finder-table td.tp-finder-align-left {
    text-align: left;
}

.tp-module[data-mode="finder"] .tp-finder-table th.tp-finder-align-right,
.tp-module[data-mode="finder"] .tp-finder-table td.tp-finder-align-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tp-module[data-mode="finder"] .tp-finder-table th.tp-finder-align-center,
.tp-module[data-mode="finder"] .tp-finder-table td.tp-finder-align-center {
    text-align: center;
}

.tp-module[data-mode="finder"] .tp-finder-name {
    min-width: 230px;
    max-width: 340px;
}

.tp-module[data-mode="finder"] .tp-drill-name-main {
    font-size: 0.82rem;
    line-height: 1.2;
}

.tp-module[data-mode="finder"] .tp-finder-name .tp-drill-hash {
    font-size: 0.7rem;
    line-height: 1.2;
    margin-top: 1px;
}

.tp-module[data-mode="finder"] .tp-meta-cell {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.tp-module[data-mode="finder"] .tp-heat-td {
    min-width: 58px;
}

.tp-module[data-mode="finder"] .tp-heat-cell {
    box-sizing: border-box;
    width: 3.125rem;
    min-width: 3.125rem;
    padding: 4px 8px;
}

.tp-module[data-mode="finder"] .tp-heat-td .tp-null-value {
    display: inline-flex;
    justify-content: center;
    width: 3.125rem;
}

.tp-module[data-mode="finder"] .tp-heat-cell.is-hot {
    color: color-mix(in srgb, var(--accent-teal) 16%, var(--text-primary));
}

.tp-module[data-mode="finder"] .tp-intensity {
    display: inline-grid;
    grid-template-columns: 3.375rem 1.875rem;
    align-items: center;
    justify-content: center;
    gap: 0.4375rem;
    width: 5.6875rem;
    min-width: 5.6875rem;
}

.tp-module[data-mode="finder"] .tp-intensity-track {
    width: 3.375rem;
}

.tp-module[data-mode="finder"] .tp-intensity-score {
    width: 1.875rem;
    font-size: 0.88rem;
    text-align: right;
}

.tp-module[data-mode="finder"] .tp-total-cell {
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.tp-module[data-mode="finder"] .tp-video-thumb {
    display: inline-flex;
    box-sizing: border-box;
    width: 1.625rem;
    height: 1.625rem;
    margin-inline: auto;
    border-radius: var(--radius-sm);
    background: var(--surface-field);
    vertical-align: middle;
}

.tp-module[data-mode="finder"] .tp-video-thumb .play-icon {
    color: var(--text-secondary);
}

.tp-module[data-mode="finder"] .tp-video-thumb-empty {
    background: transparent;
}

.tp-module[data-mode="finder"] .tp-finder-footnote {
    margin-top: 10px;
    font-size: 0.68rem;
}

.tp-drill-hash {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 2px;
    line-height: 1.2;
}

.tp-drill-category {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    letter-spacing: 0.3px;
}

.tp-drill-category.SSG {
    background: rgba(var(--success-rgb), 0.12);
    color: var(--success);
}

.tp-drill-category.Possession {
    background: rgba(96, 165, 250, 0.12);
    color: var(--info);
}

.tp-drill-category.Tactical {
    background: rgba(192, 132, 252, 0.12);
    color: var(--status-differentiated);
}

.tp-drill-category.Physical {
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
}

.tp-drill-category.Technical {
    background: rgba(3, 71, 82, 0.25);
    color: var(--zscore-high-color);
}

.tp-drill-category.Match {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
}

.tp-drill-category.Rondo {
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
}

.tp-drill-category.Activation {
    background: rgba(148, 163, 184, 0.12);
    color: var(--status-permission);
}

.tp-drill-category.Other {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
}

.tp-col-sep {
    border-left: 1px solid var(--ink-line) !important;
}

/* ── Video Column ────────────────────────────────────────────────────────── */
.tp-video-thumb {
    width: 36px;
    height: 24px;
    background: var(--surface-raised);
    border-radius: var(--radius-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--ink-line);
    padding: 0;
    font-family: inherit;
    transition: border-color 0.2s;
    overflow: hidden;
    position: relative;
}

.tp-video-delete {
    position: absolute;
    top: 1px;
    right: 3px;
    font-size: 12px;
    color: var(--text-tertiary);
    cursor: pointer;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}

.tp-video-thumb:hover .tp-video-delete {
    opacity: 1;
}

.tp-video-delete:hover {
    color: var(--danger);
}

.tp-video-thumb:hover {
    border-color: var(--accent);
}

.tp-video-thumb .play-icon {
    font-size: 10px;
    color: var(--accent);
}

.tp-video-thumb-empty {
    border-style: dashed;
    cursor: default;
    background: transparent;
}

.tp-video-thumb-empty:hover {
    border-color: var(--ink-line);
}

.tp-video-thumb-empty .play-icon {
    color: var(--text-tertiary);
}

.tp-no-video {
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

/* ── Video Modal ─────────────────────────────────────────────────────────── */
.tp-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--scrim);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-video-modal-inner {
    max-width: 900px;
    width: 90%;
    background: var(--surface-chrome);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--ink-line-strong);
    box-shadow: var(--shadow-modal);
}

.tp-video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ink-line-strong);
    background: rgba(var(--accent-rgb), 0.05);
}

.tp-video-modal-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tp-video-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.tp-video-modal-close:hover {
    color: var(--accent);
}

.tp-video-modal video {
    width: 100%;
    display: block;
}

/* ── Empty State ─────────────────────────────────────────────────────────── */
.tp-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
    line-height: 1.45;
}

.tp-empty-text {
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.tp-empty-hint {
    font-size: 0.76rem;
    color: var(--text-tertiary);
}

/* ── Loading ─────────────────────────────────────────────────────────────── */
.tp-loading {
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.tp-loading .spinner {
    margin: 0 auto 12px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .tp-gauge-method {
        display: none;
    }

    .tp-gauge-label {
        width: 70px;
        font-size: 0.68rem;
    }

    .tp-kpi-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ipad-mode .tp-kpi-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ipad-mode .tp-kpi-value {
    font-size: 1.3rem;
}

/* ── Session Planner ─────────────────────────────────────────────────────── */
.tp-builder-totals {
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
}

.tp-builder-totals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tp-builder-pct {
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 4px;
}

.tp-builder-bench {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px 16px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--ink-zebra);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-builder-preview-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 20px;
    margin: -8px 0 8px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-builder-preview-label {
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.tp-builder-preview-metric {
    white-space: nowrap;
}

.tp-builder-preview-metric strong {
    color: var(--text-primary);
}

.tp-builder-week-summary {
    margin-bottom: 16px;
    padding: 14px 16px 16px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
}

.tp-builder-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 0;
    padding: 10px 14px;
    background: var(--surface-recess);
    border-color: var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-builder-setup-lane,
.tp-builder-action-cluster,
.tp-builder-quick-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

.tp-builder-action-cluster {
    margin-left: auto;
}

.tp-builder-quick-add {
    min-width: 0;
    border-top: 1px solid var(--ink-line);
}

.tp-builder-quick-add summary {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.tp-builder-quick-add summary::-webkit-details-marker {
    display: none;
}

.tp-builder-quick-add summary::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--accent);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
}

.tp-builder-quick-add[open] summary::before {
    content: '-';
}

.tp-builder-quick-add:not([open]) .tp-builder-quick-grid {
    display: none;
}

.tp-builder-quick-add summary small {
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 700;
}

.tp-builder-quick-grid {
    padding-top: 10px;
}

.tp-week-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.tp-week-summary-sub,
.tp-week-summary-count {
    margin-top: 3px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.tp-week-summary-count {
    color: var(--text-secondary);
    text-align: right;
}

.tp-week-target-wrap {
    margin-bottom: 12px;
    padding: 10px;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-week-target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
    gap: 8px;
}

.tp-week-target-card {
    min-width: 0;
    padding: 9px 10px;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-week-target-top,
.tp-week-target-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.tp-week-target-top span,
.tp-week-target-meta span {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.55px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.tp-week-target-top strong {
    flex: 0 0 auto;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.tp-week-target-top small {
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 700;
}

.tp-week-target-track {
    position: relative;
    height: 6px;
    margin: 10px 0 7px;
    overflow: hidden;
    background: color-mix(in srgb, var(--text-secondary) 13%, transparent);
    border-radius: var(--radius-pill);
}

.tp-week-target-track i,
.tp-week-target-track b {
    position: absolute;
    top: 0;
    bottom: 0;
}

.tp-week-target-track i {
    left: 0;
    width: min(var(--tp-target-width), 100%);
    background: var(--accent-teal);
    border-radius: var(--radius-pill);
}

.tp-week-target-track b {
    left: calc(100% - 1px);
    width: 2px;
    background: var(--text-primary);
    opacity: 0.58;
}

.tp-week-target-meta {
    align-items: center;
}

.tp-week-target-meta span {
    max-width: 70%;
    color: var(--text-secondary);
    font-size: 0.6rem;
    letter-spacing: 0;
    text-transform: none;
}

.tp-week-target-meta em {
    flex: 0 0 auto;
    padding: 2px 7px;
    color: var(--accent-teal);
    background: color-mix(in srgb, var(--accent-teal) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-teal) 26%, transparent);
    border-radius: var(--radius-pill);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.tp-week-target-card.status-on_target .tp-week-target-track i {
    background: var(--success);
}

.tp-week-target-card.status-on_target .tp-week-target-meta em {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 13%, transparent);
    border-color: color-mix(in srgb, var(--success) 28%, transparent);
}

.tp-week-target-card.status-over .tp-week-target-track i {
    width: min(var(--tp-target-width), 100%);
    background: var(--status-injured);
}

.tp-week-target-card.status-over .tp-week-target-meta em {
    color: var(--status-injured);
    background: color-mix(in srgb, var(--status-injured) 12%, transparent);
    border-color: color-mix(in srgb, var(--status-injured) 28%, transparent);
}

.tp-week-target-card.status-missing .tp-week-target-track i,
.tp-week-target-card.status-tracking .tp-week-target-track i {
    background: var(--text-tertiary);
}

.tp-week-target-card.status-missing .tp-week-target-meta em,
.tp-week-target-card.status-tracking .tp-week-target-meta em {
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--text-secondary) 9%, transparent);
    border-color: var(--ink-line);
}

.tp-week-day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.tp-week-day-card {
    min-width: 0;
    min-height: 104px;
    padding: 10px;
    background: var(--surface-recess);
    color: var(--text-secondary);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s, background 0.16s, color 0.16s;
}

.tp-week-day-card:hover,
.tp-week-day-card.is-selected {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--ink-line-strong));
    background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface-recess));
}

.tp-week-day-card.has-plan {
    color: var(--text-primary);
}

.tp-week-day-label,
.tp-week-day-meta,
.tp-week-day-load {
    display: block;
    min-width: 0;
}

.tp-week-day-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 7px;
    color: var(--text-tertiary);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.tp-week-day-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-week-day-label b {
    flex: 0 0 auto;
    padding: 1px 5px;
    color: var(--accent-teal);
    background: color-mix(in srgb, var(--accent-teal) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-teal) 24%, transparent);
    border-radius: var(--radius-pill);
    font-size: 0.56rem;
    letter-spacing: 0.4px;
}

.tp-week-day-card strong {
    display: block;
    overflow: hidden;
    color: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-week-day-meta {
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 0.68rem;
}

.tp-week-day-load {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    line-height: 1.5;
}

.tp-week-day-load span {
    display: block;
}

.tp-week-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.tp-week-kpi {
    min-width: 0;
    padding: 10px 12px;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-week-kpi span,
.tp-week-kpi small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-week-kpi strong {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.tp-week-kpi small {
    margin-top: 2px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.tp-week-progression {
    margin-bottom: 14px;
    padding: 10px 12px 12px;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
}

.tp-week-progression-list {
    display: grid;
    gap: 7px;
}

.tp-week-progression-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    min-width: 0;
    padding: 8px;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-week-progression-row.is-planned {
    border-color: color-mix(in srgb, var(--accent-teal) 30%, var(--ink-line));
}

.tp-week-progression-label span,
.tp-week-progression-label strong,
.tp-week-progression-label small {
    display: block;
}

.tp-week-progression-label span {
    color: var(--text-tertiary);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-week-progression-label strong {
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 0.76rem;
}

.tp-week-progression-label small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.66rem;
}

.tp-week-progression-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 6px;
}

.tp-week-progression-metric {
    min-width: 0;
    padding: 6px 7px;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-week-progression-metric b,
.tp-week-progression-metric strong,
.tp-week-progression-metric small {
    display: block;
}

.tp-week-progression-metric b {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.tp-week-progression-metric strong {
    margin-top: 3px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.tp-week-progression-metric small {
    margin-top: 2px;
    color: var(--accent-teal);
    font-size: 0.62rem;
    font-weight: 700;
}

.tp-week-player-wrap {
    margin-top: 2px;
}

.tp-week-player-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tp-week-player-head span {
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 700;
}

.tp-week-player-head small {
    color: var(--text-tertiary);
    font-size: 0.68rem;
}

.tp-week-player-table {
    font-size: 0.76rem;
}

.tp-week-player-table td:first-child {
    color: var(--text-primary);
    font-weight: 600;
}

.tp-builder-plan-group .tp-filter-input,
.tp-builder-name-group .tp-filter-input {
    width: 132px;
}

.tp-builder-name-group .tp-filter-input {
    width: 150px;
}

.tp-builder-slot-group .tp-filter-select,
.tp-builder-plan-group .tp-filter-select {
    min-width: 86px;
}

.tp-builder-plan-group .tp-filter-select {
    min-width: 118px;
}

.tp-builder-action-btn {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--text-secondary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    cursor: pointer;
    align-self: flex-end;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tp-builder-action-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.tp-builder-action-btn.primary {
    color: var(--text-inverse);
    background: var(--accent);
    border-color: var(--accent);
}

.tp-builder-action-btn.danger {
    color: var(--status-injured);
}

.tp-builder-action-btn:disabled {
    color: var(--text-disabled);
    border-color: var(--ink-line);
    cursor: not-allowed;
}

.tp-builder-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tp-builder-menu-wrap {
    position: relative;
}

.tp-builder-action-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 25;
    display: grid;
    min-width: 12rem;
    padding: 0.35rem;
    background: var(--surface-overlay);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.tp-builder-action-menu[hidden] {
    display: none;
}

.tp-builder-action-menu button {
    width: 100%;
    padding: 0.5rem 0.65rem;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.tp-builder-action-menu button:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--ink-wash);
}

.tp-builder-action-menu button:disabled {
    color: var(--text-disabled);
    cursor: not-allowed;
}

.tp-builder-action-menu button.danger {
    color: var(--status-injured);
}

.tp-builder-workflow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.tp-builder-panel {
    min-width: 0;
    padding: 12px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-builder-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tp-builder-panel-title {
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.tp-builder-panel-sub,
.tp-muted {
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.tp-builder-panel-actions,
.tp-builder-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

.tp-builder-inline-field {
    display: grid;
    gap: 4px;
}

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

.tp-builder-inline-field span {
    color: var(--text-secondary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.tp-builder-inline-form .tp-filter-input {
    width: 110px;
}

.tp-builder-inline-form .tp-filter-select {
    min-width: 132px;
}

#tp-builder-override-replacement {
    width: 160px;
}

.tp-builder-mini-btn {
    min-height: 26px;
    padding: 4px 10px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
}

.tp-builder-mini-btn.primary {
    color: var(--text-inverse);
    background: var(--accent);
    border-color: var(--accent);
}

.tp-builder-mini-btn.danger {
    color: var(--status-injured);
}

.tp-builder-mini-btn.is-confirming {
    color: var(--text-inverse);
    background: var(--status-injured);
    border-color: var(--status-injured);
}

.tp-builder-player-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow: auto;
}

.tp-builder-player-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) 34px 52px;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.72rem;
}

.tp-builder-player-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-builder-player-pos {
    color: var(--text-tertiary);
    font-size: 0.66rem;
}

.tp-builder-min-input {
    width: 52px;
    min-height: 24px;
    color: var(--text-primary);
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.68rem;
    text-align: right;
}

.tp-builder-chip-list,
.tp-builder-objective-list,
.tp-builder-review-body {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.tp-builder-chip-row,
.tp-builder-objective-row,
.tp-builder-delta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    color: var(--text-secondary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
}

.tp-builder-objective-row.status-under {
    border-color: color-mix(in srgb, var(--accent-teal) 28%, var(--ink-line));
}

.tp-builder-objective-row.status-on_target {
    border-color: color-mix(in srgb, var(--success) 34%, var(--ink-line));
}

.tp-builder-objective-row.status-over {
    border-color: color-mix(in srgb, var(--status-injured) 34%, var(--ink-line));
}

.tp-builder-report-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 10px;
    padding: 8px 0 10px;
    border-top: 1px solid var(--ink-line);
    border-bottom: 1px solid var(--ink-line);
}

.tp-builder-report-split span,
.tp-builder-report-split strong,
.tp-builder-report-split small {
    display: block;
}

.tp-builder-report-split span {
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-builder-report-split strong {
    overflow: hidden;
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-builder-report-split small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.tp-builder-delta-row {
    grid-template-columns: minmax(0, 1fr) 52px minmax(120px, auto);
}

.tp-builder-delta-row strong,
.tp-builder-report-table td[class*="status-"] {
    font-variant-numeric: tabular-nums;
}

.tp-builder-delta-row.status-under,
.tp-builder-report-table td.status-under {
    border-color: color-mix(in srgb, var(--accent-teal) 28%, var(--ink-line));
    color: var(--accent-teal);
}

.tp-builder-delta-row.status-on_target,
.tp-builder-report-table td.status-on_target {
    border-color: color-mix(in srgb, var(--success) 32%, var(--ink-line));
    color: var(--success);
}

.tp-builder-delta-row.status-over,
.tp-builder-report-table td.status-over {
    border-color: color-mix(in srgb, var(--status-injured) 32%, var(--ink-line));
    color: var(--status-injured);
}

.tp-builder-delta-row.status-missing,
.tp-builder-report-table td.status-missing {
    color: var(--text-tertiary);
}

.tp-builder-delta-row small {
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.tp-builder-report-table-wrap {
    max-height: 240px;
    overflow: auto;
    margin-top: 10px;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-builder-report-table {
    font-size: 0.72rem;
}

.tp-builder-report-table td:first-child {
    color: var(--text-primary);
    font-weight: 600;
}

.tp-builder-report-table tr.is-missing td {
    color: var(--text-tertiary);
}

.tp-builder-report-json {
    max-height: 220px;
    overflow: auto;
    margin: 10px 0 0;
    padding: 10px;
    color: var(--text-secondary);
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    font-size: 0.66rem;
    line-height: 1.45;
}

.tp-builder-remove-btn {
    font-size: 0.68rem;
}

.tp-builder-total-row {
    font-weight: 700;
    border-top: 2px solid var(--ink-line);
}

.tp-total-label {
    text-align: right;
}

.tp-builder-detail-shell {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--ink-line);
}

/* A quiet second control band under the toolbar: full-bleed hairline seam,
   no fill — recess is reserved for data grids. */
.tp-planner-subbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: -18px -24px 16px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--ink-line);
}

.tp-planner-subbar-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.tp-planner-weeknav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tp-planner-weeknav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--text-secondary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.tp-planner-weeknav button:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.tp-planner-weeknav small,
.tp-planner-weeknav strong {
    display: block;
}

.tp-planner-weeknav small {
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.tp-planner-weeknav strong {
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.tp-planner-match-pill {
    flex: 0 0 auto;
    max-width: 320px;
    overflow: hidden;
    padding: 4px 11px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-planner-player-scope-note {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.tp-planner-player-scope-note strong {
    color: var(--text-primary);
    font-size: 0.74rem;
}

.tp-planner-week-meta {
    display: block;
    margin-top: 3px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    line-height: 1.35;
}

.tp-planner-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
    max-width: none;
}

.tp-planner-source {
    margin-right: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    white-space: normal;
}

.tp-planner-ghost-btn {
    min-height: 28px;
    padding: 5px 12px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.tp-planner-ghost-btn:hover,
.tp-planner-ghost-btn.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.tp-planner-section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 2px 2px 12px;
}

.tp-planner-section-head span {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.tp-planner-section-head small {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 0.68rem;
}

.tp-planner-template-select {
    min-width: 130px;
    height: 28px;
    min-height: 28px;
    font-size: 0.68rem;
}

.tp-planner-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
    margin-bottom: 14px;
}

.tp-planner-day {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
}

.tp-planner-day.is-selected {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--ink-line-strong));
    background: color-mix(in srgb, var(--accent-soft) 22%, var(--surface-recess));
}

.tp-planner-day-resize {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 0.72rem;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: ew-resize;
}

.tp-planner-day-resize::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.18rem;
    width: 0.16rem;
    height: 3rem;
    background: color-mix(in srgb, var(--accent) 46%, var(--ink-line));
    border-radius: var(--radius-pill);
    transform: translateY(-50%);
}

.tp-planner-day-resize:hover::before,
.tp-planner-day.is-resizing .tp-planner-day-resize::before {
    background: var(--accent);
}

.tp-planner-day.is-match {
    border-color: color-mix(in srgb, var(--accent) 44%, var(--ink-line));
}

.tp-planner-day-head,
.tp-planner-slot-head,
.tp-planner-session-head,
.tp-planner-session-metrics,
.tp-planner-day-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.tp-planner-day-head {
    padding: 10px 11px;
    border-bottom: 1px solid var(--ink-line);
}

.tp-planner-day-head button,
.tp-planner-slot-head button,
.tp-planner-session-head button {
    min-width: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tp-planner-day-head button:first-child span,
.tp-planner-day-head button:first-child b,
.tp-planner-day-head button:first-child small {
    display: block;
}

.tp-planner-day-head span {
    color: var(--text-secondary);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-planner-day-head b {
    margin-top: 2px;
    width: fit-content;
    padding: 2px 8px;
    color: var(--text-secondary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
    font-size: 0.6rem;
    font-weight: 800;
}

.tp-planner-day-head small {
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tp-planner-day.is-match .tp-planner-day-head b {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 38%, transparent);
}

.tp-planner-slot-head button {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 0.64rem;
    font-weight: 800;
}

.tp-planner-match-card {
    margin: 10px;
    padding: 10px;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface-field));
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--ink-line));
    border-radius: var(--radius-sm);
}

.tp-planner-match-card span,
.tp-planner-match-card strong,
.tp-planner-match-card small {
    display: block;
}

.tp-planner-match-card span,
.tp-planner-match-card small {
    color: var(--text-secondary);
    font-size: 0.62rem;
}

.tp-planner-match-card strong {
    overflow: hidden;
    margin: 2px 0;
    color: var(--text-primary);
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-planner-slot {
    display: grid;
    gap: 6px;
    padding: 9px 10px 0;
}

.tp-planner-day > .tp-planner-slot:last-of-type {
    padding-bottom: 0.625rem;
}

.tp-planner-slot-head {
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-planner-session-card {
    display: grid;
    gap: 7px;
    padding: 8px 9px;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.tp-planner-session-card:hover {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--ink-line));
}

.tp-planner-session-card.is-current {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--ink-line));
}

.tp-planner-session-card.is-draft {
    border-style: dashed;
}

.tp-planner-session-head button {
    display: block;
}

.tp-planner-session-head button:disabled {
    cursor: default;
}

.tp-planner-session-head span,
.tp-planner-session-head small {
    display: block;
    min-width: 0;
}

.tp-planner-session-head span {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-planner-session-head small,
.tp-planner-session-head em,
.tp-planner-session-meta,
.tp-planner-session-metrics {
    color: var(--text-secondary);
    font-size: 0.62rem;
}

.tp-planner-session-head em {
    flex: 0 0 auto;
    padding: 0.125rem 0.375rem;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
    border-radius: var(--radius-pill);
    color: var(--accent);
    font-style: normal;
    font-weight: 800;
}

.tp-planner-session-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
}

.tp-planner-session-head .tp-planner-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.25rem;
    padding: 0.125rem 0.375rem;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.tp-planner-session-head .tp-planner-card-action.danger {
    color: var(--status-injured);
}

.tp-planner-session-head .tp-planner-card-action.is-confirming {
    background: color-mix(in srgb, var(--status-injured) 14%, transparent);
    border-color: color-mix(in srgb, var(--status-injured) 42%, var(--ink-line));
    color: var(--status-injured);
}

.tp-planner-session-head .tp-planner-card-action:disabled {
    cursor: wait;
}

.tp-planner-session-meta {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-planner-session-metrics {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.tp-planner-session-metrics strong {
    color: var(--text-primary);
    font-weight: 800;
}

.tp-planner-add-session {
    min-height: 2.6rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px dashed var(--ink-line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

.tp-planner-add-session span {
    color: var(--accent);
}

.tp-planner-add-session:hover {
    color: var(--text-primary);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--ink-line));
}

.tp-planner-drill-row[draggable="true"] {
    cursor: grab;
}

.tp-planner-day-footer {
    position: relative;
    margin-top: auto;
    padding: 9px 12px 11px;
    border-top: 1px solid var(--ink-line);
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

#tp-content {
    position: relative;
}

/* The scrim covers everything under the app header. It used to start at the
   sidebar width, but the sidebar is collapsed by default, so a strip of board
   stayed undimmed and the selected day's wash read as a stray light band. */
.tp-session-editor-layer {
    position: fixed;
    top: var(--app-header-height);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: flex;
    justify-content: flex-end;
}

.tp-session-editor-scrim {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--surface-field) 72%, transparent);
    border: 0;
}

.tp-session-editor {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(36rem, calc(100vw - var(--sidebar-width) - 2rem));
    height: 100%;
    flex-direction: column;
    background: var(--surface-field);
    border-left: 1px solid var(--ink-line);
    box-shadow: var(--shadow-lg);
}

.tp-session-editor-head {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--ink-line);
}

.tp-session-editor-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.tp-session-editor-context span {
    color: var(--text-secondary);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
    padding: 0.16rem 0.55rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.55px;
    text-transform: uppercase;
}

.tp-session-editor-close {
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0 0.8rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.tp-session-editor-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1rem 1.15rem;
}

.tp-session-editor-step {
    margin-bottom: 1.25rem;
}

.tp-session-editor-step-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}

.tp-session-editor-step-head b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
}

.tp-session-editor-step-head span {
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.75px;
    text-transform: uppercase;
}

.tp-session-editor-step-head small {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 0.64rem;
    font-weight: 700;
}

.tp-session-editor-drill-list,
.tp-session-participant-list {
    display: grid;
    gap: 0.45rem;
}

.tp-session-participant-list {
    max-height: min(42vh, 34rem);
    overflow: auto;
    padding-right: 0.15rem;
}

.tp-session-editor-drill {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-session-editor-drill[draggable="true"] {
    cursor: grab;
}

.tp-session-editor-drill.is-drop-target {
    border-color: var(--accent-teal);
    background: color-mix(in srgb, var(--accent-teal) 9%, var(--surface-recess));
}

.tp-session-editor-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
    font-size: 0.66rem;
    font-weight: 800;
}

.tp-session-editor-drill strong,
.tp-session-editor-drill small {
    display: block;
    min-width: 0;
}

.tp-session-editor-drill strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-session-editor-drill small,
.tp-session-editor-drill em,
.tp-session-editor-drill b {
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tp-session-drill-players-btn {
    margin-top: 0.3rem;
    padding: 2px 9px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.62rem;
    font-weight: 700;
    cursor: pointer;
}

.tp-session-drill-players-btn.is-partial {
    color: var(--accent);
    border-color: var(--accent);
}

.tp-session-drill-players {
    padding: 0.55rem 0.65rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-session-drill-players-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 700;
}

.tp-session-drill-players-head span {
    margin-right: auto;
}

.tp-session-drill-group.is-in {
    color: var(--text-inverse);
    background: var(--accent);
    border-color: var(--accent);
}

.tp-session-drill-player-grid {
    display: grid;
    max-height: min(30vh, 22rem);
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.3rem 0.55rem;
    overflow: auto;
}

.tp-session-drill-player {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-primary);
    font-size: 0.68rem;
    cursor: pointer;
}

.tp-session-drill-player span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-session-drill-player small {
    color: var(--text-tertiary);
    font-size: 0.6rem;
}

.tp-session-drill-player.is-out span {
    color: var(--text-tertiary);
}

.tp-session-editor-add-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem;
    border: 1px dashed var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-session-editor-add-row small,
.tp-session-editor-empty {
    color: var(--text-tertiary);
    font-size: 0.68rem;
}

.tp-session-participant-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.tp-session-participant-summary span strong {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.tp-session-participant-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem minmax(6.5rem, auto);
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.6rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-session-participant-row strong,
.tp-session-participant-row small {
    display: block;
    min-width: 0;
}

.tp-session-participant-row strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-session-participant-row small {
    color: var(--text-tertiary);
    font-size: 0.62rem;
}

.tp-session-participant-status {
    width: 100%;
    min-height: 1.75rem;
    font-size: 0.66rem;
}

.tp-session-participant-min-label {
    justify-self: end;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tp-session-participant-min-wrap {
    display: grid;
    grid-template-columns: auto 3.8rem;
    align-items: center;
    gap: 0.35rem;
    justify-self: end;
}

.tp-session-participant-min-wrap span {
    color: var(--text-tertiary);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tp-session-participant-row.status-recovery {
    border-color: color-mix(in srgb, var(--status-recovery) 28%, var(--ink-line));
}

.tp-session-participant-row.status-modified {
    border-color: color-mix(in srgb, var(--status-modified) 28%, var(--ink-line));
}

.tp-session-participant-row.status-excluded {
    color: var(--text-tertiary);
    opacity: 0.72;
}

.tp-session-editor-step .tp-builder-panel {
    background: var(--surface-recess);
}

.tp-session-editor-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.85rem 1.15rem;
    border-top: 1px solid var(--ink-line);
}

.tp-planner-matrix,
.tp-planner-players {
    margin-bottom: 12px;
}

.tp-planner-matrix .hub-table th,
.tp-planner-matrix .hub-table td {
    padding: 0.375rem 0.75rem;
    vertical-align: middle;
}

.tp-planner-matrix .hub-table th:first-child {
    text-align: left;
}

.tp-planner-matrix .hub-table td.num,
.tp-planner-matrix .hub-table th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tp-planner-matrix summary {
    display: flex;
    align-items: center;
    gap: 0.5625rem;
    justify-content: flex-start;
    min-width: 10rem;
    cursor: pointer;
    list-style: none;
}

.tp-planner-matrix summary::-webkit-details-marker {
    display: none;
}

.tp-matrix-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
    color: var(--accent);
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    font-style: normal;
    line-height: 1;
}

.tp-matrix-chevron::before {
    content: "›";
}

.tp-planner-matrix details[open] .tp-matrix-chevron::before {
    content: "⌄";
}

.tp-planner-matrix summary span,
.tp-planner-matrix details div span {
    display: block;
}

.tp-planner-matrix summary b {
    display: inline-flex;
    flex: 0 0 auto;
}

.tp-planner-matrix summary b,
.tp-planner-matrix details div {
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 600;
}

.tp-planner-matrix tr.is-match-day td {
    color: var(--text-tertiary);
}

.tp-matrix-session-detail {
    display: grid;
    gap: 3px;
    margin-top: 5px;
}

.tp-matrix-session-detail strong,
.tp-matrix-drill {
    display: block;
}

.tp-matrix-session-detail strong {
    color: var(--text-primary);
    font-size: 0.68rem;
}

.tp-matrix-drill {
    color: var(--text-secondary);
    font-size: 0.64rem;
    font-weight: 500;
}

.tp-planner-total-row th,
.tp-planner-total-row td {
    border-top: 2px solid var(--ink-line);
    font-weight: 800;
}

.tp-planner-total-row th small,
.tp-planner-target-row td span,
.tp-planner-target-row td small {
    display: block;
}

.tp-planner-total-row th small,
.tp-planner-target-row td small {
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: none;
}

.tp-planner-target-row th,
.tp-planner-target-row td {
    color: var(--text-secondary);
}

.tp-planner-pct-row td {
    font-weight: 800;
}

.tp-planner-pct-row td.status-under,
.tp-player-load-cell.status-under b {
    color: var(--accent-teal);
}

.tp-planner-pct-row td.status-on_target,
.tp-player-load-cell.status-on_target b {
    color: var(--success);
}

.tp-planner-pct-row td.status-over,
.tp-player-load-cell.status-over b {
    color: var(--status-injured);
}

.tp-planner-players th span,
.tp-planner-players th small {
    display: block;
}

.tp-planner-players .hub-table {
    display: block;
    width: 100%;
    table-layout: auto;
}

.tp-planner-players .hub-table thead,
.tp-planner-players .hub-table tbody {
    display: block;
}

.tp-planner-players .hub-table tr {
    display: grid;
    grid-template-columns: minmax(14.375rem, 14.375rem) minmax(3.25rem, 3.25rem) repeat(6, minmax(0, 1fr));
    align-items: center;
    min-height: 2.25rem;
    width: 100%;
}

.tp-planner-players .hub-table th,
.tp-planner-players .hub-table td {
    min-width: 0;
    padding: 0.25rem 0.45rem;
    vertical-align: middle;
}

.tp-planner-players th span {
    color: var(--text-primary);
    font-weight: 800;
}

.tp-player-identity {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.tp-player-identity span,
.tp-player-identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-planner-players th small {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    margin-top: 0;
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 600;
}

.tp-player-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.125rem;
    padding: 0.0625rem 0.375rem;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    background: var(--surface-field);
    font-style: normal;
    font-weight: 800;
    line-height: 1;
}

.tp-player-status-pill.status-modified {
    color: var(--status-modified);
    background: color-mix(in srgb, var(--status-modified) 13%, transparent);
    border-color: color-mix(in srgb, var(--status-modified) 30%, transparent);
}

.tp-player-status-pill.status-recovery {
    color: var(--status-recovery);
    background: color-mix(in srgb, var(--status-recovery) 13%, transparent);
    border-color: color-mix(in srgb, var(--status-recovery) 30%, transparent);
}

.tp-player-status-pill.status-differentiated {
    color: var(--status-differentiated);
    background: color-mix(in srgb, var(--status-differentiated) 13%, transparent);
    border-color: color-mix(in srgb, var(--status-differentiated) 30%, transparent);
}

.tp-player-status-pill.status-excluded {
    color: var(--text-tertiary);
    background: transparent;
}

.tp-player-empty-row td {
    grid-column: 1 / -1;
}

.tp-player-load-cell div {
    display: grid;
    gap: 0.1875rem;
    justify-items: end;
    min-width: 0;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.tp-player-load-cell i {
    display: block;
    position: relative;
    height: 0.1875rem;
    width: 2.875rem;
    overflow: hidden;
    background: color-mix(in srgb, var(--text-secondary) 12%, transparent);
    border-radius: var(--radius-pill);
}

.tp-player-load-cell i::before {
    content: '';
    display: block;
    width: var(--tp-player-load-width);
    max-width: 100%;
    height: 100%;
    background: var(--accent-teal);
    border-radius: inherit;
}

.tp-player-load-cell.status-on_target i::before {
    background: var(--success);
}

.tp-player-load-cell.status-over i::before {
    background: var(--status-injured);
}

.tp-player-load-cell.status-missing i {
    background: transparent;
}

.tp-player-load-top,
.tp-player-load-cell b {
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.tp-player-load-top {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.4375rem;
    min-width: 0;
}

.tp-player-load-top strong {
    overflow: hidden;
    color: var(--text-primary);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-player-load-cell b {
    flex: 0 0 auto;
    margin-top: 0;
    color: var(--text-secondary);
    font-size: 0.62rem;
}

.tp-planner-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: color-mix(in srgb, var(--surface-field) 76%, transparent);
}

.tp-planner-modal-inner {
    width: min(1040px, 96vw);
    max-height: 88vh;
    overflow: auto;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 46px color-mix(in srgb, var(--surface-recess) 72%, transparent);
}

.tp-planner-modal-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: var(--surface-chrome);
    border-bottom: 1px solid var(--ink-line-strong);
}

.tp-planner-modal-head span,
.tp-planner-modal-head small {
    display: block;
}

.tp-planner-modal-head span {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 800;
}

.tp-planner-modal-head small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.tp-planner-modal-close {
    min-height: 28px;
    padding: 4px 10px;
    color: var(--text-secondary);
    background: var(--ink-wash);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.tp-target-editor-note {
    margin: 14px 18px 10px;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.tp-target-config-input {
    width: 100%;
    min-height: 28px;
    padding: 4px 8px;
    color: var(--text-primary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.tp-target-config-input:disabled {
    color: var(--text-disabled);
    background: var(--surface-recess);
    border-color: var(--ink-line);
}

.tp-target-editor-modal {
    width: min(64rem, 94vw);
    height: auto;
    max-height: min(42rem, 88vh);
}

.tp-target-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 18px;
}

.tp-target-editor-card {
    min-width: 0;
    padding: 12px;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-target-editor-card.status-under {
    border-color: color-mix(in srgb, var(--accent-teal) 28%, var(--ink-line));
}

.tp-target-editor-card.status-on_target {
    border-color: color-mix(in srgb, var(--success) 32%, var(--ink-line));
}

.tp-target-editor-card.status-over {
    border-color: color-mix(in srgb, var(--status-injured) 32%, var(--ink-line));
}

.tp-target-editor-card-head,
.tp-target-editor-stats,
.tp-target-editor-fields {
    display: grid;
    gap: 8px;
}

.tp-target-editor-card-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.tp-target-editor-card-head span,
.tp-target-editor-card-head small,
.tp-target-editor-stats b,
.tp-target-editor-stats strong,
.tp-target-editor-fields span {
    display: block;
    min-width: 0;
}

.tp-target-editor-card-head span {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-target-editor-card-head small {
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 600;
}

.tp-target-editor-card-head em {
    padding: 2px 7px;
    color: var(--text-secondary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.tp-target-editor-card.status-under .tp-target-editor-card-head em {
    color: var(--accent-teal);
    background: color-mix(in srgb, var(--accent-teal) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent-teal) 26%, transparent);
}

.tp-target-editor-card.status-on_target .tp-target-editor-card-head em {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, transparent);
    border-color: color-mix(in srgb, var(--success) 26%, transparent);
}

.tp-target-editor-card.status-over .tp-target-editor-card-head em {
    color: var(--status-injured);
    background: color-mix(in srgb, var(--status-injured) 12%, transparent);
    border-color: color-mix(in srgb, var(--status-injured) 26%, transparent);
}

.tp-target-editor-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 10px;
}

.tp-target-editor-stats span {
    min-width: 0;
    padding: 7px;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-target-editor-stats b {
    color: var(--text-tertiary);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.55px;
    text-transform: uppercase;
}

.tp-target-editor-stats strong {
    overflow: hidden;
    margin-top: 3px;
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-target-editor-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
}

.tp-target-editor-fields label {
    min-width: 0;
}

.tp-target-editor-fields span {
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 800;
}

.tp-planner-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px 18px;
}

.tp-template-modal {
    width: min(820px, 94vw);
}

.tp-duplicate-modal {
    width: min(420px, 94vw);
}

.tp-duplicate-body {
    padding: 16px 18px 4px;
}

.tp-duplicate-body .tp-filter-input {
    width: 180px;
}

.tp-template-tabs {
    margin: 14px 18px 0;
    width: fit-content;
}

.tp-template-save-panel {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin: 14px 18px;
    padding: 12px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-template-save-panel .tp-filter-input {
    width: 100%;
}

.tp-template-list {
    display: grid;
    gap: 8px;
    padding: 0 18px 18px;
}

.tp-template-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-template-card span,
.tp-template-card small {
    display: block;
    min-width: 0;
}

.tp-template-card span {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-template-card small,
.tp-template-card em,
.tp-template-empty {
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.tp-template-card em {
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}

.tp-template-card-actions {
    display: flex;
    gap: 6px;
}

.tp-template-empty {
    padding: 14px;
    background: var(--surface-recess);
    border: 1px dashed var(--ink-line);
    border-radius: var(--radius-sm);
    text-align: center;
}

.tp-drill-library-modal {
    width: min(78rem, 96vw);
}

.tp-library-controls {
    display: grid;
    grid-template-columns: minmax(9rem, 0.8fr) minmax(9rem, 0.8fr) minmax(16rem, 1fr) auto auto;
    gap: 0.65rem;
    align-items: end;
    padding: 0.9rem 1.1rem;
    background: var(--surface-chrome);
    border-bottom: 1px solid var(--ink-line);
}

.tp-library-controls .tp-filter-input,
.tp-library-controls .hub-select {
    width: 100%;
}

.tp-library-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.46fr);
    min-height: 28rem;
}

.tp-library-results {
    display: grid;
    align-content: start;
    gap: 0.45rem;
    max-height: 64vh;
    overflow: auto;
    padding: 0.9rem 1.1rem 1.1rem;
    border-right: 1px solid var(--ink-line);
}

.tp-library-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5rem 5.4rem 4.5rem 5.2rem 6.2rem auto;
    gap: 0.55rem;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.5rem 0.65rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.tp-library-row strong,
.tp-library-row small {
    display: block;
    min-width: 0;
}

.tp-library-row strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-library-row small {
    margin-top: 2px;
    color: var(--text-tertiary);
}

.tp-library-row em {
    overflow: hidden;
    color: var(--text-secondary);
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-library-sample {
    overflow: hidden;
    color: var(--text-tertiary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-library-pitch {
    overflow: hidden;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-library-config {
    min-width: 0;
    max-height: 64vh;
    overflow: auto;
    padding: 0.9rem 1.1rem 1.1rem;
    background: var(--surface-field);
}

.tp-library-config-empty {
    display: flex;
    min-height: 11rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--text-secondary);
    background: var(--surface-recess);
    border: 1px dashed var(--ink-line);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    text-align: center;
}

.tp-library-config-head {
    margin-bottom: 0.75rem;
}

.tp-library-config-head span,
.tp-library-config-head small,
.tp-library-config-grid label span,
.tp-library-config-identity label span,
.tp-library-manual-grid label span {
    display: block;
}

.tp-library-config-head span {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-library-config-head small {
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.tp-library-config-grid,
.tp-library-config-identity,
.tp-library-manual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.8rem;
}

.tp-library-config-identity {
    grid-template-columns: minmax(0, 1fr);
}

.tp-library-config-grid label,
.tp-library-config-identity label,
.tp-library-manual-grid label {
    min-width: 0;
}

.tp-library-config-grid label {
    transition: filter 160ms ease;
}

.tp-library-config-grid label.is-estimate-ignored {
    filter: saturate(0.6);
}

.tp-library-config-grid label.is-estimate-ignored span {
    color: var(--text-tertiary);
}

.tp-library-config-grid label.is-estimate-ignored input {
    background: color-mix(in srgb, var(--surface-field) 62%, var(--surface-recess));
    border-color: var(--ink-line);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.tp-library-config-note {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-tertiary);
    font-size: 0.56rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.tp-library-config-grid label span,
.tp-library-config-identity label span,
.tp-library-manual-grid label span {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.55px;
    text-transform: uppercase;
}

.tp-library-manual-load {
    margin: 0.1rem 0 0.85rem;
    padding: 0.65rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-library-manual-load summary {
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.tp-library-manual-grid {
    margin: 0.65rem 0 0;
}

.tp-library-config-preview {
    min-height: 7rem;
    margin-top: 0.65rem;
    padding: 0.7rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-library-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.tp-library-preview-head span {
    color: var(--text-primary);
    font-size: 0.74rem;
    font-weight: 800;
}

.tp-library-preview-head small {
    color: var(--text-tertiary);
    font-size: 0.62rem;
}

.tp-library-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.tp-library-preview-grid span {
    min-width: 0;
    padding: 0.45rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-library-preview-grid b,
.tp-library-preview-grid strong {
    display: block;
}

.tp-library-preview-grid b {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.45px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.tp-library-preview-grid strong {
    margin-top: 0.18rem;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.tp-library-preview-grid small {
    color: var(--text-secondary);
    font-size: 0.56rem;
}

/* What the name search actually matched, when it was not what was typed. */
.tp-library-search-notice {
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.55rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.64rem;
}

/* Where the estimate came from. A number taken from the drill's own recordings
   and a number taken from a grab-bag category must not read the same. */
.tp-library-preview-source {
    margin-top: 0.5rem;
    color: var(--text-tertiary);
    font-size: 0.6rem;
    line-height: 1.35;
}

.tp-library-config-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.tp-loading.compact,
.tp-empty.compact {
    min-height: 120px;
}

/* ── Video Upload Modal ──────────────────────────────────────────────── */

.tp-upload-modal {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--surface-field) 76%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tp-upload-modal-inner {
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 620px;
    box-shadow: var(--shadow-modal);
}

.tp-upload-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ink-line-strong);
}

.tp-upload-modal-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tp-upload-modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.tp-upload-modal-close:hover {
    color: var(--text-primary);
}

.tp-upload-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tp-upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.tp-upload-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#tp-upload-file {
    font-size: 0.78rem;
    min-width: 220px;
    padding: 6px 10px;
}

#tp-upload-file::file-selector-button {
    background: var(--surface-raised);
    color: var(--text-primary);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    padding: 5px 14px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s;
}

#tp-upload-file::file-selector-button:hover {
    background: var(--accent);
    color: var(--white);
}

#tp-upload-date {
    cursor: pointer;
    min-width: 150px;
}

#tp-upload-notes {
    min-width: 220px;
    width: 100%;
}

/* ── Custom Drill List (Upload Modal) ───────────────────────────────── */

.tp-drill-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    background: var(--surface-chrome);
}

.tp-drill-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--ink-line);
    font-size: 0.8rem;
}

.tp-drill-item:last-child {
    border-bottom: none;
}

.tp-drill-item:hover {
    background: var(--ink-wash);
}

.tp-drill-item.selected {
    background: rgba(var(--accent-rgb), 0.1);
}

.tp-drill-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    flex-shrink: 0;
    border: 1.5px solid var(--text-tertiary);
    background: transparent;
}

.tp-drill-dot.uploaded {
    background: var(--tp-uploaded);
    border-color: var(--tp-uploaded);
}

.tp-drill-item-label {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-drill-item-info {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Manage Videos Modal ─────────────────────────────────────────────── */

.tp-drill-search-row {
    padding: 6px 12px 4px;
}

.tp-drill-search {
    width: 100%;
    padding: 6px 10px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-4);
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
}

.tp-drill-search:focus {
    border-color: var(--accent);
}

.tp-drill-search::placeholder {
    color: var(--text-tertiary);
}

.tp-manage-delete-btn {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 4px 10px;
    border-radius: var(--radius-4);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tp-manage-delete-btn:hover {
    background: var(--danger);
    color: var(--white);
}

.tp-manage-delete-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── Drill Comparison ─────────────────────────────────────────────────── */

.tp-comp-focus-row {
    background: rgba(3, 71, 82, 0.15);
}

.tp-comp-focus-row-b {
    background: rgba(var(--accent-rgb), 0.12);
}

.tp-comp-delta {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.3;
}

.tp-comp-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 16px;
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.tp-comp-context strong {
    color: var(--text-primary);
}

.tp-comp-context-main,
.tp-comp-context-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tp-comp-context-actions {
    margin-left: auto;
}

.tp-comp-selection-label {
    font-size: 0.74rem;
    color: var(--text-tertiary);
}

.tp-comp-match-note {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: rgba(var(--accent-rgb), 0.14);
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
}

.tp-comp-group-btn {
    background: transparent;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.tp-comp-group-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.tp-comp-group-btn.active[data-comp-group="A"] {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--white);
}

.tp-comp-group-btn.active[data-comp-group="B"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--tp-accent-text);
}

.tp-comp-avg-row td {
    font-weight: 700;
    border-top: 2px solid var(--ink-line);
    color: var(--text-secondary);
}

.tp-comp-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: var(--radius-circle);
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--ink-line-strong);
    color: var(--text-primary);
}

.tp-comp-badge-a {
    background: var(--accent-dark);
    color: var(--white);
}

.tp-comp-badge-b {
    background: var(--accent);
    color: var(--tp-accent-text);
}

.tp-comp-excl-btn {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: var(--radius-circle);
    font-size: 1rem;
    color: var(--text-tertiary);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.tp-comp-excl-btn:hover {
    opacity: 1;
    color: var(--danger-strong);
}

.tp-comp-excluded-row td {
    opacity: 0.35;
    text-decoration: line-through;
}

.tp-comp-excluded-row .tp-comp-excl-btn {
    opacity: 0.8;
    color: var(--success);
    text-decoration: none;
}

.tp-comp-expand {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    transition: color 0.15s;
}

.tp-comp-expand:hover {
    color: var(--text-primary);
}

.tp-comp-set-row td {
    font-size: 0.75rem;
    padding-top: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--ink-line);
}

.tp-comp-restore-btn {
    margin-left: auto;
    background: none;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    padding: 2px 10px;
    font-size: 0.7rem;
    cursor: pointer;
}

.tp-comp-restore-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

/* ============================================================================
   SESSION PLANNER — PARTICIPATION-FIRST FLOW
   Step 1 squad call, step 2 timeline and exceptions, step 3 review, plus the
   drill load popover and the player path drawer.
   ========================================================================= */

.tp-session-editor {
    width: min(80rem, calc(100vw - var(--sidebar-width) - 2rem));
}

/* ── One header bar ────────────────────────────────────────────────────────
   The drawer opens on content: context, name, clock and step share a single
   62px bar, and the load appears under it only once the session costs
   something. */

.tp-session-editor-head {
    padding: 0;
}

.tp-session-editor-bar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: var(--module-toolbar-height);
    padding: 0 1.15rem;
    background: var(--surface-chrome);
}

.tp-session-editor-bar .tp-session-editor-context {
    flex: 0 0 auto;
    margin-bottom: 0;
    flex-wrap: nowrap;
}

.tp-session-editor-context span.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.tp-session-editor-identity {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}

.tp-session-editor-name {
    width: auto;
    max-width: 22rem;
    min-width: 6rem;
    margin: 0;
    padding: 0.2rem 0.35rem;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    text-overflow: ellipsis;
}

.tp-session-editor-name:hover {
    border-color: var(--ink-line);
}

.tp-session-editor-name:focus {
    background: var(--surface-field);
    border-color: var(--border-focus);
    outline: none;
}

.tp-session-editor-time,
.tp-session-editor-time.hub-time-trigger {
    min-height: auto;
    padding: 0.2rem 0.35rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.tp-session-editor-time.hub-time-trigger:hover {
    color: var(--text-primary);
    border-color: var(--ink-line-strong);
}

.tp-session-editor-time.hub-time-trigger.is-empty {
    color: var(--text-tertiary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tp-session-editor-identity em {
    flex: 0 0 auto;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Load strip ───────────────────────────────────────────────────────── */

.tp-load-strip {
    display: flex;
    align-items: stretch;
    height: 46px;
    background: var(--surface-raised);
    border-top: 1px solid var(--ink-line);
}

.tp-load-strip-zone {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
    min-width: 12rem;
    padding: 0 1.15rem;
    border-right: 1px solid var(--ink-line);
}

.tp-load-strip-zone span {
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.55px;
    text-transform: uppercase;
}

.tp-load-strip-zone small {
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 600;
}

.tp-load-strip-metrics {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tp-load-strip-metric {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0 0.9rem;
    border-right: 1px solid var(--ink-line);
}

.tp-load-strip-metric:last-child {
    border-right: none;
}

.tp-load-strip-key {
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.tp-load-strip-metric strong {
    margin-left: auto;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
}

.tp-load-strip-metric strong i {
    color: var(--text-secondary);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 600;
}

.tp-load-strip-metric em {
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-style: normal;
    font-variant-numeric: tabular-nums;
}

/* ── Step indicator ────────────────────────────────────────────────────── */

.tp-step-indicator {
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.tp-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    color: var(--text-tertiary);
    background: transparent;
    border: 0;
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.tp-step b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--text-tertiary);
    background: var(--surface-raised);
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 800;
}

.tp-step.is-done {
    color: var(--text-secondary);
}

.tp-step.is-done b {
    color: var(--text-primary);
    background: var(--ink-line);
}

.tp-step.is-active {
    color: var(--accent);
    background: var(--accent-soft);
}

.tp-step.is-active b {
    color: var(--surface-field);
    background: var(--accent);
}

.tp-step-indicator u {
    display: block;
    width: 1.5rem;
    height: 1px;
    background: var(--ink-line);
}

.tp-step-body {
    padding: 1rem 1.15rem 1.25rem;
}

.tp-step-extras {
    margin-top: 1rem;
    border-top: 1px solid var(--ink-line);
    padding-top: 0.75rem;
}

.tp-step-extras > summary {
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.tp-step-extras > summary::-webkit-details-marker {
    display: none;
}

.tp-step-foot-summary {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
}

.tp-step-foot-summary b {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.tp-step-foot-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* The remove action sits away from the save actions so it is not a mis-click. */
.tp-step-foot-actions .tp-builder-mini-btn.danger {
    margin-right: 0.75rem;
}

/* ── Squad call ────────────────────────────────────────────────────────── */

.tp-squad-banner {
    margin-bottom: 1rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.9rem;
}

.tp-squad-banner-main {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tp-squad-banner-title {
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.tp-squad-banner-sub {
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.5;
}

.tp-squad-banner-sub b {
    color: var(--text-primary);
}

.tp-squad-banner-actions {
    display: flex;
    gap: 0.45rem;
    margin-left: auto;
}

.tp-squad-review-list {
    margin-top: 0.7rem;
    border-top: 1px solid var(--ink-line);
    padding-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tp-squad-review-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6rem minmax(0, 1.4fr) auto;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
}

.tp-squad-review-row em {
    color: var(--accent);
    font-style: normal;
    font-weight: 700;
}

.tp-squad-review-row small {
    color: var(--text-tertiary);
}

.tp-squad-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.tp-squad-dot.is-caution {
    background: var(--status-modified);
}

.tp-squad-dot.is-out {
    background: var(--status-injured);
}

.tp-squad-dot.is-quiet {
    background: var(--text-tertiary);
}

.tp-squad-dot.is-accent {
    background: var(--accent);
}

.tp-squad-lanes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tp-squad-lane {
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.tp-squad-lane.is-drop-target {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.tp-squad-lane-head {
    padding: 0.7rem 0.75rem;
    background: var(--surface-chrome);
    border-right: 1px solid var(--ink-line);
}

.tp-squad-lane-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tp-squad-lane-name em {
    color: var(--text-tertiary);
    font-style: normal;
    font-variant-numeric: tabular-nums;
}

.tp-squad-lane-hint {
    margin-top: 0.3rem;
    color: var(--text-tertiary);
    font-size: 0.62rem;
    line-height: 1.4;
}

.tp-squad-lane-body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.6rem;
}

.tp-squad-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    color: var(--text-primary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: grab;
}

.tp-squad-chip:hover {
    border-color: var(--accent);
}

.tp-squad-chip em {
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.tp-squad-chip b {
    padding: 0.05rem 0.45rem;
    color: var(--text-secondary);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font-size: 0.58rem;
    font-weight: 600;
}

/* ── Participation strip (footer and board card) ───────────────────────── */

.tp-planner-drill-list {
    display: grid;
    gap: 0.3125rem;
}

.tp-planner-drill-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.3125rem 0.375rem;
    color: var(--text-secondary);
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    font-size: 0.66rem;
}

.tp-planner-drill-row[draggable="true"] {
    cursor: grab;
}

.tp-planner-drill-row.is-drop-target {
    border-color: var(--accent-teal);
    background: color-mix(in srgb, var(--accent-teal) 10%, var(--surface-recess));
}

/* The board drill row is a button so it can open the drill load popover. */
.tp-planner-drill-name {
    width: 100%;
    padding: 0;
    overflow: hidden;
    color: var(--text-primary);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.tp-planner-drill-name:hover {
    color: var(--accent);
}

.tp-planner-day.is-selected .tp-planner-drill-name {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.tp-planner-drill-more {
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center;
    white-space: nowrap;
}

.tp-planner-empty-slot {
    padding: 8px;
    color: var(--text-tertiary);
    background: color-mix(in srgb, var(--surface-field) 52%, transparent);
    border: 1px dashed var(--ink-line);
    border-radius: var(--radius-sm);
    font-size: 0.66rem;
    text-align: center;
}

.tp-planner-card-participation {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--ink-line);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ── Session build toolbar ─────────────────────────────────────────────── */

.tp-build-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.tp-build-views {
    display: inline-flex;
    gap: 0.15rem;
    padding: 0.15rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
}

.tp-build-view-btn {
    padding: 0.3rem 0.75rem;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}

.tp-build-view-btn.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.tp-build-actions {
    display: flex;
    gap: 0.45rem;
    margin-left: auto;
}

/* ── Timeline ──────────────────────────────────────────────────────────── */

.tp-timeline {
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.tp-tl-head,
.tp-tl-row {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
}

.tp-tl-head {
    background: var(--surface-raised);
    border-bottom: 1px solid var(--ink-line);
}

.tp-tl-head .tp-tl-lane-head {
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-tl-lane-head {
    padding: 0.55rem 0.7rem;
    border-right: 1px solid var(--ink-line);
}

.tp-tl-lane-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
}

.tp-tl-lane-head small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-tertiary);
    font-size: 0.6rem;
    line-height: 1.35;
}

.tp-tl-lane-head .tp-builder-mini-btn {
    margin-top: 0.35rem;
}

.tp-tl-axis {
    position: relative;
    height: 1.85rem;
}

.tp-tl-axis span {
    position: absolute;
    top: 0.55rem;
    transform: translateX(-50%);
    color: var(--text-tertiary);
    font-size: 0.6rem;
    font-variant-numeric: tabular-nums;
}

.tp-tl-row {
    border-bottom: 1px solid var(--ink-line);
    min-height: 3.4rem;
}

.tp-tl-row:last-child {
    border-bottom: 0;
}

.tp-tl-row.is-team {
    background: color-mix(in srgb, var(--surface-chrome) 55%, transparent);
}

.tp-tl-track {
    position: relative;
    padding: 0.45rem 0;
}

.tp-tl-block {
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    display: flex;
    align-items: stretch;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.tp-tl-block.is-attend {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.tp-tl-block.is-attend .tp-tl-block-name {
    color: var(--accent);
}

.tp-tl-block.is-own {
    background: var(--surface-raised);
}

.tp-tl-block.is-medical {
    background: var(--surface-recess);
    border-style: dashed;
}

.tp-tl-block.is-drop-target {
    border-color: var(--accent);
}

.tp-tl-block-face {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.35rem 0.5rem;
    color: var(--text-primary);
    background: none;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tp-tl-block-face:disabled {
    cursor: default;
}

.tp-tl-block-name {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-tl-block-meta {
    display: flex;
    gap: 0.45rem;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.58rem;
    white-space: nowrap;
}

.tp-tl-block-meta em {
    color: var(--text-secondary);
    font-style: normal;
    font-variant-numeric: tabular-nums;
}

.tp-tl-block-remove {
    flex: 0 0 auto;
    width: 1.1rem;
    color: var(--text-tertiary);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
}

.tp-tl-block-remove:hover {
    color: var(--status-injured);
}

.tp-tl-block-resize {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0.3rem;
    cursor: col-resize;
}

.tp-tl-block-resize:hover {
    background: color-mix(in srgb, var(--accent) 35%, transparent);
}

.tp-tl-ghost {
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    display: flex;
    align-items: center;
    padding: 0 0.6rem;
    color: var(--text-tertiary);
    background: transparent;
    border: 1px dashed var(--ink-line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.62rem;
    white-space: nowrap;
    cursor: pointer;
}

.tp-tl-ghost:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.tp-tl-coverage {
    background: var(--surface-chrome);
    border-top: 1px solid var(--ink-line);
    min-height: 2.4rem;
}

.tp-tl-coverage .tp-tl-lane-head {
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-tl-coverage-cell {
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    font-size: 0.62rem;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
}

.tp-tl-coverage-cell b {
    color: var(--text-primary);
    margin-right: 0.2rem;
}

.tp-tl-coverage-cell.is-short {
    color: var(--status-modified);
    border-color: color-mix(in srgb, var(--status-modified) 45%, transparent);
}

.tp-tl-coverage-cell.is-short b {
    color: var(--status-modified);
}

.tp-tl-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.6rem;
    color: var(--text-tertiary);
    font-size: 0.62rem;
}

.tp-tl-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tp-tl-key {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-tl-key.is-team {
    background: var(--surface-field);
}

.tp-tl-key.is-attend {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.tp-tl-key.is-own {
    background: var(--surface-raised);
}

.tp-tl-key.is-medical {
    background: var(--surface-recess);
    border-style: dashed;
}

.tp-tl-empty {
    padding: 2rem 1rem;
    color: var(--text-secondary);
    background: var(--surface-recess);
    border: 1px dashed var(--ink-line);
    border-radius: var(--radius-md);
    text-align: center;
}

.tp-tl-empty small {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-tertiary);
    font-size: 0.65rem;
}

/* ── Exceptions grid ───────────────────────────────────────────────────── */

.tp-exception-head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tp-exception-head small {
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.tp-exception-table th em {
    display: block;
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: none;
}

.tp-exception-table tbody th {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-align: left;
}

.tp-exception-name {
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
}

.tp-exception-table tbody th small {
    color: var(--text-tertiary);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.tp-exception-cell {
    text-align: center;
}

.tp-exception-box {
    display: inline-flex;
    cursor: pointer;
}

.tp-exception-box input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tp-exception-box i {
    display: block;
    width: 0.85rem;
    height: 0.85rem;
    background: transparent;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-exception-box input:checked + i {
    background: var(--accent);
    border-color: var(--accent);
}

.tp-exception-na {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.tp-exception-own {
    color: var(--text-secondary);
    font-size: 0.66rem;
}

.tp-exception-own span {
    display: inline-block;
    margin-right: 0.45rem;
}

.tp-exception-own b {
    color: var(--text-primary);
}

.tp-exception-own .tp-builder-mini-btn {
    margin-left: 0.25rem;
}

.tp-exception-load {
    color: var(--text-primary);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.tp-exception-load em {
    display: block;
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.6rem;
}

.tp-lane-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    color: var(--text-secondary);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tp-lane-pill.lane-partial,
.tp-lane-pill.lane-modified {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.tp-lane-pill.lane-out {
    color: var(--status-injured);
    border-color: color-mix(in srgb, var(--status-injured) 40%, transparent);
}

/* ── Review table ──────────────────────────────────────────────────────── */

.tp-review-table tbody tr.tp-review-group td {
    color: var(--text-tertiary);
    background: var(--surface-chrome);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-review-name {
    color: var(--text-primary);
    font-weight: 700;
}

.tp-review-dots {
    display: inline-flex;
    gap: 0.2rem;
}

.tp-review-dots i {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    background: transparent;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-review-dots i.is-in {
    background: var(--accent);
    border-color: var(--accent);
}

/* ── Drill load popover ────────────────────────────────────────────────── */

.tp-pop-layer {
    position: fixed;
    inset: 0;
    z-index: 92;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--surface-field) 45%, transparent);
}

.tp-pop {
    width: 22rem;
    max-width: calc(100vw - 2rem);
    padding: 0.85rem 0.9rem;
    background: var(--surface-overlay);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.tp-pop-head {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--ink-line);
}

.tp-pop-name {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.tp-pop-params {
    margin-top: 0.25rem;
    color: var(--text-tertiary);
    font-size: 0.63rem;
}

.tp-pop-close {
    margin-left: auto;
    padding: 0;
    color: var(--text-tertiary);
    background: none;
    border: 0;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.tp-pop-scopes {
    display: flex;
    gap: 0.15rem;
    margin: 0.7rem 0 0.6rem;
    padding: 0.15rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
}

.tp-pop-scopes button {
    flex: 1;
    padding: 0.28rem;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.64rem;
    font-weight: 600;
    cursor: pointer;
}

.tp-pop-scopes button.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.tp-pop-positions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
}

.tp-pop-positions button {
    padding: 0.15rem 0.5rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.6rem;
    cursor: pointer;
}

.tp-pop-positions button.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.tp-pop-positions small {
    flex: 1 0 100%;
    color: var(--text-tertiary);
    font-size: 0.58rem;
}

.tp-pop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

.tp-pop-tile {
    padding: 0.5rem 0.55rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-pop-label {
    display: block;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.tp-pop-tile strong {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.tp-pop-tile strong i {
    color: var(--text-secondary);
    font-style: normal;
    font-size: 0.58rem;
    font-weight: 500;
}

.tp-pop-tile small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-tertiary);
    font-size: 0.57rem;
}

.tp-pop-foot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--ink-line);
    color: var(--text-tertiary);
    font-size: 0.58rem;
}

.tp-pop-foot-actions {
    display: flex;
    gap: 0.3rem;
    margin-left: auto;
}

/* ── Player path drawer ────────────────────────────────────────────────── */

.tp-path-layer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    justify-content: flex-end;
}

.tp-path {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(26rem, calc(100vw - 2rem));
    height: 100%;
    flex-direction: column;
    background: var(--surface-field);
    border-left: 1px solid var(--ink-line);
    box-shadow: var(--shadow-lg);
}

.tp-path-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--ink-line);
}

.tp-path-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
}

.tp-path-name {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
}

.tp-path-meta {
    margin-top: 0.15rem;
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.tp-path-head .tp-session-editor-close {
    margin-left: auto;
}

.tp-path-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.9rem 1rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tp-path-section-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.55px;
    text-transform: uppercase;
}

.tp-path-section-head small {
    margin-left: auto;
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

/* margin-left:auto suits a short count like "1 of 1". A caption that explains
   what the section means is too long for the space left beside the heading and
   breaks into a ragged column, so it takes its own line. */
.tp-path-section-head.is-stacked {
    display: block;
}

.tp-path-section-head.is-stacked small {
    display: block;
    margin: 0.2rem 0 0;
}

/* Six lanes do not fit one row in a 26rem drawer. As a wrapping pill the last
   button sat on its own row and stretched past the rounded edge, so this is a
   fixed grid instead: two rows of three inside one square-cornered well. The
   active treatment is the same as .tp-roster-seg, which is the segmented
   control this reads as. */
.tp-path-lanes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.15rem;
    padding: 0.18rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
}

.tp-path-lanes button {
    min-width: 0;
    padding: 0.32rem 0.35rem;
    color: var(--text-secondary);
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.62rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.tp-path-lanes button:hover {
    color: var(--text-primary);
}

.tp-path-lanes button.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.tp-path-constraints {
    padding: 0.65rem 0.7rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
}

.tp-path-constraints ul {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    padding-left: 0.9rem;
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.tp-path-drills {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tp-path-drill {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.6rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    cursor: pointer;
}

.tp-path-drill.is-in {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}

.tp-path-drill.is-off {
    opacity: 0.55;
    cursor: default;
}

.tp-path-drill span {
    flex: 1;
    color: var(--text-primary);
}

.tp-path-drill em {
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.62rem;
    font-variant-numeric: tabular-nums;
}

.tp-path-own {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tp-path-own-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.6rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-path-own-row.is-medical {
    background: var(--surface-recess);
    border-style: dashed;
}

.tp-path-own-row b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--text-secondary);
    background: var(--surface-raised);
    border-radius: 50%;
    font-size: 0.58rem;
}

.tp-path-own-row span {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 600;
}

.tp-path-own-row span em {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.6rem;
    font-weight: 500;
}

.tp-path-own-row i {
    color: var(--text-secondary);
    font-style: normal;
    font-size: 0.65rem;
    font-variant-numeric: tabular-nums;
}

.tp-path-own-add {
    padding: 0.5rem;
    color: var(--text-tertiary);
    background: transparent;
    border: 1px dashed var(--ink-line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.66rem;
    cursor: pointer;
}

.tp-path-own-add:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.tp-path-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

.tp-path-stat {
    padding: 0.5rem 0.55rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-path-stat > span:first-child {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.tp-path-stat strong {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.tp-path-stat strong i {
    color: var(--text-secondary);
    font-style: normal;
    font-size: 0.58rem;
    font-weight: 500;
}

.tp-path-stat small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-tertiary);
    font-size: 0.57rem;
}

/* ── Squad call selection ──────────────────────────────────────────────── */

.tp-squad-lane-select {
    margin-top: 0.45rem;
    padding: 0.15rem 0.5rem;
    color: var(--text-tertiary);
    background: transparent;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.6rem;
    font-weight: 700;
    cursor: pointer;
}

.tp-squad-lane-select:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.tp-squad-chip {
    padding: 0;
    overflow: hidden;
}

.tp-squad-chip.is-selected {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.tp-squad-chip-face {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.2rem 0.35rem 0.7rem;
    color: inherit;
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}

/* ── Step 1 roster table ───────────────────────────────────────────────────
   One grouped table replaces six lanes: every player starts in Full team, an
   empty status costs one line, and the bulk bar appears only on selection. */

.tp-roster-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.tp-roster-title {
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.tp-roster-toolbar > small {
    color: var(--text-tertiary);
    font-size: 0.68rem;
}

.tp-roster-search {
    min-width: 11rem;
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    color: var(--text-primary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.7rem;
}

.tp-roster-search:focus {
    border-color: var(--border-focus);
    outline: none;
}

.tp-roster-seg {
    display: flex;
    gap: 0.15rem;
    padding: 0.18rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
}

.tp-roster-seg button {
    padding: 0.25rem 0.7rem;
    color: var(--text-secondary);
    background: none;
    border: 0;
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.66rem;
    font-weight: 600;
    cursor: pointer;
}

.tp-roster-seg button.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.tp-roster-prefill {
    position: relative;
}

.tp-roster-prefill-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 6;
    min-width: 15rem;
    padding: 0.4rem;
    background: var(--surface-overlay);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.tp-roster-prefill-head {
    padding: 0.3rem 0.45rem;
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-roster-prefill-menu button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.45rem;
    color: var(--text-primary);
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.7rem;
    text-align: left;
    cursor: pointer;
}

.tp-roster-prefill-menu button:hover {
    background: var(--ink-wash);
}

.tp-roster-prefill-menu button em {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-style: normal;
}

.tp-roster-prefill-menu .tp-muted {
    padding: 0.3rem 0.45rem 0.5rem;
    font-size: 0.66rem;
}

.tp-roster-wrap {
    position: relative;
}

.tp-roster-table td {
    vertical-align: middle;
}

.tp-roster-table tr.is-selected > td {
    background: var(--accent-soft);
}

th.tp-roster-check,
td.tp-roster-check {
    width: 2.2rem;
}

.tp-roster-box {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.tp-roster-box input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tp-roster-box i {
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    background: transparent;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-4);
}

.tp-roster-box input:checked + i {
    background: var(--accent);
    border-color: var(--accent);
}

.tp-roster-name {
    padding: 0;
    color: var(--text-primary);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.tp-roster-name:hover {
    color: var(--accent);
}

.tp-roster-name em {
    margin-left: 0.4rem;
    color: var(--text-tertiary);
    font-size: 0.6rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.tp-roster-note {
    display: block;
    margin-top: 0.1rem;
    color: var(--text-tertiary);
    font-size: 0.64rem;
}

.tp-roster-detail,
.tp-roster-source {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.tp-roster-source {
    color: var(--text-tertiary);
}

.tp-roster-status-wrap {
    position: relative;
}

.tp-roster-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.55rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    cursor: pointer;
}

.tp-roster-pill:hover,
.tp-roster-pill.is-open {
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.tp-roster-pill.lane-partial {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.tp-roster-pill em {
    color: var(--text-tertiary);
    font-size: 0.55rem;
    font-style: normal;
}

.tp-roster-status-menu {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    z-index: 6;
    min-width: 14rem;
    padding: 0.3rem;
    background: var(--surface-overlay);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.tp-roster-status-menu button {
    display: block;
    width: 100%;
    padding: 0.35rem 0.45rem;
    color: var(--text-primary);
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tp-roster-status-menu button:hover {
    background: var(--ink-wash);
}

.tp-roster-status-menu button.is-active {
    color: var(--accent);
}

.tp-roster-status-menu button span {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
}

.tp-roster-status-menu button small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.62rem;
}

.tp-roster-table tr.tp-roster-group > td {
    padding: 0.4rem 0.75rem;
    color: var(--text-secondary);
    background: var(--surface-chrome);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.tp-roster-table tr.tp-roster-group.is-empty > td {
    opacity: 0.55;
}

.tp-roster-table tr.tp-roster-group > td b {
    color: var(--text-primary);
}

.tp-roster-table tr.tp-roster-group > td span {
    margin-left: 0.6rem;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.tp-roster-group-select {
    float: right;
    padding: 0;
    color: var(--accent);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}

.tp-roster-table tr.tp-roster-more > td {
    padding: 0.35rem 0.75rem 0.35rem 3rem;
    background: transparent;
}

.tp-roster-more button {
    padding: 0;
    color: var(--accent);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.66rem;
    cursor: pointer;
}

/* Bulk change on demand: the bar floats over the table while rows are picked. */
.tp-roster-select-bar {
    position: sticky;
    bottom: 0.6rem;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.6rem 0.6rem 0;
    padding: 0.45rem 0.5rem 0.45rem 0.9rem;
    background: var(--surface-overlay);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lg);
}

.tp-roster-select-count {
    color: var(--text-primary);
    font-size: 0.7rem;
    white-space: nowrap;
}

.tp-roster-select-label {
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-roster-select-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tp-roster-select-bar .tp-builder-mini-btn.quiet {
    margin-left: auto;
    color: var(--text-tertiary);
    border-color: transparent;
}

/* ── Individual work popover ──────────────────────────────────────────────
   Type, duration and whose plan it is. The prescribed targets sit behind
   "More" so the common case stays three interactions. */

.tp-own-work-pop {
    width: min(26rem, calc(100vw - 3rem));
}

.tp-own-work-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.7rem;
}

.tp-own-work-key {
    flex: 0 0 5.5rem;
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.tp-own-work-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tp-own-work-chips button,
.tp-own-work-seg button {
    padding: 0.28rem 0.7rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
}

.tp-own-work-chips button.is-active,
.tp-own-work-seg button.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    font-weight: 700;
}

.tp-own-work-seg {
    display: flex;
    gap: 0.15rem;
    padding: 0.18rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-pill);
}

.tp-own-work-seg button {
    border-color: transparent;
}

.tp-own-work-stepper {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.3rem;
    background: var(--surface-field);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-pill);
}

.tp-own-work-stepper button {
    width: 1.7rem;
    color: var(--text-secondary);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.tp-own-work-stepper button:hover {
    color: var(--accent);
}

.tp-own-work-stepper input {
    width: 3rem;
    color: var(--text-primary);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.tp-own-work-stepper span {
    color: var(--text-tertiary);
    font-size: 0.62rem;
}

.tp-own-work-more {
    margin-top: 0.85rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--ink-line);
}

.tp-own-work-more > summary {
    color: var(--text-secondary);
    font-size: 0.68rem;
    cursor: pointer;
}

.tp-own-work-more-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.7rem;
}

.tp-own-work-targets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.tp-own-work-field span {
    display: block;
    margin-bottom: 0.22rem;
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tp-own-work-field input,
.tp-own-work-field select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    color: var(--text-primary);
    background: var(--surface-field);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.72rem;
}

.tp-own-work-field input:focus,
.tp-own-work-field select:focus {
    border-color: var(--border-focus);
    outline: none;
}

/* ── Step 3 review ────────────────────────────────────────────────────── */

.tp-review-note {
    display: block;
    margin-top: 0.1rem;
    color: var(--text-tertiary);
    font-size: 0.64rem;
}

.tp-review-group-agg {
    float: right;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    text-transform: none;
}

.tp-review-group-agg button {
    padding: 0;
    color: var(--accent);
    background: none;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tp-review-foot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.tp-review-actuals-link {
    padding: 0;
    color: var(--accent);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.tp-review-actuals-link[disabled] {
    color: var(--text-tertiary);
    cursor: default;
}

.tp-review-foot small {
    color: var(--text-tertiary);
    font-size: 0.66rem;
}

/* ── Timeline quieting ────────────────────────────────────────────────── */

.tp-tl-lane-action {
    margin-top: 0.2rem;
    padding: 0;
    color: var(--accent);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.64rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    opacity: 0;
}

.tp-tl-row:hover .tp-tl-lane-action,
.tp-tl-lane-action:focus-visible {
    opacity: 1;
}

.tp-tl-legend small {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 0.64rem;
}

/* ── Board card ───────────────────────────────────────────────────────────
   A day column is read at a glance and never scrolls inside itself. */

.tp-planner-session-slot {
    color: var(--accent);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.tp-planner-session-open {
    min-width: 0;
}

.tp-participation-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.45rem;
}

.tp-participation-line button {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    color: var(--text-secondary);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.66rem;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.tp-participation-line button:hover {
    color: var(--accent);
}

.tp-participation-line button.is-warning {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    color: var(--warning);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.tp-participation-line button.is-warning i {
    display: block;
    width: 6px;
    height: 6px;
    background: var(--warning);
    border-radius: var(--radius-circle);
}

.tp-own-work-preview {
    margin-top: 0.75rem;
    padding: 0.55rem 0.65rem;
    background: var(--surface-recess);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
}

.tp-own-work-preview .tp-muted {
    font-size: 0.66rem;
}

.tp-own-work-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}

.tp-own-work-preview-row span {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.tp-own-work-preview-row em {
    color: var(--text-tertiary);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.tp-own-work-preview-row b {
    color: var(--text-primary);
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
}

/* The clock reads as part of the title line, not as a second control. */
.tp-session-editor-identity .hub-time-control::before {
    color: var(--text-tertiary);
    content: '·';
    margin-right: 0.3rem;
}
