/* The squad board: stadium greens, warm metal cards, and clear baseball roles. */
#screen-manage { max-width: 1536px; padding: 32px clamp(16px, 3vw, 48px) 64px; }
.squad-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.squad-page-heading .eyebrow { font-size: 10px; letter-spacing: .14em; }
.squad-page-heading .eyebrow span { color: #4e6a5c; margin: 0 9px; }
.squad-page-heading .page-title { font-size: 52px; margin: 13px 0 8px; }
.squad-page-heading .page-title span { color: var(--text); }
.squad-page-heading .lede { font-size: 12px; }
.squad-heading-actions { display: flex; align-items: center; gap: 23px; }
.squad-heading-actions .btn { min-width: 140px; padding: 13px 17px; }
.squad-heading-actions .btn span { margin-left: 24px; font-size: 16px; }
.setup-status { color: #a7b5a6; font-size: 10px; white-space: nowrap; }
.setup-status i, .gold-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-right: 7px; vertical-align: middle; }
.setup-status.unsaved { color: #e5c887; }
.setup-status.unsaved i, .gold-dot { background: #d6bb76; }
.club-command-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; margin-bottom: 22px; border: 1px solid #294034; border-radius: 9px; background: linear-gradient(110deg, #18291f, #111e19 65%); }
.club-identity { display: flex; align-items: center; gap: 16px; }
.club-identity .logo { width: 54px; height: 60px; border-radius: 4px 4px 16px 16px; font-size: 23px; border: 1px solid #609c71; box-shadow: inset 0 0 0 4px #ffffff0b; }
.club-identity label { display: grid; gap: 4px; }
.club-identity .eyebrow { color: #9caa99; font-size: 8px; }
.club-identity select { color: #edf0e4; font: 700 26px 'Barlow Condensed', sans-serif; border: 0; background: transparent; margin-left: -4px; max-width: 280px; cursor: pointer; }
.club-identity select option, #screen-manage select option { background: #15271f; color: #e9efdf; }
.club-identity small { color: #899c8e; font-size: 10px; }
.club-identity small span { margin: 0 6px; }
.squad-metrics { display: flex; gap: 32px; align-items: center; }
.squad-metrics > div { display: grid; grid-template-columns: 65px 25px; gap: 6px 14px; align-items: center; }
.squad-metrics span { color: #a0b19f; font-size: 10px; }
.squad-metrics strong { font: 600 22px 'Barlow Condensed', sans-serif; text-align: right; color: #dce8cf; }
.squad-metrics i { grid-column: span 2; height: 3px; background: linear-gradient(to right, #8aa76b var(--value), #2b3e30 var(--value)); }
.squad-metrics > .overall-metric { display: flex; gap: 12px; padding-right: 30px; border-right: 1px solid #304133; }
.overall-metric strong { font-size: 47px; color: #e6cb87; line-height: 1; }
.overall-metric span { font-size: 9px; line-height: 1.6; text-transform: uppercase; letter-spacing: .12em; }
.squad-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.squad-left, .squad-right { min-width: 0; }
.squad-pitch-panel, .squad-bench-panel, .batting-panel, .squad-inspector { border: 1px solid #2b4033; border-radius: 8px; overflow: hidden; background: #101e18; }
.squad-panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; padding: 15px 20px; }
.squad-panel-header > div { display: flex; gap: 10px; align-items: center; }
.squad-panel-header h2 { font: 600 21px 'Barlow Condensed', sans-serif; margin: 0; letter-spacing: .015em; white-space: nowrap; }
.section-index { font: 400 9px 'DM Mono', monospace; color: #7d927f; margin-right: 2px; }
.mini-tag { font: 500 7px 'DM Mono', monospace; letter-spacing: .1em; background: #26392b; color: #b6c8a3; padding: 4px 6px; border-radius: 3px; }
.formation-label { color: #bdccbb; border: 1px solid #324638; border-radius: 4px; padding: 8px 10px; font-size: 9px; white-space: nowrap; }
.squad-pitch { height: 670px; position: relative; isolation: isolate; background: radial-gradient(ellipse at 50% 0, #35533a 0, #1c3525 60%, #12241b 100%); border-top: 1px solid #354b32; overflow: hidden; }
.squad-pitch:after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 95px #07150f80; z-index: -1; background: repeating-linear-gradient(0deg, transparent 0 3px, #0a1c0d0b 3px 4px); }
.squad-field-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.pitch-caption { position: absolute; left: 21px; right: 21px; top: 18px; display: flex; justify-content: space-between; font: 500 8px 'DM Mono', monospace; color: #b9c9ad; letter-spacing: .06em; }
.pitch-caption b { color: #8b9e83; font-weight: 400; margin-left: 6px; }
.pitch-caption .live-dot { width: 4px; height: 4px; margin-right: 6px; box-shadow: none; }
.diamond-wordmark { position: absolute; bottom: 14%; left: 9%; transform: rotate(-35deg); font: 800 54px 'Barlow Condensed', sans-serif; line-height: .9; color: #8da57a14; text-align: center; }
.diamond-wordmark span { display: block; font-size: 8px; letter-spacing: .26em; margin-top: 8px; }
.field-card-slot { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); }
/* Anchor corner infielders by their position label, directly over the base. */
.field-card-slot.base-anchored { transform: translate(-50%, -100%); }
.base-anchored .position-pedestal { position: absolute; top: 100%; left: 50%; margin-top: 0; transform: translate(-50%, -50%); white-space: nowrap; }
.base-anchored .squad-card:hover,
.base-anchored .squad-card.is-selected,
.base-anchored .squad-card.drop-target { transform: none; }
.squad-card { position: relative; border: 0; border-radius: 7px; padding: 0; color: #332b19; background: transparent; display: flex; flex-direction: column; align-items: center; width: clamp(80px, 7.1vw, 105px); user-select: none; touch-action: manipulation; transition: filter .16s, transform .16s; cursor: grab; }
.squad-card-face { width: 100%; height: 112px; position: relative; display: block; overflow: hidden; background: linear-gradient(120deg, #ebe4c0 0%, #bab38d 42%, #d3ca9f 48%, #f2ebc8 74%, #aaa279 100%); clip-path: polygon(0 9%, 11% 9%, 13% 3%, 50% 0, 87% 3%, 89% 9%, 100% 9%, 100% 85%, 87% 91%, 50% 100%, 13% 91%, 0 85%); }
.squad-card.elite .squad-card-face { background: linear-gradient(125deg, #f7e4a3 0%, #d1ad55 36%, #f7e5a8 48%, #ead28b 65%, #be963f 100%); }
.squad-card-face:after { content: ''; position: absolute; inset: 7px 5px 12px; border: 1px solid #6c602137; border-radius: 40% 40% 6px 6px / 5px 5px 4px 4px; pointer-events: none; }
.squad-card-rating { position: absolute; left: 9px; top: 12px; z-index: 2; font: 700 26px/.9 'Barlow Condensed', sans-serif; }
.squad-card-rating small { display: block; font: 600 9px 'Barlow Condensed', sans-serif; margin-top: 4px; }
.squad-avatar { display: block; }
.squad-card .squad-avatar { position: absolute; width: 77%; height: 80px; right: -3px; top: 0; }
.card-club { position: absolute; left: 10px; top: 55px; border-top: 1px solid #77652d4a; padding-top: 4px; font: 700 8px 'Barlow Condensed', sans-serif; }
.squad-card-name { position: absolute; top: 75px; left: 3px; right: 3px; padding: 2px 0; text-align: center; text-transform: uppercase; white-space: nowrap; font: 700 clamp(9px, .95vw, 13px)/1 'Barlow Condensed', sans-serif; background: linear-gradient(90deg, transparent, #eee1afcc 15%, #e7d79bcc 85%, transparent); }
.squad-card-rule { position: absolute; top: 91px; left: 18%; right: 18%; height: 1px; background: #8e793a66; }
.squad-card-stats { position: absolute; top: 95px; left: 0; right: 0; font: 600 9px 'Barlow Condensed', sans-serif; white-space: nowrap; }
.squad-card-stats small { font-weight: 500; font-size: 7px; }
.position-pedestal { min-width: 37px; border: 1px solid #729b65; background: #203e2c; color: #d7e7c4; border-radius: 2px; margin-top: -2px; z-index: 2; padding: 3px 8px; font: 500 9px/1 'DM Mono', monospace; box-shadow: 0 3px 10px #07140980; }
.position-pedestal.out-of-position { color: #f2cd80; border-color: #ad8844; }
.squad-card:hover { transform: translateY(-4px); filter: drop-shadow(0 4px 8px #0007) brightness(1.08); }
.squad-card.is-selected, .squad-card.drop-target { filter: drop-shadow(0 0 6px #a5f69e) brightness(1.12); transform: translateY(-4px); }
.squad-card:focus-visible { outline: 2px solid #9bdfa2; outline-offset: 5px; }
.is-dragging { opacity: .4; }
.field-bottom-note { position: absolute; bottom: 1px; left: 0; right: 0; text-align: center; color: #879b7e; font: 400 8px 'DM Mono', monospace; }
.field-bottom-note span { margin: 0 5px; color: #b2bf9e; }
.squad-interaction-hint { display: flex; gap: 10px; align-items: center; padding: 13px 18px; border-top: 1px solid #2a412d; background: #14241b; color: #a2b29a; font-size: 9px; line-height: 1.5; min-height: 43px; }
.squad-interaction-hint > span:first-child { color: #c5d3b8; font-size: 18px; line-height: 1; }
.squad-interaction-hint strong { color: #d7e6c5; }
.hint-key { margin-left: auto; font: 500 7px 'DM Mono', monospace; border: 1px solid #3c4e36; border-radius: 3px; padding: 4px 5px; white-space: nowrap; color: #97ab8b; }
.squad-interaction-hint button { margin-left: auto; color: #cde5bc; background: transparent; border: 0; font-size: 10px; white-space: nowrap; }
.squad-bench-panel { margin-top: 20px; background: linear-gradient(115deg, #1b2920, #112018); }
.squad-bench-panel .squad-panel-header { min-height: 56px; }
.count-tag { font: 400 9px 'DM Mono', monospace; color: #aabd9d; background: #2d3f2d; padding: 3px 5px; border-radius: 3px; }
.bench-summary { color: #99ab91; font-size: 9px; white-space: nowrap; }
.bench-summary > span { margin: 0 5px; color: #576b4f; }
.squad-bench { display: flex; gap: 16px; overflow-x: auto; padding: 8px 20px 13px; scrollbar-width: thin; scrollbar-color: #5d7353 #1a2a1e; background: linear-gradient(transparent 83%, #899a7820 83%, #899a7820 85%, transparent 85%); }
.squad-bench .squad-card { flex: 0 0 90px; }
.squad-bench .squad-card-name { font-size: 11px; }
.bench-role { color: #8fa681; font: 400 7px 'DM Mono', monospace; letter-spacing: .06em; padding: 9px 0 0; }
.bench-footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #293e2b; padding: 12px 20px; color: #8e9e84; font-size: 8px; }
.bench-footer > span:last-child > span { margin-left: 12px; }
.squad-right { display: grid; gap: 18px; }
.batting-panel .squad-panel-header { padding: 19px 18px 10px; min-height: 0; }
.batting-intro { color: #8f9f8b; font-size: 10px; margin: 0; padding: 0 18px 23px; }
.batting-columns { display: grid; grid-template-columns: 1fr 37px 37px; padding: 10px 30px 10px 19px; border-top: 1px solid #283b2d; border-bottom: 1px solid #283b2d; color: #72886e; font: 400 7px 'DM Mono', monospace; letter-spacing: .08em; }
.batting-columns span:not(:first-child) { text-align: center; }
.batting-list { list-style: none; margin: 0; padding: 0 12px; }
.batting-list li + li { border-top: 1px solid #26392b; }
.batting-row { display: grid; grid-template-columns: 21px 34px minmax(0, 1fr) 26px 26px 8px; gap: 6px; align-items: center; border: 0; background: transparent; color: #dae5cf; width: 100%; padding: 10px 4px; text-align: left; cursor: grab; border-radius: 4px; touch-action: manipulation; }
.batting-row:hover { background: #223829; }
.batting-row.is-selected, .batting-row.drop-target { background: #2c462e; box-shadow: inset 0 0 0 1px #8cae72; }
.batting-row:focus-visible { outline: 2px solid #9bdfa2; outline-offset: 1px; }
.batting-number { color: #688361; font: 400 10px 'DM Mono', monospace; }
.batting-avatar { width: 33px; height: 36px; border-radius: 5px; background: #344731; overflow: hidden; }
.batter-identity { display: grid; gap: 4px; min-width: 0; }
.batter-identity strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.batter-identity small { color: #91a488; font-size: 8px; white-space: nowrap; }
.batter-position { color: #9eae92; font: 400 9px 'DM Mono', monospace; text-align: center; }
.batter-overall { color: #d9c58d; font: 600 16px 'Barlow Condensed', sans-serif; text-align: center; }
.drag-grip { color: #536b4d; font-size: 15px; }
.batting-note { display: flex; gap: 11px; color: #91a487; background: #17291c; border-top: 1px solid #2e432d; padding: 14px 18px; font-size: 9px; line-height: 1.7; }
.batting-note > span { color: #b2c99c; font-size: 20px; }
.squad-inspector { padding: 21px; }
.inspector-empty { text-align: center; padding: 24px 35px; border-style: dashed; background: radial-gradient(ellipse at top, #23362655, #101e18); }
.inspector-icon { font-size: 29px; color: #8ba676; }
.squad-inspector h3 { font: 600 22px 'Barlow Condensed', sans-serif; margin: 8px 0; }
.squad-inspector p { font-size: 10px; color: #8fa085; line-height: 1.8; margin: 0; }
.inspector-label { display: block; font: 400 7px 'DM Mono', monospace; color: #61785b; letter-spacing: .16em; margin-top: 20px; }
.inspector-player { display: flex; align-items: center; gap: 10px; }
.inspector-player .squad-avatar { width: 55px; height: 60px; border-radius: 5px; background: #30452d; }
.inspector-player .eyebrow { font-size: 7px; }
.inspector-player h3 { font-size: 21px; margin: 4px 0; }
.inspector-player p { font-size: 9px; }
.inspector-player button { margin-left: auto; align-self: flex-start; background: none; border: 0; color: #b5c4a6; font-size: 20px; }
.assignment-controls { margin-top: 18px; display: grid; gap: 12px; }
.assignment-controls label { font-size: 10px; color: #a4b596; }
.assignment-controls select { display: block; width: 100%; background: #1d3022; border: 1px solid #3a5032; color: #e3ebda; border-radius: 4px; padding: 9px; font-size: 11px; margin-top: 6px; }
.squad-tip { display: flex; gap: 12px; padding: 0 6px; }
.squad-tip > span { font-size: 25px; color: #a08e5d; }
.squad-tip p { color: #768b70; font-size: 9px; line-height: 1.8; margin: 0; }
.squad-tip strong { display: block; color: #a8b49a; font-weight: 600; margin-bottom: 3px; }
#screen-manage button:active { cursor: grabbing; }
@media (max-width: 1150px) {
	.squad-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
	.squad-card { width: 80px; }
	.squad-card-name { font-size: 10px; }
	.squad-panel-header { padding: 14px; }
	.squad-panel-header h2 { font-size: 19px; }
	.squad-pitch-panel .mini-tag { display: none; }
	.squad-metrics { gap: 20px; }
	.squad-heading-actions { gap: 15px; }
}
@media (max-width: 950px) {
	.squad-layout { grid-template-columns: minmax(0, 1fr); }
	.squad-card { width: 95px; }
	.squad-card-name { font-size: 12px; }
	.squad-right { grid-template-columns: 1.2fr 1fr; align-items: start; }
	.squad-tip { grid-column: 2; margin-top: -45px; }
	.batting-panel { grid-row: span 2; }
	.squad-metrics > div:not(.overall-metric) { grid-template-columns: 50px 25px; gap: 6px 8px; }
	.squad-heading-actions .setup-status { display: none; }
	.squad-pitch-panel .mini-tag { display: inline; }
	.batter-identity strong { font-size: 12px; }
	.batter-identity small { font-size: 8px; }
}
@media (max-width: 620px) {
	#screen-manage { padding-top: 24px; }
	.squad-page-heading { margin-bottom: 22px; gap: 10px; }
	.squad-page-heading .page-title { font-size: 42px; }
	.squad-page-heading .eyebrow { font-size: 7px; }
	.squad-page-heading .eyebrow span { margin: 0 4px; }
	.squad-page-heading .lede { font-size: 10px; }
	.squad-heading-actions .btn { min-width: 0; font-size: 10px; padding: 11px; }
	.squad-heading-actions .btn span { margin-left: 8px; }
	.club-command-bar { padding: 16px; gap: 15px; flex-wrap: wrap; margin-bottom: 16px; }
	.club-identity { gap: 12px; }
	.club-identity .logo { width: 42px; height: 48px; font-size: 18px; }
	.club-identity select { font-size: 24px; max-width: 200px; }
	.club-identity small { font-size: 9px; }
	.squad-metrics { border-top: 1px solid #304133; padding-top: 14px; width: 100%; justify-content: space-between; gap: 12px; }
	.squad-metrics > .overall-metric { gap: 8px; padding-right: 18px; }
	.overall-metric strong { font-size: 32px; }
	.overall-metric span { font-size: 7px; }
	.squad-metrics > div:not(.overall-metric) { grid-template-columns: 40px 22px; gap: 5px; }
	.squad-metrics span { font-size: 8px; }
	.squad-metrics strong { font-size: 20px; }
	.squad-metrics .overall-metric strong { font-size: 34px; }
	.squad-panel-header { padding: 13px 12px; min-height: 56px; gap: 8px; }
	.squad-panel-header > div { gap: 6px; }
	.squad-panel-header h2 { font-size: 19px; }
	.squad-pitch-panel .mini-tag { display: none; }
	.section-index { font-size: 8px; }
	.formation-label { padding: 6px; font-size: 8px; }
	.squad-pitch { height: 560px; }
	.squad-card { width: 66px; }
	.squad-card-face { height: 91px; }
	.squad-card-rating { font-size: 22px; left: 7px; top: 10px; }
	.squad-card-rating small { font-size: 8px; margin-top: 2px; }
	.squad-card .squad-avatar { top: 3px; right: -3px; height: 61px; }
	.squad-card-name { top: 60px; font-size: 9px; padding: 2px 0; letter-spacing: -.025em; }
	.squad-card-rule { top: 74px; }
	.squad-card-stats { top: 77px; font-size: 8px; }
	.squad-card-stats small { font-size: 6px; }
	.card-club { top: 45px; left: 8px; font-size: 7px; padding-top: 2px; }
	.position-pedestal { font-size: 8px; padding: 3px 6px; min-width: 31px; }
	.pitch-caption { left: 12px; right: 12px; top: 14px; font-size: 7px; }
	.pitch-caption b { display: none; }
	.field-bottom-note { font-size: 7px; bottom: 1px; }
	.squad-interaction-hint { padding: 11px 12px; font-size: 9px; gap: 8px; }
	.hint-key { display: none; }
	.squad-bench-panel { margin-top: 16px; }
	.squad-bench { gap: 13px; padding: 7px 14px 13px; }
	.squad-bench .squad-card { flex-basis: 75px; }
	.squad-bench .squad-card-name { font-size: 10px; }
	.bench-role { font-size: 6px; }
	.bench-summary { font-size: 8px; }
	.bench-footer { padding: 11px 13px; font-size: 7px; }
	.squad-right { display: flex; flex-direction: column; gap: 16px; }
	.squad-right > * { width: 100%; }
	.squad-tip { margin-top: 0; }
	.batting-row { grid-template-columns: 25px 36px minmax(0, 1fr) 35px 35px 10px; gap: 8px; padding: 10px 6px; }
	.batting-columns { grid-template-columns: 1fr 43px 43px; padding-right: 33px; }
	.batter-identity strong { font-size: 12px; }
	.batter-identity small { font-size: 9px; }
	.batting-note, .squad-inspector p { font-size: 10px; }
	.squad-inspector { order: -1; }
	.inspector-empty { display: none; }
}
/* Keep the base-anchored corner cards clear of the pitcher on small phones. */
@media (max-width: 350px) {
	.field-card-slot .squad-card { width: 60px; }
}
@media (prefers-reduced-motion: reduce) { .squad-card, .squad-card:hover { transition: none; transform: none; } }
