:root {
  --green: #145f45;
  --green-dark: #0e4935;
  --lime: #d6f05a;
  --ink: #23382f;
  --muted: #748078;
  --line: #e4e9e4;
  --bg: #f3f6f2;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  color-scheme: light;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); padding-bottom: 100px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, select, summary { cursor: pointer; }
button { border: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid #8fbc83; outline-offset: 3px; }
svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, p { margin: 0; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.topbar { background: white; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1040px; margin: auto; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 9px; align-items: center; text-decoration: none; color: var(--ink); font-size: 23px; font-weight: 750; letter-spacing: -1px; }
.brand img { border-radius: 10px; }
.brand>span>span { color: #8fae45; }
.button { min-height: 44px; padding: 10px 14px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.quiet { background: transparent; }
.quiet:hover { background: #f0f4ed; }
.outlined { background: white; border: 1px solid #d9e2d7; }
.outlined>span, .add-button>span { font-size: 19px; font-weight: 400; line-height: 1; }
.badge { background: #edf2e9; border-radius: 5px; padding: 3px 6px; font-size: 10px; font-weight: 600; color: #68795e; }
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--green-dark); }
.full { width: 100%; }
main { max-width: 1040px; margin: auto; padding: 0 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #58695c; font-size: 11px; font-weight: 500; }
.field>input, .field>select, .input-unit, textarea { border: 1px solid #dce4da; background: #fff; border-radius: 8px; min-width: 0; width: 100%; min-height: 46px; }
.field>input, .field>select { font-size: 16px; padding: 10px 11px; color: var(--ink); }
.field>input::placeholder, .input-unit input::placeholder { color: #9ba69a; font-weight: 400; }
.field input[type=date] { appearance: none; -webkit-appearance: none; padding: 10px 9px; font-size: 15px; max-width: 100%; }
.workspace { display: grid; align-items: start; gap: 18px; }
.editor, .results { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 17px; }
.section-heading h2 { display: flex; align-items: center; gap: 8px; }
.section-heading h2>svg { color: var(--green); }
.unit-note { font-size: 10px; color: var(--muted); white-space: nowrap; }
.input-unit { display: flex; align-items: center; padding: 0 12px; gap: 6px; background: #fafcf8; }
.input-unit:focus-within { border-color: #8ca580; box-shadow: 0 0 0 2px #eaf1e3; }
.input-unit input { border: 0; background: transparent; outline: none; min-width: 0; width: 100%; padding: 11px 0; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.input-unit>span { font-size: 13px; font-weight: 400; color: #81907d; }
.input-unit:has(input[aria-invalid=true]) { border-color: #b66439; }
.shuttle-fields { display: grid; grid-template-columns: minmax(0,1.2fr) 10px minmax(0,1fr); align-items: end; gap: 10px; margin-top: 15px; }
.multiply { color: #9ca695; align-self: end; padding-bottom: 14px; font-size: 15px; }
.cost-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.cost-line small { font-size: 10px; color: #84917d; margin-left: 4px; }
.cost-line strong { font-weight: 500; color: #607459; font-size: 13px; }
.cost-total { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 15px; font-size: 12px; }
.cost-total strong { font-size: 24px; letter-spacing: -.6px; color: var(--green); }
.hint { color: var(--muted); font-size: 10px; line-height: 1.7; margin-top: 12px; }
.segmented { margin: 0; padding: 3px; display: flex; gap: 3px; border: 0; border-radius: 9px; background: #f0f4ec; }
.segmented label { position: relative; flex: 1; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: flex; align-items: center; justify-content: center; font-size: 12px; min-height: 40px; border-radius: 6px; color: #7a8772; }
.segmented input:checked+span { background: white; box-shadow: 0 1px 3px #203c3212; color: var(--green); font-weight: 600; }
.segmented input:focus-visible+span { outline: 3px solid #8fbc83; }
.split-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; margin-top: 16px; }
.split-fields .input-unit input { font-size: 18px; }
.local-note { color: #84907d; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 10px; margin-top: -1px; }
.local-note svg { width: 13px; height: 13px; }
.results { scroll-margin-top: 16px; }
.total-banner { background: var(--green); color: white; border-radius: var(--radius); padding: 19px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; position: relative; overflow: hidden; }
.total-banner:after { content: ''; width: 56px; position: absolute; top: 0; bottom: 0; right: -18px; border-left: 1px solid #ffffff12; border-right: 1px solid #ffffff12; transform: skew(-20deg); pointer-events: none; }
.total-banner>div>p { font-size: 11px; color: #c5dbc9; }
.total-banner strong { font-size: 36px; line-height: 1.2; font-weight: 650; letter-spacing: -1.5px; margin-top: 4px; display: block; font-variant-numeric: tabular-nums; }
.total-detail { display: flex; flex-direction: column; align-items: end; gap: 9px; text-align: right; min-width: 0; font-size: 11px; line-height: 1.6; }
.total-detail>span:first-child { color: var(--lime); }
.total-detail>span:last-child { color: #c5dbc9; font-size: 10px; }
.members-panel { padding: 16px; }
.members-panel>.section-heading { margin-bottom: 10px; }
.add-button { background: #eaf2e3; color: var(--green); font-size: 11px; min-height: 40px; padding: 8px 10px; }
.filters { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.filters button { min-height: 44px; flex: 1; background: transparent; font-size: 11px; color: #85907e; border-bottom: 2px solid transparent; padding: 7px 2px; white-space: nowrap; }
.filters button span { font-size: 9px; margin-left: 2px; opacity: .8; }
.filters button[aria-pressed=true] { color: var(--green); font-weight: 600; border-bottom-color: var(--green); }
.player-row { padding: 8px 0; display: grid; grid-template-columns: 29px minmax(0,1fr) auto; gap: 3px 9px; align-items: center; border-bottom: 1px solid #edf0e9; }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #708463; background: #f0f4eb; font-size: 10px; font-weight: 600; }
.avatar.guest { color: #9b7a48; background: #f8f2e4; }
.player-name { background: transparent; width: 100%; min-width: 0; border: 1px solid transparent; border-radius: 5px; padding: 6px 0; font-size: 16px; text-overflow: ellipsis; }
.player-name:hover { border-bottom-color: var(--line); }
.row-amount { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 17px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.remove-player { background: none; border-radius: 5px; min-width: 28px; min-height: 34px; font-size: 18px; color: #a5aea0; font-weight: 400; }
.remove-player:hover { color: #9a563f; background: #fcf1ed; }
.player-options { grid-column: 2; display: flex; gap: 5px; min-width: 0; }
.player-options select { appearance: none; -webkit-appearance: none; border: 1px solid #e6ebe2; border-radius: 5px; background: #fafcf7; padding: 3px 7px; min-height: 28px; color: #77876b; font-size: 11px; max-width: 100%; }
.player-options select.tier-select { background: #f1f5ec; }
.player-options select.tier-select.is-guest { background: #fcf6e8; color: #937341; border-color: #f1e7ce; }
.paid-label { display: flex; gap: 5px; align-items: center; justify-content: flex-end; color: #929d89; font-size: 10px; cursor: pointer; min-height: 32px; padding-right: 4px; }
.paid-checkbox { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1px solid #d5dece; border-radius: 5px; display: grid; place-items: center; margin: 0; cursor: pointer; }
.paid-checkbox:checked { border-color: var(--green); background: var(--green); }
.paid-checkbox:checked:after { content: '✓'; font-size: 12px; color: white; }
.player-row.is-paid .row-amount { color: var(--green); }
.player-row.is-paid .paid-label { color: var(--green); }
.collection { display: flex; justify-content: space-between; gap: 10px; padding-top: 17px; }
.collection>div { display: flex; flex-direction: column; gap: 6px; }
.collection>div>span { font-size: 10px; color: var(--muted); }
.collection>div:last-child { text-align: right; }
.collection strong { font-size: 18px; letter-spacing: -.4px; font-weight: 600; }
.collection>div:first-child strong { color: var(--green); }
#paid-count { font-size: 9px; margin-left: 3px; background: #eef3e9; padding: 2px 4px; border-radius: 4px; }
.group-details { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 4px; }
.group-details summary { color: #7d8c72; font-size: 10px; padding: 12px 0 4px; min-height: 34px; }
.group-line { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; padding-top: 12px; color: #7e8a75; }
.group-line strong { color: var(--ink); font-weight: 500; }
.empty-players { text-align: center; padding: 28px 8px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.empty-players button { display: block; margin: 12px auto 0; }
.save-button { border: 1px solid #d8e1d2; background: transparent; color: #6e8262; font-weight: 500; }
.error-message { background: #fff3e9; border: 1px solid #ecd5c0; color: #955a32; font-size: 12px; line-height: 1.7; padding: 12px; border-radius: 10px; }
.action-bar { position: fixed; inset: auto 0 0; background: #ffffffed; backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 5; padding: 12px 16px max(12px,env(safe-area-inset-bottom)); }
.action-inner { max-width: 1008px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-jump { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 44px; }
.result-jump span { font-size: 10px; color: var(--muted); }
.result-jump strong { font-size: 24px; letter-spacing: -.7px; font-weight: 650; }
.action-bar .button { min-height: 46px; font-size: 12px; padding: 12px 15px; }
dialog { color: var(--ink); width: calc(100% - 28px); max-width: 440px; max-height: 90dvh; border: 1px solid var(--line); padding: 22px; border-radius: 16px; box-shadow: 0 20px 80px #173b3220; overscroll-behavior: contain; }
dialog::backdrop { background: #163c2d66; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.dialog-heading h2 { font-size: 21px; }
.icon-button { width: 44px; height: 44px; border-radius: 50%; background: #f1f5ed; font-size: 24px; color: #6b7d60; }
.dialog-description { font-size: 12px; color: var(--muted); line-height: 1.8; margin-bottom: 20px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
textarea { padding: 12px; resize: vertical; font-size: 14px; line-height: 1.7; }
.history-item { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.history-open { flex: 1; min-width: 0; text-align: left; background: none; padding: 17px 2px; }
.history-open strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.history-open span { display: block; color: var(--muted); font-size: 11px; margin-top: 7px; }
.history-delete { background: transparent; color: #a26e52; min-height: 44px; min-width: 44px; font-size: 11px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 102px; transform: translate(-50%,12px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px); width: max-content; background: #254336; color: white; border-radius: 10px; padding: 12px 16px; font-size: 12px; line-height: 1.6; transition: opacity .15s,transform .15s; text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 359px) {
  .player-row { grid-template-columns: 25px minmax(0,1fr) auto; gap: 5px 6px; }
  .avatar { width: 25px; height: 25px; }
  .members-panel { padding: 12px; }
  .player-options { gap: 3px; }
  .player-options select { padding: 3px 4px; font-size: 10px; }
  .row-amount { font-size: 15px; }
  .remove-player { min-width: 22px; }
  .action-bar .button { padding: 12px; font-size: 11px; }
  .unit-note { font-size: 9px; }
}
@media (min-width: 640px) {
  main { padding: 0 24px; }
  .topbar-inner { padding: 14px 24px; }
  .panel { padding: 22px; }
  .field { font-size: 12px; }
  .action-bar { padding-left: 24px; padding-right: 24px; }
  .action-bar .button { min-width: 205px; }
}
@media (min-width: 860px) {
  .workspace { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 22px; }
  .results { gap: 14px; }
  .total-banner { padding: 22px; }
  .members-panel { padding: 20px; }
  .player-row { padding: 8px 0; }
}
@media (hover: none) {
  .player-options select { font-size: 16px; min-height: 38px; padding: 4px; }
  .remove-player { min-width: 36px; min-height: 44px; }
  .paid-label { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  body { padding: 0; background: white; }
  .topbar, .page-heading, .sample-notice, .editor, .action-bar, footer, .save-button, .add-button, .remove-player, .filters { display: none !important; }
  .workspace { display: block; }
  .results { max-width: 600px; margin: auto; }
  .total-banner { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* The playing session starts immediately; keep the page chrome compact. */
.session-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 18px 0; }
.date-field { display: flex; align-items: center; gap: 9px; color: #7d8b73; font-size: 11px; min-width: 0; }
.date-field input { font-size: 16px; font-weight: 500; color: var(--ink); border: 1px solid #dce4da; background: white; border-radius: 8px; padding: 10px; min-height: 44px; min-width: 0; width: 155px; appearance: none; -webkit-appearance: none; }
#contact-suggestions { display: flex; flex-wrap: wrap; gap: 7px; max-height: 165px; overflow-y: auto; }
.contact-chip { display: flex; border: 1px solid #dfE8d6; border-radius: 8px; background: #f2f7ed; }
.contact-add { background: none; color: #507342; font-size: 12px; min-height: 40px; padding: 8px 9px; max-width: 225px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-remove { background: none; border-left: 1px solid #e0e8d8; min-height: 40px; min-width: 30px; color: #9eac94; border-radius: 0 8px 8px 0; font-size: 16px; }
@media (max-width: 359px) { .date-field { gap: 5px; font-size: 10px; white-space: nowrap; }.date-field input { width: 132px; }.session-toolbar>.button { padding: 10px;font-size: 11px; } }

/* Native selects share one chevron, centered independently of text metrics. */
select, .field>select, .player-options select,
.player-options select.tier-select, .player-options select.tier-select.is-guest {
  appearance: none;
  -webkit-appearance: none;
  background-image: url('/chevron.svg');
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
}
.field>select { padding: 10px 33px 10px 11px; }
.player-options { grid-column: 1 / -1; grid-row: 2; padding-left: 38px; padding-right: 70px; }
.player-options select { padding: 4px 24px 4px 8px; background-position: right 6px center; background-size: 12px 12px; }
.player-options select:first-child { min-width: 57px; }
.player-options select.tier-select { min-width: 91px; }
.paid-label { grid-column: 3; grid-row: 2; }
.batch-editor { border: 1px solid #dce7d3; background: #f7faf4; border-radius: 10px; padding: 14px; margin: 15px 0; }
.batch-heading { display: flex; align-items: center; justify-content: space-between; margin: -4px -4px 9px 0; }
.batch-heading h3 { font-size: 14px; font-weight: 600; margin: 0; }
.batch-heading .button { font-size: 11px; padding: 7px 10px; min-height: 36px; }
.contact-search input { font-size: 16px; min-height: 44px; }
#contact-suggestions { margin-top: 9px; }
#player-fields { margin-top: 20px; display: grid; gap: 20px; }
.draft-player { border: 0; border-top: 1px solid #dfe7d9; padding: 13px 0 0; margin: 0; min-width: 0; position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.draft-player legend { font-size: 10px; color: #8a997d; padding: 0 8px 0 0; }
.draft-name { grid-column: 1 / -1; }
.remove-draft { position: absolute; top: -21px; right: -4px; min-width: 30px; min-height: 30px; font-size: 20px; background: #f7faf4; color: #9ba890; border-radius: 5px; }
.remove-draft:hover { color: #9a563f; }
.draft-player .field>input, .draft-player .field>select { min-height: 44px; font-size: 16px; background-color: white; }
.draft-player .field>select { padding-left: 9px; padding-right: 27px; background-position: right 7px center; }
.batch-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 19px; }
.batch-actions .button { font-size: 11px; padding: 10px 11px; }
#batch-error { margin-top: 15px; }
.recruitment-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 10px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 0; margin-top: 13px; }
.recruitment-field { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.recruitment-field>select { width: 87px; flex-shrink: 0; min-height: 38px; font-size: 13px; padding: 8px 24px 8px 9px; background-position: right 7px center; }
#recruit-add { padding: 8px; min-height: 38px; font-size: 11px; }
#recruitment-help { grid-column: 1 / -1; margin-top: 6px; font-size: 9px; }
.contact-add:disabled { color: #607954; background: #e7eedd; opacity: 1; }
.members-panel:has(#add-panel:not([hidden])) .empty-players { display: none; }
@media (max-width: 359px) {
  .player-options { padding-left: 0; }
  .draft-player { gap: 10px; }
  .draft-player .field>select { font-size: 16px; padding-left: 5px; padding-right: 21px; background-position: right 3px center; }
  .batch-editor { padding: 12px; }
  .recruitment-controls { column-gap: 6px; }
  .recruitment-field { font-size: 10px; }
  .recruitment-field>select { width: 78px; }
}
@media (hover: none) {
  .player-options select { font-size: 16px; min-height: 38px; padding-right: 25px; }
  .recruitment-field>select { font-size: 16px; min-height: 44px; }
}
body:not(.has-calculation) { padding-bottom: 24px; }
.split-fields { margin-top: 0; }
/* Compact session layout: spend screen space on players, not card chrome. */
main { padding: 0 12px; }
.topbar-inner { padding: 8px 14px; }
.brand { font-size: 21px; }
.brand img { width: 31px; height: 31px; }
.session-toolbar { padding: 10px 0; }
.date-field input { min-height: 38px; padding: 7px 9px; }
.workspace, .editor, .results { gap: 9px; }
.panel, .members-panel { padding: 12px; border-radius: 11px; }
.section-heading, .members-panel>.section-heading { margin-bottom: 9px; }
h2 { font-size: 14px; }
.cost-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.7fr); gap: 9px; }
.cost-panel>.section-heading, .cost-panel>.cost-line, .cost-panel>.cost-total { grid-column: 1 / -1; margin: 0; }
.cost-panel>.section-heading { margin-bottom: 0; }
.shuttle-fields { margin: 0; gap: 8px; grid-template-columns: minmax(0,1fr) minmax(0,.8fr); }
.multiply { display: none; }
.field { gap: 5px; font-size: 10px; }
.input-unit { min-height: 39px; padding: 0 9px; }
.input-unit input, .split-fields .input-unit input { padding: 8px 0; font-size: 17px; }
.input-unit>span { font-size: 11px; }
.cost-panel>.hint, #split-hint, .local-note { display: none; }
.cost-total { padding-top: 9px; }
.cost-total strong { font-size: 20px; }
.split-fields { gap: 9px; }
.total-banner { padding: 12px 15px; border-radius: 11px; }
.total-banner strong { font-size: 29px; }
.total-detail { gap: 3px; }
.filters button { min-height: 34px; padding: 5px 2px; }
.add-button { min-height: 34px; padding: 6px 9px; }
.player-row { display: grid; grid-template-columns: minmax(0,1fr) auto 30px 25px; gap: 6px; min-height: 55px; padding: 4px 0; }
.player-identity { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.player-name { font-size: 16px; line-height: 21px; padding: 0; min-height: 23px; }
.player-options { grid-column: auto; grid-row: auto; padding: 0; gap: 4px; align-items: center; }
.row-amount { font-size: 15px; white-space: nowrap; }
.paid-label { grid-column: auto; grid-row: auto; min-height: 34px; justify-content: center; padding: 0; }
.paid-label>span { display: none; }
.remove-player { min-width: 25px; min-height: 34px; padding: 0; font-size: 18px; }
.collection { padding-top: 10px; }
.collection>div { flex-direction: row; align-items: baseline; gap: 7px; }
.collection strong { font-size: 16px; }
.group-details { margin-top: 9px; }
.group-details summary { padding-top: 7px; min-height: 26px; }
.recruitment-controls { padding: 8px 0; margin-top: 7px; }
#recruitment-help { margin-top: 2px; }
.save-button { min-height: 36px; padding: 8px; }
.action-bar { padding: 8px 12px max(8px,env(safe-area-inset-bottom)); }
.action-bar .button { min-height: 40px; padding: 9px 13px; }
.result-jump { min-height: 38px; }
.result-jump strong { font-size: 22px; }
.ts-wrapper { margin: 0; min-width: 0; font-size: 13px; }
.ts-wrapper.single .ts-control { background: white; box-shadow: none; border: 1px solid #dce4da; border-radius: 7px; padding: 9px 28px 9px 10px; min-height: 38px; display: flex; align-items: center; line-height: 18px; cursor: pointer; }
.ts-wrapper.single .ts-control:after { border: 0; width: 13px; height: 13px; background: url('/chevron.svg') center/13px no-repeat; top: 50%; right: 8px; margin-top: -6.5px; }
.ts-wrapper.single.dropdown-active .ts-control:after { transform: rotate(180deg); margin-top: -6.5px; border: 0; }
.ts-wrapper.focus .ts-control { border-color: #8ca580; box-shadow: 0 0 0 2px #eaf1e3; }
.ts-dropdown { border: 1px solid #dbe5d5; border-radius: 8px; box-shadow: 0 5px 18px #203c3219; margin-top: 4px; overflow: hidden; color: var(--ink); font-size: 13px; z-index: 20; min-width: 100%; }
.ts-dropdown .option { padding: 9px 10px; min-height: 37px; white-space: nowrap; }
.ts-dropdown .active { color: var(--green); background: #eaf3e3; }
.ts-dropdown .selected { font-weight: 600; color: var(--green); }
.ts-wrapper.disabled { opacity: .5; }
.player-options .ts-wrapper { width: 57px; flex: 0 0 auto; font-size: 11px; }
.player-options .ts-wrapper.tier-select { width: 92px; }
.player-options .ts-wrapper.single .ts-control { padding: 2px 18px 2px 6px; min-height: 25px; line-height: 19px; border-radius: 5px; background: #f6f9f2; font-size: 11px; }
.player-options .ts-wrapper.is-guest .ts-control { background: #fcf6e8; border-color: #eee2c9; color: #937341; }
.player-options .ts-wrapper.single .ts-control:after { right: 4px; width: 10px; background-size: 10px; }
.recruitment-field .ts-wrapper { width: 86px; flex: 0 0 auto; }
.recruitment-field .ts-wrapper.single .ts-control { min-height: 34px; padding: 6px 23px 6px 8px; font-size: 12px; }
.batch-editor { margin: 8px 0; padding: 10px; }
.batch-heading { margin-bottom: 5px; }
.batch-heading h3 { font-size: 12px; }
.contact-search { position: relative; }
.contact-search>input { min-height: 36px; padding: 7px 9px; }
#contact-suggestions { margin-top: 6px; gap: 5px; max-height: 88px; }
.contact-add, .contact-remove { min-height: 31px; padding-top: 5px; padding-bottom: 5px; }
#player-fields { margin-top: 10px; gap: 6px; }
.draft-player { grid-template-columns: minmax(60px,1fr) 58px 88px 22px; gap: 5px; border: 0; padding: 0; align-items: center; }
.draft-player legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.draft-player .field { font-size: 0; gap: 0; }
.draft-name { grid-column: auto; grid-row: 1; }
.draft-player .field:nth-last-child(2) { grid-column: 2; grid-row: 1; }
.draft-player .field:last-child { grid-column: 3; grid-row: 1; }
.draft-player .field>input { min-height: 36px; height: 36px; padding: 6px; font-size: 16px; }
.draft-player .ts-wrapper.single .ts-control { min-height: 36px; padding: 7px 17px 7px 6px; font-size: 11px; }
.draft-player .ts-wrapper.single .ts-control:after { right: 3px; width: 11px; }
.remove-draft { position: static; grid-column: 4; grid-row: 1; min-width: 22px; min-height: 36px; background: none; }
.batch-actions { margin-top: 9px; gap: 6px; }
.batch-actions .button { min-height: 36px; padding: 7px 10px; }
@media(min-width:520px) {
  .player-row { min-height: 42px; }
  .player-identity { flex-direction: row; align-items: center; gap: 9px; }
  .player-name { flex: 1; min-width: 0; }
  .player-options { flex-shrink: 0; }
  .draft-player { grid-template-columns: minmax(90px,1fr) 70px 110px 24px; }
}
@media(min-width:860px) {
  main, .topbar-inner { padding-left: 20px; padding-right: 20px; }
  .workspace { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 14px; }
}
@media(max-width:359px) {
  .panel, .members-panel { padding: 10px; }
  .batch-editor { padding: 8px; }
  .draft-player { grid-template-columns: minmax(56px,1fr) 53px 82px 20px; gap: 4px; }
  .player-row { grid-template-columns: minmax(0,1fr) auto 26px 21px; gap: 4px; }
  .player-options .ts-wrapper { width: 52px; }
  .player-options .ts-wrapper.tier-select { width: 86px; }
}

.ts-control>.item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ts-control:focus-visible { outline: 2px solid #8ca580; outline-offset: 1px; }
.ts-wrapper { --ts-pr-min: 26px; --ts-pr-caret: 16px; }
.player-options .ts-wrapper, .draft-player .ts-wrapper { --ts-pr-min: 18px; --ts-pr-caret: 16px; }
.ts-wrapper.single { --ts-pr-min: 26px; --ts-pr-caret: 16px; }
.player-options .ts-wrapper.single, .draft-player .ts-wrapper.single { --ts-pr-min: 18px; --ts-pr-caret: 16px; }
/* Override Tom Select's control-level sizing variables, not its wrapper. */
.ts-wrapper.single .ts-control { --ts-pr-min: 26px; --ts-pr-caret: 16px; }
.player-options .ts-wrapper.single, .player-options .ts-wrapper.single .ts-control { min-height: 25px; height: 25px; }
.player-options .ts-wrapper.single .ts-control, .draft-player .ts-wrapper.single .ts-control { --ts-pr-min: 18px; --ts-pr-caret: 16px; }
/* Before settlement, the only bottom-bar information is attendance. */
body, body:not(.has-calculation) { padding-bottom: 88px; }
.workspace.roster-only { grid-template-columns: minmax(0,1fr); max-width: 760px; margin: 0 auto; }
.attendance-status { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.attendance-status>span { font-size: 9px; color: var(--muted); }
.attendance-status>strong { font-size: 17px; white-space: nowrap; font-weight: 650; letter-spacing: -.4px; }
.attendance-actions { display: flex; gap: 7px; align-items: center; }
.action-bar .attendance-actions .button { min-width: 0; min-height: 40px; font-size: 11px; padding: 9px 12px; }
.settlement-heading { display: flex; flex-direction: column; gap: 5px; padding: 4px 1px; }
.settlement-heading strong { font-size: 15px; }
.settlement-heading span { font-size: 10px; color: var(--muted); }
#settlement-fields { scroll-margin-top: 10px; }
.closed-costs { font-size: 11px; color: #74806b; line-height: 1.6; padding: 0 3px; }
.profit-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #edf3e7; }
.profit-summary > div { display: flex; align-items: baseline; gap: 9px; white-space: nowrap; font-size: 12px; }
.profit-summary strong { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--green); }
.profit-summary p { font-size: 10px; line-height: 1.5; color: #63745c; text-align: right; overflow-wrap: anywhere; }
@media(max-width:359px) {
  .attendance-status>strong { font-size: 15px; }
  .action-inner { gap: 8px; }
  .attendance-actions { gap: 5px; }
  .action-bar .attendance-actions .button { font-size: 10px; padding: 8px 9px; }
}
.session-closed .player-options .ts-wrapper.disabled { opacity: 1; }
.session-closed .player-options .ts-wrapper.disabled .ts-control,
.session-closed .player-options .ts-wrapper.disabled .ts-control>* { opacity: 1; }
.session-closed .player-options .ts-control:after { display: none; }
