/* TMT — app styles. Single file on purpose: shared hosts cache badly and
   one ?v= bump beats chasing three. */

:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --line: #e2ddd1;
  --ink: #182420;
  --ink-soft: #5e6a63;
  --accent: #1e6f4e;
  --accent-soft: #e3f0e9;
  --good: #1e6f4e;
  --warn: #8a5a00;
  --bad: #b0332a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------- chrome */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand-mark { font-weight: 700; letter-spacing: -.01em; }
.brand-club { color: var(--ink-soft); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700;
}
.role-chip {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 9px;
}
.env-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  background: #fff4d6; color: #7a5200; border: 1px solid #f0dca6;
  border-radius: 4px; padding: 2px 7px;
}

.tabs {
  display: flex; gap: 2px; padding: 0 12px; background: var(--surface);
  border-bottom: 1px solid var(--line); overflow-x: auto;
}
.tab {
  border: 0; background: none; padding: 12px 14px; cursor: pointer;
  color: var(--ink-soft); font: inherit; font-size: 14px;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab[hidden] { display: none; }

.view { padding: 22px; max-width: 1180px; margin: 0 auto; }

/* --------------------------------------------------------------- bits */

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 26px 0 10px; }
.muted { color: var(--ink-soft); }
.sub { color: var(--ink-soft); margin: 0 0 18px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.stat { text-align: left; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.stat.alert .stat-value { color: var(--bad); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-weight: 600; }
tbody tr:hover { background: #f9f7f2; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.btn {
  display: inline-block; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 7px; padding: 8px 14px; font: inherit;
  font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: #c9ced6; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #175a3f; }
.btn-ghost { border-color: transparent; color: var(--ink-soft); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 7px; font: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > div { flex: 1 1 180px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

.pill {
  display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap;
}
.pill-good { background: #e3f0e9; color: var(--good); border-color: #bfdccc; }
.pill-warn { background: #fcf1c9; color: var(--warn); border-color: #efd98f; }
.pill-bad  { background: #fbe8e5; color: var(--bad);  border-color: #f0c4bf; }

.alert { border-radius: 8px; padding: 11px 13px; margin: 0 0 14px; font-size: 14px; }
.alert-error { background: #fbe8e5; color: var(--bad); border: 1px solid #f0c4bf; }
.alert-warn  { background: #fcf1c9; color: var(--warn); border: 1px solid #efd98f; }
.alert-info  { background: var(--accent-soft); color: #174f37; border: 1px solid #cfe3d8; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: #182420; color: #fff; padding: 11px 18px; border-radius: 8px;
  font-size: 14px; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

/* --------------------------------------------------------------- auth */

.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 30px;
  box-shadow: var(--shadow);
}
.auth-title { font-size: 21px; margin: 0; }
.auth-sub { color: var(--ink-soft); margin: 4px 0 18px; font-size: 14px; }
.auth-card .btn-block { margin-top: 20px; }
.auth-foot { margin: 16px 0 0; font-size: 13px; text-align: center; }
.auth-foot a { color: var(--ink-soft); }

@media (max-width: 620px) {
  .view { padding: 16px; }
  .topbar { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ profile */
/* Same bones as the TMC profile modal: accent top border, compact
   upper-case field labels, name and address rows on a grid. */

button.avatar { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
button.avatar:hover, button.avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 20, 40, .5); z-index: 40;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: 12px; border-top: 4px solid var(--accent);
  box-shadow: 0 4px 16px rgba(24, 36, 32, .12), 0 16px 48px rgba(0, 0, 0, .18);
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 22px 24px 24px;
}
.modal h2 { font-size: 15px; font-weight: 700; color: var(--accent); margin: 0 0 4px; }
.modal-sub { font-size: 12px; color: var(--ink-soft); margin: 0 0 14px; }

.fg { margin-bottom: 10px; }
.fg label {
  display: block; font-size: 11px; font-weight: 500; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 3px;
}
.fg label .hint { text-transform: none; letter-spacing: 0; color: #8a958f; font-size: 10px; }
.fg input, .fg select { font-size: 13px; padding: 7px 10px; border-radius: 8px; }
.fr { display: grid; gap: 10px; }
.fr2 { grid-template-columns: 1fr 1fr; }
.fr-name { grid-template-columns: 1.3fr 1fr 1.3fr .7fr; }
.fr-addr { grid-template-columns: 2fr .8fr 1fr; }

.modal-section { background: var(--bg); border-radius: 8px; padding: 12px 14px; margin: 6px 0 10px; }
.modal-section-title {
  font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 8px;
}
.modal-msg { font-size: 11px; margin: 2px 0 6px; min-height: 14px; }
.modal-msg.ok { color: var(--good); }
.modal-msg.bad { color: var(--bad); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .fr-name, .fr-addr, .fr2 { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------- members etc */

.auth-card-wide { max-width: 560px; }
.auth-section { font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 0; }
.auth-hint { font-size: 12px; color: var(--ink-soft); margin: 6px 0 0; }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 8px 0; }
.check-row input[type="checkbox"] { width: auto; margin: 0; }

.roster-add { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.roster-add > div { flex: 1; }
.roster-add label { margin-top: 0; }
/* ------------------------------------------------------------- join */

.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .12em; text-transform: uppercase; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-row .check-row { margin: 4px 0 8px; }
.code-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.code-card .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
/* --------------------------------------------------------- club menu */

.club-menu { position: relative; }
.club-menu > summary { list-style: none; cursor: pointer; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 4px; }
.club-menu > summary::-webkit-details-marker { display: none; }
.club-menu > summary .caret { font-size: 11px; }
.club-menu[open] > summary { color: var(--ink); }
.club-menu-list {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; min-width: 260px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .14); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.club-menu-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%;
  padding: 8px 10px; border: 0; background: none; border-radius: 6px; font: inherit; font-size: 14px;
  color: var(--ink); text-decoration: none; cursor: pointer; text-align: left;
}
.club-menu-item:hover { background: var(--accent-soft); }
.club-menu-item.current { font-weight: 700; }
.club-menu-item small { color: var(--ink-soft); font-size: 12px; }
a.club-menu-item { color: var(--accent); border-top: 1px solid var(--line); border-radius: 0; margin-top: 2px; padding-top: 10px; }
a.club-menu-item + a.club-menu-item { border-top: 0; margin-top: 0; padding-top: 8px; }
/* ------------------------------------------------------------ landing */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.auth-home { color: inherit; text-decoration: none; }

body.lp { background: var(--surface); }
.lp-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px; max-width: 1080px; margin: 0 auto;
}
.lp-brand { font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.lp-nav { display: flex; align-items: center; gap: 18px; }
.lp-nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.lp-nav a:hover { color: var(--ink); }
.lp-nav .btn { color: var(--ink); }

.lp-hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center;
  max-width: 1080px; margin: 0 auto; padding: 48px 24px 64px;
}
.lp-hero h1 { font-size: 40px; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px; }
.lp-hero-text p { font-size: 17px; color: var(--ink-soft); margin: 0 0 12px; max-width: 520px; }

.lp-doors { display: grid; gap: 16px; }
.lp-door {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 18px;
}
.lp-door h2 { margin: 0 0 6px; font-size: 20px; }
.lp-door > p { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; }
.lp-fine { font-size: 12px; color: var(--ink-soft); margin: 10px 0 0 !important; }
.lp-fine a { color: var(--accent); }
.lp-code-form { display: flex; gap: 8px; }
.lp-code-form .code-input { flex: 1; min-width: 0; }
.lp-code-form .btn { flex: 0 0 auto; }

.lp-section { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }
.lp-section > h2 { font-size: 28px; letter-spacing: -.01em; margin: 0 0 28px; }
.lp-alt { max-width: none; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-alt .lp-features { max-width: 1032px; margin: 0 auto; }

.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lp-steps li { position: relative; padding-top: 44px; }
.lp-step-n {
  position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center;
}
.lp-steps h3, .lp-feature h3, .lp-role h3 { margin: 0 0 6px; font-size: 17px; }
.lp-steps p, .lp-feature p, .lp-role p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 28px; }
.lp-feature { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }

.lp-roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.lp-cta { display: flex; gap: 10px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }

.lp-foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 1080px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-soft);
}
.lp-foot a { color: var(--ink-soft); }

@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 24px; }
  .lp-hero h1 { font-size: 32px; }
  .lp-steps, .lp-features { grid-template-columns: 1fr; }
  .lp-roles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .lp-nav a:not(.btn) { display: none; }
  .lp-roles { grid-template-columns: 1fr; }
  .lp-code-form { flex-direction: column; }
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }

.court-pill { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0; }
.pill-x { border: 0; background: none; cursor: pointer; color: var(--ink-soft); font-size: 14px; line-height: 1; padding: 0 2px; }
.pill-x:hover { color: var(--bad); }

.jersey-input { width: 64px; padding: 4px 6px; font-size: 13px; }

/* --------------------------------------------------------------- logo */

.brand-icon { width: 26px; height: 26px; vertical-align: -7px; margin-right: 8px; }
a.brand-mark { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
a.brand-mark .brand-icon { vertical-align: middle; }
.lp-brand .brand-icon { width: 28px; height: 28px; vertical-align: -8px; }
.lp-logo { width: 360px; max-width: 100%; height: auto; margin: 0 0 18px -4px; display: block; }
.auth-logo { display: block; margin: -4px 0 14px; }
.auth-logo img { width: 300px; max-width: 100%; height: auto; display: block; }
.next-up { border-left: 4px solid var(--accent); margin-bottom: 18px; }
.next-up-main { font-size: 18px; font-weight: 700; margin: 2px 0; }

.stars { color: #d9a400; letter-spacing: .05em; white-space: nowrap; }
.stars-off { color: var(--line); }

.draft-banner { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
tr.current td { background: var(--accent-soft); }

.drafts-box { margin-top: 6px; }
.drafts-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.drafts-box > summary::-webkit-details-marker { display: none; }
.drafts-box > summary h2 { margin: 0; }
.drafts-box > summary h2 .muted { font-weight: 400; font-size: 15px; margin-left: 6px; }
.chev { width: 10px; height: 10px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .15s; margin-right: 6px; flex: none; }
details[open] > summary .chev { transform: rotate(45deg); }
.drafts-box[open] > summary { border-bottom: 0; }

.dates-cell { max-width: 320px; }
.dates-cell .pill { margin: 1px 0; }

/* status dots: green active / accepted, yellow invited, red disabled */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; background: var(--line); }
.dot-good { background: var(--good); }
.dot-warn { background: #e3b400; }
.dot-bad  { background: var(--bad); }
.date-chip { display: inline-block; white-space: nowrap; margin: 1px 8px 1px 0; font-size: 13px; }

.legend { white-space: nowrap; margin-left: 6px; }
.legend .dot { margin-left: 8px; }

.btn-icon { padding: 3px 8px; font-size: 15px; line-height: 1.2; min-width: 30px; }
.btn-danger:hover { color: var(--bad); border-color: var(--bad); }
.row-actions.icons { gap: 4px; flex-wrap: nowrap; }
.contact { font-size: 13px; white-space: nowrap; }
.contact a { color: var(--ink); text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* the action icons stay visible when a wide table scrolls sideways */
.col-actions { position: sticky; right: 0; background: var(--surface); box-shadow: -8px 0 8px -8px rgba(0,0,0,.18); width: 1%; white-space: nowrap; }
thead .col-actions { background: var(--bg); }

/* availability week strip */
.week { display: inline-flex; gap: 2px; }
.wd { width: 20px; height: 20px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); }
.wd.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.games-cell { white-space: nowrap; }
.games-cell .date-chip { font-size: 12px; margin-right: 6px; }

/* -------------------------------------------------------------- print */

.print-head { display: none; }

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .tabs, .toast, .modal-backdrop, .no-print, .col-actions, .row-actions, .btn, .draft-banner, .sub, .legend { display: none !important; }
  .print-head { display: block; font-size: 14pt; font-weight: 700; margin: 0 0 4pt; }
  .print-only { display: block !important; color: #444; margin-bottom: 8pt; }
  .view { padding: 0; max-width: none; }
  h1 { font-size: 18pt; margin: 0 0 6pt; }
  h2 { font-size: 13pt; margin: 12pt 0 4pt; }
  .table-wrap { overflow: visible; border: 0; box-shadow: none; }
  table { width: 100%; border-collapse: collapse; page-break-inside: auto; }
  tr { page-break-inside: avoid; }
  th, td { border-bottom: 1px solid #bbb; padding: 4pt 6pt; font-size: 10pt; vertical-align: top; }
  th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pill, .date-chip { border: 1px solid #999; background: none !important; color: #000 !important; }
  .dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wd.on { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .stars { color: #000; }
  .stars-off { color: #ccc; }
  a { color: #000; text-decoration: none; }
  @page { margin: 14mm; }
}
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--ink); }

/* search, filter, sort above a table */
.table-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.tools-search { flex: 1 1 220px; max-width: 360px; }
.tools-filter { flex: 0 1 auto; width: auto; }
.tools-count { font-size: 12px; margin-left: auto; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--ink); }
th.sorted { color: var(--accent); }
.sort-arrow { font-size: 9px; }

/* schedule grouped by day */
.day-row td { background: var(--bg); font-weight: 700; font-size: 13px; letter-spacing: .02em; padding: 8px 12px; border-top: 1px solid var(--line); }
.time-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.official-chip { white-space: nowrap; }
.schedule-table td { vertical-align: top; }
@media print { .day-row td { background: #eee !important; } }

.assign-box { margin: 0 0 14px; }
.assign-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.assign-box > summary::-webkit-details-marker { display: none; }
.assign-box > summary h2 { margin: 0; font-size: 16px; }
.assign-box[open] > summary { border-bottom: 0; }

.modal { position: relative; }
.modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-x:hover, .modal-x:focus-visible { color: var(--ink); background: var(--bg); outline: none; }
.modal h2 { padding-right: 32px; }

/* assign-officials dialog rows */
.person-list { display: flex; flex-direction: column; }
.person-list.scroll { max-height: 300px; overflow-y: auto; }
.person-row { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }
.person-name { font-weight: 600; }
.person-note { flex: 1; font-size: 12px; margin-left: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row.unfit .person-name { color: var(--ink-soft); font-weight: 500; }
.person-row .btn-sm { flex: 0 0 auto; }

/* password show/hide */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-soft); cursor: pointer; padding: 4px; border-radius: 6px; line-height: 0; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--accent); background: var(--accent-soft); outline: none; }

/* help */
.help-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-weight: 700; cursor: pointer; }
.help-btn:hover, .help-btn:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.help-section { border-bottom: 1px solid var(--line); padding: 4px 0; }
.help-section > summary { cursor: pointer; font-weight: 700; padding: 8px 0; list-style: none; }
.help-section > summary::-webkit-details-marker { display: none; }
.help-section > summary::before { content: '▸ '; color: var(--ink-soft); }
.help-section[open] > summary::before { content: '▾ '; }
.help-topic { margin: 0 0 4px 16px; }
.help-topic > summary { cursor: pointer; padding: 5px 0; color: var(--accent); }
.help-a { padding: 2px 0 10px; font-size: 14px; color: var(--ink); max-width: 62ch; }
.help-a ol, .help-a ul { margin: 6px 0; padding-left: 20px; }
.help-a li { margin: 3px 0; }

/* club tab cards */
.club-cards { margin-bottom: 8px; align-items: start; }
.code-card-2 .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 26px; font-weight: 700; letter-spacing: .12em; color: var(--accent); margin: 4px 0 6px; }

/* Email / SMTP (profile) */
.help-dot { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: var(--line); color: var(--muted); font-size: 11px; align-items: center; justify-content: center; margin-left: 6px; cursor: help; font-weight: 700; }
.howto { margin: 4px 0 12px; }
.howto summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.howto-body { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.howto-body p { margin: 6px 0 2px; }
.howto-body ol { margin: 0 0 6px; padding-left: 20px; }
.howto-body a { color: var(--accent); }
#p-mail .row-actions { margin-top: 8px; flex-wrap: wrap; gap: 8px; }

/* profile sections (collapsible) */
.psec { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; background: var(--bg); }
.psec > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.psec > summary::-webkit-details-marker { display: none; }
.psec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); white-space: nowrap; }
.psec-hint { margin-left: auto; font-size: 12px; color: var(--ink-soft); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psec[open] > summary { border-bottom: 1px solid var(--line); }
.psec[open] .psec-hint { display: none; }
.psec-body { padding: 10px 12px 12px; }
.psec-body .modal-section { background: transparent; padding: 0; margin: 0; }
@media (max-width: 560px) { .modal-actions .muted { flex-basis: 100%; margin-right: 0; } }

/* availability editor (profile) */
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 4px 14px; margin-top: 6px; min-width: 0; }
.av-row { display: flex; align-items: center; gap: 5px; padding: 2px 0; color: var(--ink-soft); min-width: 0; }
.av-row.on { color: var(--ink); }
.av-day { display: flex; align-items: center; gap: 5px; width: 52px; flex: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.av-day input { width: auto; margin: 0; }
.av-row input[type=time] { width: 76px; flex: none; padding: 4px 5px; font-size: 12px; border-radius: 6px; }
.av-row input[type=time]::-webkit-calendar-picker-indicator { display: none; }
.av-row input:disabled { opacity: .45; }
.av-dash { color: var(--muted); }
.av-actions { margin: 8px 0 0; justify-content: flex-end; }
.av-sub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin: 14px 0 6px; }
.av-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.av-add input[type=date] { width: 128px; flex: none; padding: 4px 6px; font-size: 12.5px; border-radius: 6px; }
.av-add input[type=text] { flex: 1 1 140px; padding: 4px 8px; font-size: 12.5px; border-radius: 6px; }
.av-bos { margin-top: 6px; }
.av-bo { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 3px 0; border-top: 1px solid var(--line); }
.av-bo-actions { margin-left: auto; display: flex; gap: 4px; }
.av-bo.editing { background: var(--accent-soft, #e6f2ec); border-radius: 6px; padding-left: 6px; }
.psec-body, .psec-body > * { min-width: 0; max-width: 100%; }

/* lineups */
.lu-row { display: grid; grid-template-columns: 22px 1fr 150px auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.lu-row.on { color: var(--ink); }
.lu-row input[type=checkbox] { width: auto; margin: 0; }
.lu-row .lu-pos { font-size: 13px; padding: 5px 8px; min-width: 0; }
.lu-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-num { font-size: 12px; color: var(--muted); text-align: center; }
.lu-pos-ro { font-size: 13px; }
.lu-move { display: flex; gap: 2px; }
.lu-move .btn-icon { font-size: 10px; }
.lu-list.bench .lu-row { grid-template-columns: 22px 1fr 150px; }
.pos-input { width: 150px; font-size: 13px; padding: 5px 8px; }
.lu-row .lu-pos { width: 100%; }
.lineup-status { font-size: 12px; white-space: nowrap; margin-right: 6px; }
.lineup-mini { font-size: 12px; color: var(--ink-soft); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.lineup-mini u { text-decoration: none; font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--accent); }
.cocap { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.cocap input { width: auto; margin: 0; }
@media (max-width: 560px) { .lu-row, .lu-list.bench .lu-row { grid-template-columns: 22px 1fr; } .lu-row .lu-pos, .lu-move, .lu-pos-ro { grid-column: 2; } }

/* hover card (lineup preview) */
.hover-wrap { position: relative; display: inline-block; cursor: default; }
.hover-card { display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 220px; max-width: 320px; text-align: left; white-space: normal; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 8px 10px; font-size: 12px; line-height: 1.5; }
.hover-card b { display: block; margin-bottom: 4px; color: var(--accent); }
.hover-row { display: block; }
.hover-wrap:hover .hover-card, .hover-wrap:focus .hover-card, .hover-wrap:focus-within .hover-card { display: block; }
/* The pinned action column is sticky, so each cell is its own layer; lift the one being hovered above the rows below. */
td.col-actions:hover, td.col-actions:focus-within { z-index: 30; }
tr:last-child .hover-card { top: auto; bottom: calc(100% + 4px); }

/* About you — the one block, the same in every TrackingMy app: Teams' look. */
.about .fg { margin: 0 0 10px; min-width: 0; }
.about .fg label { display: block; font-size: 11px; font-weight: 500; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 3px; }
.about .fg label .hint { text-transform: none; letter-spacing: 0; font-size: 10px; opacity: .8; }
.about .fg input { width: 100%; box-sizing: border-box; font-size: 13px; padding: 7px 10px; border-radius: 8px; margin: 0; }
.about .fr { display: grid; gap: 10px; }
.about .about-name { grid-template-columns: .7fr 1.3fr 1fr 1.3fr .7fr; }
.about .about-when { grid-template-columns: 1fr 1fr 1fr; }
.about .about-where { grid-template-columns: 1.6fr .9fr .9fr 1.4fr; }
.about .auth-hint, .about .about-hint { font-size: 12px; color: var(--ink-soft); margin: 0 0 10px; }
@media (max-width: 560px) { .about .about-name, .about .about-when, .about .about-where { grid-template-columns: 1fr 1fr; } }

/* The question sheet: small, over everything, with its × like every other sheet. */
.ask-sheet { max-width: 440px; }
.ask-text { white-space: pre-line; }
.ask-copy { display: flex; gap: 6px; margin: 8px 0 4px; }
.ask-copy input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
