.team-depth-page {
    --depth-pitcher-bg: #fff0f4;
    --depth-pitcher-chip: #fbd5e1;
    --depth-pitcher-training: #f4e7ed;
    --depth-pitcher-text: #69263e;
    --depth-catcher-bg: #edf8fe;
    --depth-catcher-chip: #c8eafa;
    --depth-catcher-training: #e5eef3;
    --depth-catcher-text: #184d67;
    --depth-infield-bg: #fffbed;
    --depth-infield-chip: #faedac;
    --depth-infield-training: #f2eedc;
    --depth-infield-text: #61500b;
    --depth-outfield-bg: #f3fae9;
    --depth-outfield-chip: #ddefb8;
    --depth-outfield-training: #e9efdd;
    --depth-outfield-text: #365214;
}

.dark .team-depth-page {
    --depth-pitcher-bg: #261a21;
    --depth-pitcher-chip: #542b3d;
    --depth-pitcher-training: #3a2b33;
    --depth-pitcher-text: #ffd9e6;
    --depth-catcher-bg: #15252d;
    --depth-catcher-chip: #21475b;
    --depth-catcher-training: #26343d;
    --depth-catcher-text: #d2efff;
    --depth-infield-bg: #282619;
    --depth-infield-chip: #514822;
    --depth-infield-training: #383528;
    --depth-infield-text: #fff0b4;
    --depth-outfield-bg: #202818;
    --depth-outfield-chip: #3c5125;
    --depth-outfield-training: #30392a;
    --depth-outfield-text: #e0f6ba;
}

.depth-content { max-width: 1024px; margin: 48px auto; color: var(--team-text); }
.depth-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.depth-summary { margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.depth-summary strong { font-size: 28px; }
.depth-summary > span { margin-left: 12px; font-size: 13px; }
.depth-note { color: var(--team-muted); font-size: 12px; margin: 0; }
.depth-legend-line { display: block; }
.depth-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.depth-switch { display: flex; align-items: center; gap: 10px; position: relative; min-height: 44px; margin: 0; cursor: pointer; }
.depth-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.depth-switch-track { box-sizing: border-box; position: relative; flex-shrink: 0; width: 46px; height: 26px; border: 1px solid var(--team-muted); border-radius: 20px; background: var(--team-muted); }
.depth-switch-track::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--team-surface); }
.depth-switch input:checked + .depth-switch-track { background: var(--team-accent); border-color: var(--team-accent); }
.depth-switch input:checked + .depth-switch-track::before { transform: translateX(20px); }
.depth-switch input:focus-visible + .depth-switch-track { outline: 2px solid var(--team-accent); outline-offset: 3px; }
.depth-switch-state { min-width: 28px; font-size: 11px; font-weight: 800; }
.depth-switch-on, .depth-switch input:checked ~ .depth-switch-state .depth-switch-off { display: none; }
.depth-switch input:checked ~ .depth-switch-state .depth-switch-on { display: inline; }
.depth-save-image { border: 1px solid var(--team-border-strong); background: var(--team-surface); color: var(--team-text); border-radius: 4px; min-height: 44px; padding: 8px 16px; }
.depth-save-image { font-size: 13px; font-weight: 700; cursor: pointer; }
.depth-save-image:disabled { opacity: 0.6; cursor: wait; }
#depth-save-status:empty { display: none; }
#depth-save-status:not(:empty) { margin-bottom: 12px; }
.depth-table-wrap { overflow: auto; border: 1px solid var(--team-border); border-radius: 6px; background: var(--team-surface); }
.depth-table { width: 100%; min-width: 900px; margin: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.depth-table th, .depth-table td { padding: 8px; border-bottom: 1px solid var(--team-border); vertical-align: middle; }
.depth-table tr:last-child > * { border-bottom: 0; }
.depth-table .depth-age { width: 88px; position: sticky; left: 0; z-index: 1; background: var(--team-surface-soft); color: var(--team-text); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.depth-table thead th { padding: 16px 8px; text-align: left; }
.depth-table thead tr:last-child > th { border-bottom: 2px solid var(--team-border-strong); }
.depth-position > span:first-child { display: inline-block; font-size: 14px; font-weight: 800; }
.depth-position > strong { margin-left: 10px; font-size: 24px; font-variant-numeric: tabular-nums; }
.depth-position small { font-size: 11px; margin-left: 3px; }
.depth-breakdown { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; }
.depth-pitcher { --depth-bg: var(--depth-pitcher-bg); --depth-chip: var(--depth-pitcher-chip); --depth-training-chip: var(--depth-pitcher-training); --depth-text: var(--depth-pitcher-text); }
.depth-catcher { --depth-bg: var(--depth-catcher-bg); --depth-chip: var(--depth-catcher-chip); --depth-training-chip: var(--depth-catcher-training); --depth-text: var(--depth-catcher-text); }
.depth-infield { --depth-bg: var(--depth-infield-bg); --depth-chip: var(--depth-infield-chip); --depth-training-chip: var(--depth-infield-training); --depth-text: var(--depth-infield-text); }
.depth-outfield { --depth-bg: var(--depth-outfield-bg); --depth-chip: var(--depth-outfield-chip); --depth-training-chip: var(--depth-outfield-training); --depth-text: var(--depth-outfield-text); }
.depth-table td, .depth-table .depth-position { background: var(--depth-bg, var(--team-surface-soft)); color: var(--depth-text, var(--team-text)); }
.depth-players { display: flex; flex-wrap: wrap; gap: 5px; }
.depth-player { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 4px; box-sizing: border-box; width: 100%; max-width: 100%; min-height: 32px; padding: 5px 8px; border: 1px solid transparent; border-radius: 4px; background: var(--depth-chip, var(--team-surface)); color: inherit; font-weight: 700; line-height: 1.5; white-space: nowrap; text-decoration: none; }
.depth-player-name { flex: 1; min-width: 0; overflow: hidden; }
.depth-player[hidden], .depth-empty[hidden] { display: none; }
.depth-player:hover { color: inherit; border-color: currentColor; text-decoration: underline; }
.depth-player small { flex-shrink: 0; font-size: 10px; font-weight: 400; white-space: nowrap; }
.depth-badge { flex-shrink: 0; border: 1px solid currentColor; border-radius: 2px; padding: 0 2px; font-size: 10px; font-weight: 400; white-space: nowrap; }
.depth-player.is-departed { background: var(--team-surface); color: var(--team-muted); border-style: dashed; border-color: var(--team-border-strong); }
.depth-player[data-training="1"] { background: var(--depth-training-chip, var(--team-surface-soft)); }
.depth-empty { color: var(--team-muted); }
.depth-content :focus-visible { outline: 2px solid var(--team-accent); outline-offset: 2px; }
@media (min-width: 768px) {
    #depth-excluded-count[hidden] { display: block; visibility: hidden; }
}
@media (max-width: 767px) {
    .depth-content { margin-top: 32px; }
    .depth-summary > span { font-size: 12px; }
    .depth-table .depth-age { width: 80px; }
    .depth-player { min-height: 40px; }
}
