/* DIRTy Racing — Club Ladder team week grid (docs/ladder-team-plan.md 5.3) */

/* Top and bottom only: the sides keep .container's gutter (a 0 here ran the cards to the screen edge on phones) */
.lt-page { padding-top: 1.25rem; padding-bottom: 3rem; }
@media (max-width: 600px) { .lt-page { padding-left: 1rem; padding-right: 1rem; } }

/* ── Head ───────────────────────────────────────────────────────────── */
.lt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lt-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b4443a; margin: 0 0 .25rem; }
.lt-title { font-size: 1.6rem; font-weight: 800; margin: 0; line-height: 1.2; }
.lt-weeknav { display: flex; gap: .4rem; flex-wrap: wrap; }

.lt-btn { display: inline-block; padding: .4rem .8rem; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff; color: #222; font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer; line-height: 1.2; }
.lt-btn:hover { background: #f3f3f3; text-decoration: none; }
.lt-btn--current { border-color: #b4443a; color: #b4443a; font-weight: 700; }
.lt-btn--primary { background: #b4443a; border-color: #b4443a; color: #fff; }
.lt-btn--primary:hover { background: #9a362d; }
.lt-btn--quiet { border-color: transparent; color: #666; }
.lt-btn[disabled] { opacity: .5; cursor: default; }

.lt-notice { background: #fff6e0; border: 1px solid #f0d58a; border-radius: 6px; padding: .6rem .9rem; margin: 0 0 1rem; font-size: .92rem; }

/* ── Toolbar / legend ───────────────────────────────────────────────── */
.lt-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.lt-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .82rem; color: #555; align-items: center; }
.lt-legend .lt-cell { width: 1.5rem; height: 1.5rem; font-size: .8rem; vertical-align: middle; margin-right: .2rem; }
.lt-legend__hint { color: #888; }
.lt-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.lt-actfor { font-size: .88rem; display: flex; gap: .4rem; align-items: center; }
.lt-actfor__hint { font-size: .8rem; color: #3b7dd8; }
.lt-select { font: inherit; font-size: .88rem; padding: .3rem .4rem; border: 1px solid #c9c9c9; border-radius: 6px; }

/* ── The grid ───────────────────────────────────────────────────────── */
.lt-gridwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e3e3e3; border-radius: 8px; background: #fff; }
.lt-grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; font-size: .9rem; }
.lt-grid th, .lt-grid td { padding: .25rem .3rem; text-align: center; border-bottom: 1px solid #eee; white-space: nowrap; }
.lt-grid thead th { background: #fafafa; font-weight: 600; font-size: .8rem; color: #444; position: sticky; top: 0; z-index: 2; }
.lt-grid__day { border-left: 2px solid #e3e3e3; }
.lt-grid__times th { font-weight: 500; color: #666; }
.lt-grid__time--fixture { color: #b4443a; font-weight: 700; }
.lt-grid__time small { display: block; font-weight: 400; color: #888; font-size: .7rem; }
.lt-grid__name { text-align: left !important; position: sticky; left: 0; background: #fff; z-index: 3; min-width: 10rem; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.lt-grid thead .lt-grid__name { z-index: 4; background: #fafafa; }
.lt-grid__week { min-width: 6.5rem; }
.lt-row--me .lt-grid__name { background: #fff4f2; }
.lt-row--me .lt-name { color: #b4443a; }
.lt-row--out td .lt-cell, .lt-row--away td .lt-cell { opacity: .55; }
.lt-name { font-weight: 600; display: block; }
.lt-meta { display: flex; gap: .35rem; flex-wrap: wrap; font-size: .68rem; color: #777; }
.lt-cat { font-weight: 700; color: #555; }
.lt-flag { color: #777; }
.lt-flag--warn { color: #b4443a; }

.lt-cell { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #bbb; font: inherit; font-weight: 700; cursor: pointer; transition: transform .05s; }
.lt-cell:not([disabled]):hover { transform: scale(1.08); border-color: #999; }
.lt-cell[disabled] { cursor: default; }
.lt-cell--yes   { background: #2e9e5b; border-color: #2e9e5b; color: #fff; }
.lt-cell--maybe { background: #f0b429; border-color: #f0b429; color: #222; }
.lt-cell--no    { background: #d9534f; border-color: #d9534f; color: #fff; }
.lt-cell.is-saving { opacity: .5; }
.lt-cell.is-error { outline: 2px solid #d9534f; }

.lt-mini { font: inherit; font-size: .72rem; padding: .15rem .45rem; border: 1px solid #ccc; border-radius: 10px; background: #fff; color: #555; cursor: pointer; }
.lt-mini.is-on { background: #555; border-color: #555; color: #fff; }
.lt-mini[disabled] { cursor: default; }
/* A captain's rows other than the one picked: keep "Out" visible, hide the buttons */
.lt-row[data-editable="0"] .lt-weekflag:not(.is-on), .lt-row[data-editable="0"] .lt-weeknote { visibility: hidden; }

.lt-sum th, .lt-sum td { background: #fafafa; font-weight: 700; border-top: 1px solid #ddd; }
.lt-sum--maybe td, .lt-sum--free td { font-weight: 500; color: #555; }
.lt-sum__cell--ok   { color: #2e9e5b; }
.lt-sum__cell--warn { color: #c98a00; }
.lt-sum__cell--low  { color: #b4443a; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.lt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.lt-card { background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; padding: 1rem 1.1rem; }
.lt-card h2 { font-size: 1.05rem; margin: 0 0 .5rem; display: flex; align-items: center; gap: .5rem; }
.lt-card h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
.lt-card__hint { font-size: .82rem; color: #666; margin: 0 0 .6rem; }
.lt-count { background: #b4443a; color: #fff; border-radius: 10px; padding: 0 .5rem; font-size: .8rem; }
.lt-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.lt-list li { padding: .25rem 0; border-bottom: 1px dashed #eee; display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.lt-empty { color: #2e9e5b; font-size: .9rem; }
.lt-card--how ul { padding-left: 1.1rem; font-size: .88rem; color: #444; line-height: 1.5; }
.lt-card--how code { background: #f3f3f3; border-radius: 3px; padding: .05rem .3rem; }

.lt-form label { display: block; font-size: .88rem; margin: .35rem 0; }
.lt-form input[type=number], .lt-form input[type=date], .lt-form input[type=text], .lt-form select { font: inherit; font-size: .88rem; padding: .3rem .4rem; border: 1px solid #c9c9c9; border-radius: 6px; }
.lt-form input[type=number] { width: 5rem; }
.lt-check { display: flex !important; gap: .45rem; align-items: center; }
.lt-form__row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.lt-form--inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.lt-form--inline label { margin: 0; }
.lt-status { font-size: .82rem; color: #666; }
.lt-status.is-ok { color: #2e9e5b; }
.lt-status.is-error { color: #b4443a; }

.lt-usual { border-collapse: collapse; font-size: .85rem; }
.lt-usual th { text-align: left; padding: .2rem .5rem .2rem 0; color: #555; font-weight: 600; }
.lt-usual td { padding: .15rem; }
.lt-usual .lt-cell { width: auto; height: 1.9rem; padding: 0 .5rem; font-weight: 600; font-size: .8rem; color: #555; }
.lt-usual .lt-cell--yes, .lt-usual .lt-cell--maybe { color: #fff; }
.lt-usual .lt-cell--maybe { color: #222; }

/* ── Note modal ─────────────────────────────────────────────────────── */
.lt-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.lt-modal[hidden] { display: none; }
.lt-modal__box { background: #fff; border-radius: 8px; padding: 1rem 1.2rem; width: min(420px, 100%); }
.lt-modal__box h3 { margin: 0 0 .5rem; font-size: 1rem; }
.lt-modal__box textarea { width: 100%; font: inherit; font-size: .9rem; padding: .4rem; border: 1px solid #c9c9c9; border-radius: 6px; }

/* ── Phone ──────────────────────────────────────────────────────────── */
/* vELO and Season columns, the line-ups this week, sortable headings */
.lt-grid__stat { min-width: 3.6rem; font-variant-numeric: tabular-nums; }
.lt-grid__stat small { display: block; font-size: .66rem; color: #888; font-weight: 400; margin-top: 1px; }
.lt-grid__stat b { font-size: .92rem; }
.lt-velo { display: inline-block; min-width: 2.6rem; padding: .1rem .35rem; border-radius: 10px; font-weight: 700; font-size: .78rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.lt-velo--none { color: #aaa; font-weight: 400; }
.lt-velo-inline { display: none; }
.lt-velo-inline .lt-velo { min-width: 0; font-size: .66rem; padding: 0 .3rem; }
.lt-wk { font-weight: 600; color: #555; }
.lt-wk--full { color: #b4443a; }
.lt-sort { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.lt-sort::after { content: ' ↕'; color: #bbb; font-size: .8em; }
.lt-grid th[aria-sort="ascending"] .lt-sort::after { content: ' ▲'; color: #b4443a; }
.lt-grid th[aria-sort="descending"] .lt-sort::after { content: ' ▼'; color: #b4443a; }

/* The day strip: phones show the table one day at a time (cells of other days carry .is-offday) */
.lt-daystrip { display: none; }
.lt-daychip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: .3rem 0 .35rem; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #444; font: inherit; line-height: 1.1; cursor: pointer; }
.lt-daychip span { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; color: #777; }
.lt-daychip b { font-size: 1rem; }
.lt-daychip i { position: absolute; top: -.45rem; right: -.2rem; font-style: normal; font-size: .7rem; }
.lt-daychip.is-today b { color: #b4443a; }
.lt-daychip.is-current { border-color: #b4443a; background: #fff4f2; box-shadow: 0 0 0 1px #b4443a; }

@media (max-width: 640px) {
  .lt-title { font-size: 1.25rem; }
  .lt-daystrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(2.3rem, 1fr)); gap: .25rem; margin: .2rem 0 .6rem; }
  .lt-grid { font-size: .82rem; min-width: 0; }
  .lt-grid .is-offday, .lt-grid .lt-grid__stat { display: none; }
  .lt-velo-inline { display: inline; }
  .lt-grid__name { min-width: 7.5rem; max-width: 11rem; white-space: normal !important; }
  .lt-cell { width: 2.4rem; height: 2.4rem; }
  .lt-grid__week { min-width: 4.5rem; }
  .lt-grid__week .lt-mini { display: block; margin: .15rem auto; }
  .lt-weekflag { font-size: .65rem; }
  .lt-legend__hint { display: none; }
}
.lt-row--acting .lt-grid__name { background: #eef6ff; }
.lt-row--acting .lt-name::after { content: ' ← answering'; font-weight: 400; color: #3b7dd8; font-size: .72rem; }

/* ── Team, rider and public pages (docs/ladder-team-plan.md 5.9) ───────── */
.lt-cards--wide { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.lt-card--table { margin-top: 1rem; }
.lt-swatch { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .4rem; vertical-align: baseline; }
.lt-form { display: inline-flex; gap: 2px; align-items: center; margin-left: .4rem; font-weight: 400; }
.lt-form small { font-size: .7rem; color: #888; margin-left: .3rem; }
.lt-form__sq { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; background: #ccc; }
/* The grid's settings forms share the .lt-form name with the form squares above: keep them forms */
form.lt-form { display: block; margin-left: 0; }
form.lt-form--inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.lt-form__sq--W { background: #2e9e5b; }
.lt-form__sq--L { background: #d9534f; }
.lt-score { font-variant-numeric: tabular-nums; }
.lt-score--W { color: #2e9e5b; }
.lt-score--L { color: #b4443a; }
.lt-big { font-size: 2.2rem; font-weight: 800; margin: 0 0 .5rem; }
.lt-big small { font-size: .95rem; font-weight: 500; color: #666; }
.lt-spark { display: flex; align-items: flex-end; gap: 2px; height: 60px; border-bottom: 1px solid #ddd; }
.lt-spark i { flex: 1 1 0; background: #b4443a; opacity: .75; min-width: 3px; border-radius: 2px 2px 0 0; }
.lt-table { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 720px; }
.lt-table th, .lt-table td { padding: .35rem .5rem; text-align: right; border-bottom: 1px solid #eee; white-space: nowrap; }
.lt-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #666; }
.lt-table th:first-child, .lt-table td:first-child, .lt-table__name { text-align: left; }
.lt-table .lt-row--me td { background: #fff4f2; }
.lt-dots { text-align: left !important; }
.lt-dots--big .lt-dot { width: 1rem; height: 1rem; }
.lt-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: 2px; background: #ddd; vertical-align: middle; }
.lt-dot--raced { background: #2e9e5b; }
.lt-dot--picked { background: #f0b429; }
.lt-dot--avail { background: #8fd3a7; }
.lt-dot--answered { background: #bbb; }
.lt-dot--silent { background: #eee; border: 1px solid #ccc; }
.lt-dot--away { background: #9ec5e8; }
.lt-formcells { text-align: left !important; }
.lt-pos { display: inline-block; min-width: 1.5rem; padding: 0 .3rem; border-radius: 4px; text-align: center; font-size: .78rem; font-weight: 700; margin-right: 2px; background: #eee; color: #444; }
.lt-pos--W { background: #e3f5ea; color: #1f7a43; }
.lt-pos--L { background: #fbe6e5; color: #a33a35; }
.lt-facts { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; font-size: .9rem; margin: 0; }
.lt-facts dt { color: #666; }
.lt-facts dd { margin: 0; font-weight: 600; }
.lt-answers { display: flex; gap: .25rem; flex-wrap: wrap; align-items: center; }
.lt-cell--small { width: 1.6rem; height: 1.6rem; font-size: .8rem; }
.lt-up { color: #2e9e5b; } .lt-down { color: #b4443a; }

/* ── Auction offer preview (captains) ─────────────────────────────────── */
.lt-sum__cell--offer { cursor: pointer; text-decoration: underline dotted; }
.lt-sum__cell--offer:hover { background: #fff4f2; }
.lt-offer__text { font-weight: 600; margin: .25rem 0 .5rem; }
.lt-offer__blockers { margin: 0 0 .5rem 1.1rem; padding: 0; color: #b4443a; font-size: .88rem; }
.lt-offer__blockers:empty { display: none; }
.lt-offer__size { font-size: .88rem; display: block; margin: .4rem 0; }
.lt-offer__size select { font: inherit; padding: .2rem .4rem; border: 1px solid #c9c9c9; border-radius: 6px; }

/* Team jerseys (docs/ladder-jerseys.md) */
.lt-jerseys { display: flex; gap: 1rem; align-items: flex-end; }
.lt-jersey { margin: 0; text-align: center; font-size: .75rem; line-height: 1.2; }
.lt-jersey img { display: block; margin: 0 auto .2rem; width: 72px; height: 72px; object-fit: contain; }
.lt-jersey--alt img { width: 52px; height: 52px; opacity: .85; }
.lt-kit { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: .35rem; }
.lt-kit-warn { margin-right: .35rem; }


/* ── Public standings (/ladder) ───────────────────────────────────────── */
.lp-mine { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 1rem; margin: 0 0 1rem; border-radius: 8px; background: #fff4f2; border: 1px solid #f1c6c0; color: #222; text-decoration: none; }
.lp-mine:hover { background: #ffe9e5; text-decoration: none; }
.lp-mine__go { font-weight: 700; color: #b4443a; white-space: nowrap; }
.lp-standings { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.lp-team { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; grid-template-areas: "place main record" "place next open"; gap: .2rem 1rem; align-items: center;
           background: #fff; border: 1px solid #e3e3e3; border-left: 5px solid var(--team, #888); border-radius: 8px; padding: .7rem 1rem; }
.lp-team--mine { box-shadow: 0 0 0 2px #f1c6c0; }
.lp-team__place { grid-area: place; text-align: center; line-height: 1; }
.lp-team__place b { display: block; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lp-team__place small { font-size: .72rem; color: #777; }
.lp-team__main { grid-area: main; min-width: 0; }
.lp-team__name { font-size: 1.1rem; margin: 0; display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.lp-team__name small { font-size: .8rem; font-weight: 700; }
.lp-team__meta { margin: .1rem 0 0; font-size: .8rem; color: #666; display: flex; gap: .7rem; flex-wrap: wrap; }
.lp-team__record { grid-area: record; display: flex; align-items: center; gap: .6rem; justify-self: end; }
.lp-team__wl { font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-team__wl small { font-weight: 500; color: #777; font-size: .75rem; }
.lp-team__next { grid-area: next; font-size: .85rem; color: #333; }
.lp-team__next small { color: #888; text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; margin-right: .25rem; }
.lp-team__none { text-transform: none !important; letter-spacing: 0 !important; font-size: .8rem !important; }
.lp-team__open { grid-area: open; justify-self: end; font-size: .85rem; font-weight: 600; color: #b4443a; }
@media (max-width: 600px) {
  .lp-team { grid-template-columns: 3.4rem minmax(0, 1fr); grid-template-areas: "place main" "place record" "next next" "open open"; padding: .6rem .75rem; }
  .lp-team__place b { font-size: 1.6rem; }
  .lp-team__record { justify-self: start; }
  .lp-team__open { justify-self: start; }
}

/* ── My ladder (/ladder/me) ───────────────────────────────────────────── */
.lh-standing { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: .9rem; color: #444; }
.lh-standing__place b { font-size: 1.4rem; font-weight: 800; color: #222; }
.lh-empty p { margin: 0 0 .75rem; }
.lh-allset { color: #2e9e5b; font-weight: 600; margin: 0 0 1rem; }
.lh-todo { background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
.lh-todo h2 { font-size: 1rem; margin: 0 0 .4rem; }
.lh-todo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.lh-todo__item a { display: block; padding: .45rem .7rem; border-radius: 6px; text-decoration: none; color: #222; border-left: 4px solid #bbb; background: #f7f7f7; }
.lh-todo__item a:hover { background: #efefef; }
.lh-todo__item--urgent a { border-left-color: #d9534f; background: #fdeeed; font-weight: 600; }
.lh-todo__item--todo a { border-left-color: #f0b429; background: #fff8e6; }
.lh-todo__item--info a { color: #555; }
.lh-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.lh-main, .lh-side { display: grid; gap: 1rem; min-width: 0; }
@media (max-width: 860px) { .lh-layout { grid-template-columns: minmax(0, 1fr); } }
.lh .lt-card h2 small { font-weight: 400; }
.lh-more { margin: .6rem 0 0; }
.lh-more code { background: #f3f3f3; border-radius: 3px; padding: .05rem .3rem; }

.lh-race { border: 1px solid #eee; border-left: 4px solid #ccc; border-radius: 6px; padding: .6rem .8rem; margin-top: .6rem; }
.lh-race--go { border-left-color: #2e9e5b; background: #f6fcf8; }
.lh-race--reserve { border-left-color: #f0b429; }
.lh-race--out { border-left-color: #d9534f; }
.lh-race.is-target, .lh-week.is-target { box-shadow: 0 0 0 2px #f1c6c0; }
.lh-race__head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.lh-race__when { margin: 0; font-size: .8rem; color: #666; }
.lh-race__what { margin: .1rem 0 0; font-size: .98rem; }
.lh-pill { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 10px; background: #eee; color: #555; white-space: nowrap; }
.lh-pill--go { background: #2e9e5b; color: #fff; }
.lh-pill--reserve { background: #f0b429; color: #222; }
.lh-pill--out { background: #d9534f; color: #fff; }
.lh-race__act { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .55rem; }
.lh-race__ask { font-size: .88rem; font-weight: 600; margin-right: .2rem; }
.lh-race__note { font-size: .82rem; color: #666; margin: 0; }
.lh-respond.is-on { border-color: #2e9e5b; color: #1f7a43; font-weight: 700; }
.lh-respond--out { color: #b4443a; }
.lh-answer.is-on { font-weight: 700; color: #fff; }
.lh-answer--yes { background: #2e9e5b; border-color: #2e9e5b; }
.lh-answer--maybe { background: #f0b429; border-color: #f0b429; color: #222 !important; }
.lh-answer--no { background: #d9534f; border-color: #d9534f; }
.lh-answer.is-saving, .lh-slot.is-saving { opacity: .5; }
.lh-race__info { margin-top: .5rem; font-size: .84rem; color: #444; display: grid; gap: .25rem; }
.lh-race__info p { margin: 0; }
.lh-race__lineup span { color: #888; text-transform: uppercase; font-size: .68rem; letter-spacing: .05em; }
.lh-race__links { font-size: .8rem; }
.lh-kit { display: inline-flex; align-items: center; gap: .35rem; }
.lh-kit img { width: 26px; height: 26px; object-fit: contain; }
.lh-kit small { color: #777; }
.lh-kit--warn { color: #b4443a; }

.lh-week { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid #eee; }
.lh-week:first-of-type { border-top: 0; padding-top: 0; }
.lh-week__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lh-week__head h3 { margin: 0; font-size: .95rem; }
.lh-week__head h3 small { font-weight: 400; color: #777; }
.lh-week__tools { display: flex; gap: .35rem; flex-wrap: wrap; }
.lh-week.is-out .lh-slot { opacity: .5; }
.lh-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: .45rem 1.2rem; margin-top: .5rem; }
.lh-day { display: flex; align-items: center; gap: .3rem; flex-wrap: nowrap; }
.lh-day__name { width: 3.2rem; flex-shrink: 0; font-size: .78rem; font-weight: 700; color: #555; }
.lh-day__slots { display: flex; gap: .3rem; flex-wrap: wrap; }
.lh-slot { font: inherit; font-size: .78rem; padding: .3rem .45rem; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #444; cursor: pointer; min-height: 2.1rem; }
.lh-slot i { font-style: normal; font-weight: 700; margin-left: .15rem; color: #bbb; }
.lh-slot:not([disabled]):hover { border-color: #999; }
.lh-slot[disabled] { cursor: default; opacity: .55; }
.lh-slot--fixture { border-style: dashed; border-color: #b4443a; }
.lh-slot--yes { background: #2e9e5b; border-color: #2e9e5b; color: #fff; }
.lh-slot--maybe { background: #f0b429; border-color: #f0b429; color: #222; }
.lh-slot--no { background: #d9534f; border-color: #d9534f; color: #fff; }
.lh-slot--yes i, .lh-slot--no i { color: #fff; }
.lh-slot--maybe i { color: #222; }

/* Quick edit vs the full table; the two limits shown, not folded */
.lh-tag { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: #eef4fc; color: #2d6cc0; border-radius: 10px; padding: .12rem .5rem; }
.lh-fulltable { display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem; margin: .1rem 0 .8rem; border: 1px solid #f1c6c0; border-radius: 8px; background: #fff4f2; color: #222; text-decoration: none; }
.lh-fulltable:hover { background: #ffe9e5; text-decoration: none; }
.lh-fulltable__icon { font-size: 1.4rem; line-height: 1; }
.lh-fulltable__text { flex: 1; min-width: 0; }
.lh-fulltable__text b { display: block; color: #b4443a; }
.lh-fulltable__text small { display: block; color: #555; font-size: .8rem; line-height: 1.35; margin-top: .1rem; }
.lh-fulltable__go { font-size: 1.6rem; line-height: 1; color: #b4443a; font-weight: 700; }
.lh-limits { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; padding: .55rem .75rem; margin: 0 0 .7rem; background: #fafafa; border: 1px solid #eee; border-radius: 8px; font-size: .88rem; }
.lh-limits__max { display: flex; align-items: center; gap: .45rem; font-weight: 600; margin: 0; }
.lh-limits select { font: inherit; font-size: .88rem; padding: .3rem .4rem; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff; }
.lh-limits .lh-check { font-weight: 600; margin: 0; cursor: pointer; }
.lh-limits input[type=checkbox] { width: 1.05rem; height: 1.05rem; }
.lh-limits__hint { flex-basis: 100%; color: #777; font-size: .76rem; }
.lh-weektable { text-decoration: none; color: #b4443a; border-color: #f1c6c0; }
.lh-weektable:hover { background: #fff4f2; text-decoration: none; }
.lh-week__note { margin: .4rem 0 0; font-size: .82rem; color: #555; background: #fffbea; border-left: 3px solid #f0b429; padding: .3rem .55rem; border-radius: 4px; }
.lh-week.is-out .lh-dayrow { opacity: .6; }

/* Wide screens: every day at once, tap to cycle. Phones: one day at a time with Yes / Maybe / No. */
.lh-daystrip, .lh-day__rows, .lh-narrow { display: none; }
.lh-chip { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: .3rem 0 .35rem; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #444; font: inherit; line-height: 1.1; cursor: pointer; }
.lh-chip span { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; color: #777; }
.lh-chip b { font-size: 1rem; }
.lh-chip i { width: .55rem; height: .55rem; border-radius: 50%; background: #ddd; margin-top: 2px; }
.lh-chip--todo i { background: #fff; box-shadow: inset 0 0 0 2px #b4443a; }
.lh-chip--yes i { background: #2e9e5b; }
.lh-chip--maybe i { background: #f0b429; }
.lh-chip--no i { background: #d9534f; }
.lh-chip--past { opacity: .55; }
.lh-chip[disabled] { opacity: .35; cursor: default; }
.lh-chip.is-today b { color: #b4443a; }
.lh-chip.is-current { border-color: #b4443a; background: #fff4f2; box-shadow: 0 0 0 1px #b4443a; opacity: 1; }
.lh-dayrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; padding: .45rem .55rem; border: 1px solid #eee; border-radius: 8px; }
.lh-dayrow--fixture { border: 1px dashed #e0a49c; }
.lh-dayrow__time { font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; min-width: 0; }
.lh-dayrow__time small { display: block; font-weight: 500; font-size: .72rem; color: #b4443a; }
.lh-seg { display: flex; gap: .3rem; flex-shrink: 0; }
.lh-seg .lt-btn { padding: .5rem .55rem; min-height: 2.6rem; font-size: .85rem; }
.lh-daynav { display: flex; justify-content: space-between; margin-top: .15rem; }
.lh-daynav .lt-mini { padding: .35rem .75rem; font-size: .8rem; }
@media (max-width: 600px) {
  .lh-wide { display: none; }
  .lh-narrow { display: inline; }
  .lh-daystrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; margin: .6rem 0 .5rem; }
  .lh-days { display: block; margin-top: 0; }
  .lh-day { display: none; }
  .lh-day.is-current { display: block; }
  .lh-day__name { width: auto; display: block; }
  .lh-day__name .lh-narrow { display: block; font-size: .95rem; color: #222; margin: .1rem 0 .45rem; }
  .lh-day__slots { display: none; }
  .lh-day__rows { display: grid; gap: .4rem; }
  .lh-fulltable__text small { font-size: .78rem; }
}

.lh-record { margin: 0 0 .4rem; font-size: 1.3rem; }
.lh-record small { font-size: .78rem; }
.lh-jerseys { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .8rem; margin: .4rem 0; }
.lh-jerseys span { display: inline-flex; align-items: center; gap: .3rem; }
.lh-jerseys img { width: 34px; height: 34px; object-fit: contain; }
.lh-staff { font-size: .85rem; margin: .4rem 0 0; }
.lh-staff .lt-meta { display: inline; text-transform: uppercase; font-size: .68rem; letter-spacing: .05em; margin-right: .3rem; }
.lh-settings details + details { margin-top: .6rem; border-top: 1px solid #eee; padding-top: .6rem; }
.lh-settings summary { cursor: pointer; list-style: none; }
.lh-settings summary::-webkit-details-marker { display: none; }
.lh-settings summary h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.lh-settings summary h2::after { content: '▸'; font-size: .8rem; color: #888; margin-left: auto; }
.lh-settings details[open] summary h2::after { content: '▾'; }
.lh-settings details[open] summary { margin-bottom: .5rem; }
.lh-form label { display: block; font-size: .86rem; margin: .35rem 0; }
.lh-form input[type=number], .lh-form input[type=date], .lh-form input[type=text], .lh-form select { font: inherit; font-size: .86rem; padding: .3rem .4rem; border: 1px solid #c9c9c9; border-radius: 6px; max-width: 100%; }
.lh-form input[type=number] { width: 5rem; }
.lh-check { display: flex !important; gap: .45rem; align-items: center; }
.lh-form__row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }

.lh-count0 { background: #ddd; color: #666; }
