/* Lineup Builder (Pre-Scout Prep > Allen, and Segall's notes-free sheet,
   .lb-s-segall below). See js/lineup-builder.js.
   The sheet is sized in cqw (1% of the sheet's own width) so it scales as one
   piece on screen and on paper, like the one-page template it reproduces. */

.lb-wrap { position: relative; margin-bottom: 1rem; }
.lb-bar {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.5rem 0.75rem; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 10px;
}
.lb-wrap:not(.lb-collapsed) .lb-bar { border-radius: 10px 10px 0 0; }
.lb-bar-title {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--oilers-orange);
}
.lb-src { flex: 1; min-width: 12rem; font-size: 0.72rem; color: var(--text3); }
.lb-status { font-size: 0.7rem; color: var(--text3); }
.lb-status.lb-bad { color: var(--bad-text, #c0392b); }
.lb-btn {
  font: inherit; font-size: 0.72rem; font-weight: 600; cursor: pointer;
  padding: 0.25rem 0.65rem; border-radius: 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.lb-btn:hover { border-color: var(--oilers-orange); color: var(--oilers-orange); }
.lb-btn:disabled { opacity: 0.5; cursor: default; }
.lb-btn:disabled:hover { border-color: var(--border); color: var(--text); }
.lb-btn.lb-primary { background: var(--oilers-orange); border-color: var(--oilers-orange); color: #fff; }
.lb-btn.lb-primary:hover { color: #fff; filter: brightness(1.08); }
/* Season / Last 5 switch (js/lineup-builder.js, last5Toggle) */
.lb-span { display: inline-flex; }
.lb-span .lb-btn { border-radius: 0; }
.lb-span .lb-btn:first-child { border-radius: 6px 0 0 6px; }
.lb-span .lb-btn + .lb-btn { border-radius: 0 6px 6px 0; margin-left: -1px; }
.lb-span .lb-btn.lb-on { background: var(--oilers-orange); border-color: var(--oilers-orange); color: #fff; position: relative; }
.lb-body-wrap {
  border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px;
  background: #fff; padding: 0.75rem; overflow: hidden;
}
.lb-wrap.lb-collapsed .lb-body-wrap { display: none; }
/* Read-only (no lineupSheetsEdit, js/lineup-builder.js readOnly): the edit
   controls go, as they do in an export. */
.lb-ro [data-act="reset"], .lb-ro [data-act="save"], .lb-ro [data-act="d4"], .lb-ro [data-act="f5"],
.lb-ro .lb-add, .lb-ro .lb-add7, .lb-ro .lb-o-x, .lb-ro .lb-o-add, .lb-ro .lb-o-reset, .lb-ro .lb-o-hide,
.lb-ro .lb-scr-add, .lb-ro .lb-unused { display: none !important; }
.lb-ro .lb-note:hover { border-color: transparent; }
.lb-msg { padding: 1.2rem; font-size: 0.82rem; color: #555; text-align: center; }

/* Redzone is the sheet's typeface (the staff template's); the notes stay Rubik.
   One face, declared across the whole weight range so the browser never
   fakes a bolder one. */
@font-face {
  font-family: 'Redzone';
  src: url('../fonts/redzone-120.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── the sheet ───────────────────────────────────────────────────────── */
.lb-sheet {
  container-type: inline-size; max-width: 1180px; margin: 0 auto;
  background: #fff; color: var(--lb-navy); font-family: var(--lb-font);
  --lb-navy: #0A2159; --lb-orange: #C15030;
  /* Horizontal spacing factor: 1 everywhere but the 16:9 JPEG, which lays the
     same sheet out across a wider page (text sizes and row heights unchanged). */
  --hx: 1;
  /* Rift/Rubik only cover glyphs Redzone lacks (accented surnames). */
  --lb-font: 'Redzone', 'Rift', 'Rubik', sans-serif;
  font-synthesis: none;
}
.lb-page { position: relative; min-height: 75cqw; padding-bottom: 1cqw; }
.lb-head { text-align: center; height: 7.7cqw; box-sizing: border-box; padding-top: 1.3cqw; }
.lb-title {
  font-size: 2.75cqw; font-weight: 700;
  color: var(--lb-navy); text-transform: uppercase; line-height: 1.1;
}
.lb-sub {
  font-size: 1.94cqw; font-weight: 700; color: var(--lb-orange);
  margin-top: 0.1cqw; text-transform: uppercase;
}
/* Template geometry (1024-wide page): navy band y=79-87, orange band y=88-96,
   both running from the left edge to under the drop at x~985; the drop and its
   three diagonal bars are .lb-corner. */
.lb-stripe {
  position: absolute; left: 0; right: 3.7cqw; top: 7.7cqw; height: 1.76cqw;
  background: linear-gradient(to bottom, var(--lb-navy) 0 50%, var(--lb-orange) 50% 100%);
}
.lb-corner { position: absolute; right: 0; top: 3.9cqw; width: 8.2cqw; height: 6.84cqw; }
/* The header alone (LineupBuilder.headerHtml), atop another sheet: full width
   of its container, tall enough for the stripe and the drop (3.9 + 6.84cqw). */
.lb-sheet.lb-hdr-only { max-width: none; margin: 0; }
.lb-hdr-in { position: relative; height: 10.8cqw; }

.lb-body { display: grid; grid-template-columns: calc(63cqw * var(--hx)) minmax(0, 1fr); margin-top: 1.8cqw; padding: 0 calc(1.85cqw * var(--hx)) 0 0; }
.lb-left { display: flex; flex-direction: column; min-width: 0; }
.lb-fwd { display: grid; grid-template-columns: repeat(3, calc(20.3cqw * var(--hx))); grid-auto-rows: 9.25cqw; margin-left: calc(1.4cqw * var(--hx)); }
.lb-def {
  display: grid; grid-template-columns: repeat(2, calc(24.85cqw * var(--hx))); grid-auto-rows: 9.5cqw;
  margin: 0 0 0 calc(7.2cqw * var(--hx)); position: relative;
}
.lb-slot {
  display: flex; flex-direction: column; align-items: center; min-width: 0;
  padding: 0.3cqw 0.3cqw 0; border-radius: 0.6cqw;
}
.lb-slot.lb-over { background: rgba(193, 80, 48, 0.1); outline: 0.2cqw dashed var(--lb-orange); }
.lb-slot.lb-dragging { opacity: 0.45; }
.lb-pl { text-align: center; max-width: 100%; cursor: grab; }
.lb-name {
  font-size: 2.13cqw; font-weight: 700; color: var(--lb-navy); text-transform: uppercase;
  white-space: nowrap; line-height: 1.05; cursor: pointer;
}
.lb-name:hover { color: var(--lb-orange); }
.lb-hand { font-weight: 700; margin-left: 0.3em; }
/* Height over weight beside the surname, the stack as tall as the capitals:
   an inline-block's baseline is its last line's, so the weight sits on the
   name's baseline, and the line pitch puts the height's cap top level with
   the name's (Redzone capitals are 0.60em; 0.44em text, 0.764 pitch). */
.lb-hw {
  display: inline-block; margin-left: 0.3em; vertical-align: baseline;
  font-size: 0.44em; line-height: 0.764; color: var(--lb-orange); text-align: left;
}
.lb-hw > span { display: block; }
.lb-hw + .lb-hand { margin-left: 0.2em; }
.lb-hand.L { color: #4baf3e; }
.lb-hand.R { color: #2f6fb5; }
.lb-add7 {
  position: absolute; left: -7cqw; top: 19.8cqw; width: 6.6cqw; padding: 0.35cqw 0.2cqw; cursor: pointer;
  font-family: 'Rubik', sans-serif; font-size: 1cqw; font-weight: 600; line-height: 1.15; text-align: center;
  color: #888; background: #fff; border: 1px dashed #bbb; border-radius: 0.6cqw;
}
.lb-add7.lb-open { top: 29.8cqw; }   /* beside the 7th row once it is open */
.lb-add7:hover { color: var(--lb-orange); border-color: var(--lb-orange); }
/* "Add 5th forward line": the same gutter, beside the first D pair, just under
   the forwards (js/lineup-builder.js, fifthLine). */
.lb-add7.lb-addf, .lb-add7.lb-addf.lb-open { top: 0.8cqw; }
.lb-tag {
  margin-left: 0.5em; padding: 0 0.35em; font-size: 0.62em; font-weight: 700; color: var(--lb-orange);
  border: 0.15cqw solid var(--lb-orange); border-radius: 0.5cqw; vertical-align: 0.3em;
}
.lb-stats {
  font-size: 1.64cqw; font-weight: 700; color: var(--lb-orange);
  white-space: nowrap; margin-top: 0.1cqw; line-height: 1.1;
}
.lb-fo-hl { color: var(--lb-navy); }   /* shotsToi: the FO% at the end of the second line */
/* shotsToi's two lines, a touch smaller and tighter; the note takes what's
   left of the slot (about 2.7 lines on a forward) rather than its usual
   minimum, which would push it past the slot. */
.lb-stats.lb-stats2 { font-size: 1.5cqw; line-height: 1; margin-top: 0; }
.lb-slot:has(.lb-stats2) .lb-notewrap { min-height: 0; }
/* The EDM sheet's compact rows (5th line, 4th pair) need room for both lines. */
.lb-s-own.lb-two .lb-fwd, .lb-s-own.lb-two .lb-def { grid-auto-rows: 5.6cqw; }
/* ...and a note that doesn't fit what's left is set smaller (fitNote sets --nf, every sheet). */
.lb-two .lb-note, .lb-two .lb-note-back { font-size: calc(1.15cqw * var(--nf, 1)); }
.lb-two.lb-s-own .lb-note, .lb-two.lb-s-own .lb-note-back { font-size: calc(1.05cqw * var(--nf, 1)); }
/* Lineup Info (Allen's layout under shotsToi): the title, game number and date
   on one line, and the 3.9cqw that frees shared by the 7 rows (+0.56cqw each),
   so notes keep their full size more often. The stripe, corner drop and the
   gap under the stripe keep their spacing, just higher up. */
.lb-sheet.lb-two:not(.lb-s-own) .lb-head {
  height: 3.8cqw; padding: 0.75cqw 9cqw 0; display: flex; justify-content: center; align-items: baseline; gap: 1.1cqw;
}
.lb-sheet.lb-two:not(.lb-s-own) .lb-title { font-size: 2.5cqw; white-space: nowrap; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-sub { font-size: 1.8cqw; margin-top: 0; white-space: nowrap; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-stripe { top: 3.8cqw; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-corner { top: 0; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-fwd { grid-auto-rows: 9.81cqw; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-def { grid-auto-rows: 10.06cqw; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-add7 { top: 20.9cqw; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-add7.lb-open { top: 31.5cqw; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-add7.lb-addf { top: 0.8cqw; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-right { min-height: 63.7cqw; }
/* ...plus three trims so a 3-line note fits at full size: tighter note line
   spacing (the underline layer and the export copy share it), names a touch
   smaller on a 1.0 line, and less padding over each player. */
.lb-sheet.lb-two:not(.lb-s-own) .lb-note, .lb-sheet.lb-two:not(.lb-s-own) .lb-note-back { line-height: 1.12; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-name { font-size: 1.95cqw; line-height: 1; }
.lb-sheet.lb-two:not(.lb-s-own) .lb-slot { padding-top: 0.05cqw; }
/* goalieColumn (Lineup Info): D under LW and C, goalies under RW, a light rule
   under the forwards and one between the D and the goalies (the TV board's
   #d5d9e0). The D rows give up 0.2cqw each to the rule's room. */
.lb-sheet.lb-gc .lb-dg {
  display: grid; grid-template-columns: calc(40.6cqw * var(--hx)) calc(20.3cqw * var(--hx));
  margin-left: calc(1.4cqw * var(--hx)); border-top: 0.2cqw solid #d5d9e0; padding-top: 0.4cqw;
}
.lb-sheet.lb-gc .lb-dg .lb-def { margin: 0; grid-template-columns: repeat(2, calc(20.3cqw * var(--hx))); }
.lb-sheet.lb-gc:not(.lb-s-own) .lb-dg .lb-def { grid-auto-rows: 9.86cqw; }   /* the EDM sheet keeps its own row heights */
.lb-sheet.lb-gc .lb-gcol { border-left: 0.2cqw solid #d5d9e0; display: flex; flex-direction: column; min-width: 0; }
.lb-sheet.lb-gc .lb-gcol .lb-gslot { flex: none; padding: 0.5cqw 0.3cqw 1.2cqw; }
.lb-sheet.lb-gc .lb-gcol .lb-add { margin-top: 0.6cqw; }
.lb-sheet.lb-gc .lb-scr { margin: 0 0 0 0.6cqw; padding-top: 0.6cqw; border-top: 0.2cqw solid #d5d9e0; }
.lb-sheet.lb-gc .lb-scr-head { font-size: 1.5cqw; font-weight: 700; color: var(--lb-navy); text-transform: uppercase; margin: 0 0 0.4cqw 0.3cqw; }
.lb-sheet.lb-gc .lb-scr-list { font-size: 1.25cqw; font-weight: 700; color: var(--lb-navy); line-height: 1.3; text-transform: uppercase; }
.lb-sheet.lb-gc .lb-scr-list.lb-scr-2 { columns: 2; column-gap: 0.6cqw; font-size: 1.05cqw; }
.lb-sheet.lb-gc .lb-scr-item { padding: 0 0.3cqw; border-radius: 0.3cqw; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; break-inside: avoid; }
.lb-sheet.lb-gc .lb-scr-item:hover { background: rgba(193, 80, 48, 0.07); outline: 0.12cqw dashed rgba(193, 80, 48, 0.55); }
.lb-sheet.lb-gc .lb-scr-none { font-family: 'Rubik', sans-serif; font-size: 0.9cqw; font-weight: 400; color: #999; text-transform: none; padding: 0 0.3cqw; }
.lb-sheet.lb-gc .lb-scr-add {
  display: block; margin: 0.6cqw 0 0 0.3cqw; cursor: pointer; padding: 0.2cqw 0.7cqw;
  font-family: 'Rubik', sans-serif; font-size: 0.85cqw; font-weight: 600; color: #888;
  background: #fff; border: 1px dashed #bbb; border-radius: 0.4cqw;
}
.lb-sheet.lb-gc .lb-scr-add:hover { color: var(--lb-orange); border-color: var(--lb-orange); }
/* The leaders box normally reaches 4.4cqw left into the empty space under RW;
   the goalie column is there now, so it stops just short of it. */
.lb-sheet.lb-gc .lb-leaders { margin-left: calc(-0.6cqw * var(--hx)); }
.lb-sheet.lb-gc .lb-leaders-cols { grid-template-columns: calc(17.7cqw * var(--hx)) 1fr; }
.lb-sheet.lb-gc .lb-leaders-head span:first-child { padding-right: calc(1.0cqw * var(--hx)); }
.lb-sheet.lb-gc .lb-lk, .lb-sheet.lb-gc .lb-lv { font-size: 1.42cqw; }
.lb-sheet.lb-gc .lb-lv { padding-right: 0.5cqw; }
.lb-sheet.lb-gc .lb-lrow { grid-template-columns: calc(6cqw * var(--hx)) 1fr; }
/* listOnce: the roster nobody has placed, on screen only. */
.lb-unused {
  margin: 0.9cqw calc(2.6cqw * var(--hx)) 0 calc(1.4cqw * var(--hx)); padding-top: 0.6cqw; border-top: 0.15cqw dashed #ccc;
  font-family: 'Rubik', sans-serif; font-size: 1.05cqw; line-height: 1.45; color: #666;
}
.lb-unused-k { font-weight: 700; text-transform: uppercase; color: #999; margin-right: 0.8cqw; }
.lb-unused-g { margin-right: 1.2cqw; }
.lb-unused-g b { color: var(--lb-navy); }
.lb-sheet.lb-gc .lb-inj .lb-scr-item { cursor: default; white-space: normal; }
.lb-sheet.lb-gc .lb-inj .lb-scr-item:hover { background: none; outline: none; }
.lb-sheet.lb-gc .lb-inj .lb-o-reset { display: block; margin: 0.4cqw 0 0 0.3cqw; }
.lb-sheet.lb-gc .lb-gcol .lb-add7 { position: static; width: auto; margin: 0.8cqw auto 0; padding: 0.35cqw 0.8cqw; }
.lb-notewrap { position: relative; width: 100%; flex: 1; min-height: 4.2cqw; margin-top: 0.2cqw; }
/* The textarea and its underline layer share every metric that affects where
   a word wraps, so the dotted underlines land exactly under the right words. */
.lb-note, .lb-note-back {
  position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; margin: 0;
  padding: 0.2cqw 0.3cqw; border: 1px dashed transparent; border-radius: 0.4cqw;
  font-family: 'Rubik', sans-serif; font-size: calc(1.15cqw * var(--nf, 1)); font-weight: 500; line-height: 1.28; letter-spacing: normal;
  text-align: left; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
}
.lb-note {
  z-index: 1; display: block; resize: none; overflow: hidden; background: transparent; outline: none;
  color: var(--lb-navy); scrollbar-width: none;
}
.lb-note::-webkit-scrollbar { display: none; }
.lb-note-back { z-index: 0; overflow: hidden; color: transparent; pointer-events: auto; user-select: none; }
.lb-miss {
  text-decoration: underline dotted #2f6fb5; text-decoration-thickness: 0.2cqw;
  text-underline-offset: 0.3em; text-decoration-skip-ink: none;
}
.lb-note:hover { border-color: rgba(193, 80, 48, 0.35); }
.lb-note:focus { border-color: var(--lb-orange); background: rgba(193, 80, 48, 0.04); overflow: auto; }
.lb-add {
  margin-top: 1.8cqw; padding: 0.5cqw 1.2cqw; cursor: pointer; font-size: 1.2cqw; font-weight: 600;
  color: #888; border: 1px dashed #bbb; border-radius: 0.6cqw;
}
.lb-add:hover { color: var(--lb-orange); border-color: var(--lb-orange); }

/* Sized to the 3-pair layout (4 forward rows + 3 D rows, less the top and
   bottom margins) and not stretched to the left column, so adding a 7th
   defenseman row doesn't push the leaders box down. */
.lb-right {
  display: flex; flex-direction: column; min-width: 0; align-self: start;
  margin-top: 0.9cqw; min-height: 59.8cqw;
}
.lb-box-title {
  border: 0.28cqw solid var(--lb-orange); text-align: center; background: #fff;
  font-size: 2.45cqw; font-weight: 700; color: var(--lb-navy); padding: 0.45cqw 0; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.01em;
}
.lb-kv { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 2.83cqw; align-items: center; padding: 0.85cqw 0 2.1cqw; text-align: center; }
.lb-k { font-size: 2.13cqw; font-weight: 700; color: var(--lb-navy); text-transform: uppercase; }
.lb-v { font-size: 2.13cqw; font-weight: 700; color: var(--lb-orange); }
.lb-l5 { display: grid; grid-template-columns: 1fr 1fr 1fr; row-gap: 0.4cqw; padding: 0.5cqw 0 0; text-align: center; }
.lb-l5 > div { font-size: 2.13cqw; font-weight: 700; color: var(--lb-navy); text-transform: uppercase; white-space: nowrap; }
.lb-l5 > div.lb-res { color: var(--lb-orange); }
.lb-l5-none { grid-column: 1 / -1; font-size: 1.3cqw !important; color: #888 !important; }
.lb-spacer { flex: 1; min-height: 1cqw; }
.lb-leaders { margin: 0 calc(-0.8cqw * var(--hx)) 0 calc(-4.4cqw * var(--hx)); }
.lb-leaders-head {
  display: grid; grid-template-columns: 1fr 1fr; border: 0.28cqw solid var(--lb-orange);
  background: #fff; text-align: center; font-size: 2.51cqw; font-weight: 700; text-transform: uppercase;
  padding: 0.3cqw 0; line-height: 1.15;
}
.lb-leaders-head span:first-child { color: var(--lb-navy); padding-right: calc(2.9cqw * var(--hx)); }
.lb-leaders-head span:last-child { color: var(--lb-orange); }
.lb-leaders-cols { display: grid; grid-template-columns: calc(19.6cqw * var(--hx)) 1fr; column-gap: 0; padding: 0.5cqw 0 0 0.2cqw; }
.lb-lrow { display: grid; grid-template-columns: calc(6.6cqw * var(--hx)) 1fr; column-gap: 0.4cqw; align-items: baseline; min-height: 2.4cqw; }
.lb-lk { font-size: 1.6cqw; font-weight: 700; color: var(--lb-navy); text-transform: uppercase; }
.lb-lv { font-size: 1.6cqw; font-weight: 700; color: var(--lb-orange); text-transform: uppercase; overflow-wrap: anywhere; padding-right: 1.2cqw; }
/* Last 5 Games column is navy throughout, Team Leaders column orange, matching their headings. */
.lb-leaders-cols > div:first-child .lb-lv { color: var(--lb-navy); }
.lb-leaders-cols > div:last-child .lb-lk { color: var(--lb-orange); }

/* ── Segall's sheet: no notes, PROJECTED LINEUP box, FACEOFFS on its own line.
   Fitted to that template's measured pixels (1024-wide page): lineup box
   x 11-595, right column x 622-1006, forward centres 111/303/495 every 74px
   down, D centres 207/399 every ~57px down. ─────────────────────────────── */
.lb-s-segall .lb-body { grid-template-columns: calc(60.75cqw * var(--hx)) minmax(0, 1fr); }
.lb-s-segall .lb-box-title { padding: 0.3cqw 0; }
.lb-s-segall .lb-lineup-title { margin: 1.78cqw calc(2.6cqw * var(--hx)) 0 calc(1.07cqw * var(--hx)); }
.lb-s-segall .lb-right { margin-top: 1.78cqw; }
.lb-s-segall .lb-kv { padding: 0.26cqw 0 1.8cqw; }
.lb-s-segall .lb-l5 { padding-top: 0.9cqw; row-gap: 0; }
.lb-s-segall .lb-leaders-cols { padding-top: 1.1cqw; }
.lb-s-segall .lb-fwd { grid-template-columns: repeat(3, calc(18.77cqw * var(--hx))); grid-auto-rows: 7.2cqw; margin: 1.65cqw 0 0 calc(1.45cqw * var(--hx)); }
.lb-s-segall .lb-def { grid-template-columns: repeat(2, calc(18.75cqw * var(--hx))); grid-auto-rows: 5.6cqw; margin: 1.45cqw 0 0 calc(10.85cqw * var(--hx)); }
.lb-s-segall .lb-add { margin-top: 0.6cqw; }
.lb-s-segall .lb-add7 { top: 11.3cqw; }
.lb-s-segall .lb-add7.lb-open { top: 16.9cqw; }
.lb-s-segall .lb-leaders { margin-left: calc(-2.15cqw * var(--hx)); }

/* The EDM sheet (js/lineup-builder.js, source 'daily'): shorter rows with two
   lines of note (a size smaller; the underline layer keeps the same metrics),
   then Scratches / Injured as two lines under the D pairs. */
.lb-s-own .lb-fwd { grid-template-rows: repeat(4, 7.6cqw); grid-auto-rows: 5.9cqw; }   /* the 5th line: no note box */
.lb-s-own .lb-def { grid-template-rows: repeat(3, 7.6cqw); grid-auto-rows: 5.9cqw; }   /* the 4th pair, the same */
.lb-s-own .lb-notewrap { min-height: 1.5cqw; }   /* one line (under shotsToi's two stats lines, its :has rule sets 0) */
.lb-s-own .lb-note, .lb-s-own .lb-note-back { font-size: calc(1.05cqw * var(--nf, 1)); padding: 0 0.3cqw; }
.lb-s-own .lb-add7 { top: 16cqw; }
.lb-s-own .lb-add7.lb-open { top: 23.6cqw; }
.lb-s-own .lb-add7.lb-addf, .lb-s-own .lb-add7.lb-addf.lb-open { top: 0.8cqw; }
.lb-outs-box {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.8cqw; row-gap: 0.2cqw;
  margin: 0.8cqw calc(2.6cqw * var(--hx)) 0 calc(1.4cqw * var(--hx));
  font-size: 1.9cqw; font-weight: 700; line-height: 1.05; text-transform: uppercase;
}
.lb-ok { color: var(--lb-navy); white-space: nowrap; }
.lb-ov { color: var(--lb-orange); }
.lb-ov.lb-ov-inj { color: #b3261e; }
/* List edits on screen (removed from the PDF/JPEG copy). */
.lb-o-item { white-space: nowrap; }
.lb-o-x, .lb-o-add {
  font: 600 0.75rem/1 'Rubik', sans-serif; cursor: pointer; padding: 0 0.25em; margin-left: 0.15em;
  color: #999; background: none; border: none; vertical-align: 0.1em;
}
.lb-o-x:hover { color: #b3261e; }
.lb-o-add { margin-left: 0.5em; border: 1px dashed #bbb; border-radius: 0.6cqw; padding: 0.05em 0.45em; }
.lb-o-add:hover { color: var(--lb-orange); border-color: var(--lb-orange); }
.lb-o-reset {
  grid-column: 1 / -1; justify-self: start; margin-top: 0.2cqw; cursor: pointer;
  font: 600 0.72rem 'Rubik', sans-serif; color: #888; background: none; border: none; text-decoration: underline; padding: 0;
}
.lb-o-reset:hover { color: var(--lb-orange); }

/* ── TV board (Elenz, sheet 'tv'): the 1920x1080 export drawn on a canvas,
   with a see-through box over each player for clicks and drags. The boxes are
   placed in % of the board from the same coordinates the canvas uses. ───── */
.lb-tv {
  position: relative; container-type: inline-size; max-width: 1180px; margin: 0 auto;
  aspect-ratio: 16 / 9; background: #fff; box-shadow: 0 0 0 1px #e2e2e2;
}
.lb-tv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lb-tv .lb-slot.lb-tv-slot {
  position: absolute; box-sizing: border-box; padding: 0; border-radius: 0.4cqw;
  justify-content: center; align-items: center;
}
.lb-tv .lb-tv-slot:hover { background: rgba(193, 80, 48, 0.07); outline: 0.12cqw dashed rgba(193, 80, 48, 0.55); }
.lb-tv .lb-tv-slot .lb-pl { position: absolute; inset: 0; max-width: none; }
.lb-tv .lb-tv-slot .lb-name { position: absolute; inset: 0; font-size: 0; color: transparent; }
.lb-tv .lb-tv-slot .lb-tv-note { position: absolute; left: 0; right: 0; bottom: 0; cursor: text; }
.lb-tv .lb-tv-slot .lb-tv-note:hover { background: rgba(193, 80, 48, 0.06); }
.lb-tv .lb-tv-slot .lb-add { margin: 0; padding: 0.3cqw 1cqw; font-family: 'Rubik', sans-serif; font-size: 1.05cqw; background: #fff; }
.lb-tv-scr { position: absolute; box-sizing: border-box; border-radius: 0.3cqw; cursor: pointer; }
.lb-tv-scr:hover { background: rgba(193, 80, 48, 0.07); outline: 0.12cqw dashed rgba(193, 80, 48, 0.55); }
.lb-tv-scr-add {
  position: absolute; transform: translateY(0.1cqw); cursor: pointer; padding: 0.2cqw 0.7cqw;
  font-family: 'Rubik', sans-serif; font-size: 0.85cqw; font-weight: 600; color: #888;
  background: #fff; border: 1px dashed #bbb; border-radius: 0.4cqw;
}
.lb-tv-scr-add:hover { color: var(--lb-orange, #C15030); border-color: var(--lb-orange, #C15030); }
.lb-tv-scr-none { position: absolute; font-family: 'Rubik', sans-serif; font-size: 0.9cqw; color: #999; }
.lb-tv-ghost {
  position: fixed; left: 0; top: -200px; padding: 0.15rem 0.6rem; white-space: nowrap;
  font-family: 'Redzone', 'Rift', 'Rubik', sans-serif; font-weight: 700; font-size: 1.6rem; color: #000;
  background: #fff; border: 1px solid #ccc; border-radius: 6px;
}

.lb-note-pop { width: 22rem; max-width: 22rem; }
.lb-note-edit {
  display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 6.5rem;
  font: inherit; font-size: 0.82rem; line-height: 1.35; padding: 0.4rem 0.5rem;
  border: 1px solid var(--border); border-radius: 5px; background: var(--surface2); color: var(--text);
}
.lb-note-edit:focus { outline: none; border-color: var(--oilers-orange); }
.lb-note-pop-foot { margin: 0.35rem 0.2rem 0.1rem; font-size: 0.66rem; color: var(--text3); }

/* ── popovers (outside the scaled sheet, so normal rem sizes) ─────────── */
.lb-pop {
  position: absolute; z-index: 30; min-width: 11rem; max-width: 22rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22); padding: 0.3rem; font-size: 0.8rem;
}
.lb-pop-head { padding: 0.25rem 0.5rem 0.35rem; font-size: 0.68rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; }
.lb-pop-item { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: none; border-radius: 5px; padding: 0.35rem 0.5rem; cursor: pointer; }
.lb-pop-item:hover { background: var(--surface2); color: var(--oilers-orange); }
.lb-pop-item.lb-danger:hover { color: var(--bad-text, #c0392b); }
.lb-pop-search { width: 100%; box-sizing: border-box; font: inherit; padding: 0.35rem 0.5rem; margin-bottom: 0.3rem; border: 1px solid var(--border); border-radius: 5px; background: var(--surface2); color: var(--text); }
.lb-pop-list { max-height: 18rem; overflow-y: auto; }
/* The EDM sheet's roster picker: not on the sheet = highlighted, on it = greyed. */
.lb-pop-item.lb-out { font-weight: 700; background: rgba(193, 80, 48, 0.09); box-shadow: inset 3px 0 0 var(--oilers-orange); margin-bottom: 1px; }
.lb-pop-item.lb-out .lb-pop-meta { color: var(--oilers-orange); }
.lb-pop-item.lb-in { color: var(--text3); }
.lb-pop-item.lb-injured .lb-pop-meta { color: var(--bad-text, #b3261e); }
.lb-pop-group { padding: 0.35rem 0.5rem 0.15rem; font-size: 0.64rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; }
.lb-spell-fix { font-weight: 600; }
.lb-spell-sep { height: 1px; margin: 0.25rem 0.3rem; background: var(--border); }
.lb-pop-meta { color: var(--text3); font-size: 0.72rem; margin-left: 0.4rem; }
.lb-pop-custom { color: var(--oilers-orange); font-weight: 600; margin-bottom: 0.2rem; }

/* ── custom player form (inside .lb-pop) ──────────────────────────────── */
.lb-cust { width: 20rem; max-width: 20rem; }
.lb-cust-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4rem 0.45rem; padding: 0 0.25rem; }
.lb-cust-grid label { grid-column: span 2; display: flex; flex-direction: column; gap: 0.12rem; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text3); }
.lb-cust-grid label.lb-cust-2 { grid-column: span 3; }
.lb-cust-grid input, .lb-cust-grid select {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.8rem; font-weight: 400; text-transform: none; letter-spacing: 0;
  padding: 0.28rem 0.35rem; border: 1px solid var(--border); border-radius: 5px; background: var(--surface2); color: var(--text);
}
.lb-cust-err { min-height: 1rem; margin: 0.3rem 0.3rem 0; font-size: 0.72rem; color: var(--bad-text, #c0392b); }
.lb-cust-btns { display: flex; justify-content: flex-end; gap: 0.4rem; padding: 0 0.25rem; }
/* TV board: players hidden from Scratches / Injuries, re-added from the form */
.lb-scr-hidden { max-height: 10rem; overflow-y: auto; margin: 0 0.25rem 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.lb-scr-hidden-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.15rem 0; font-size: 0.78rem; }
.lb-scr-hidden-row .lb-btn { flex: none; padding: 0.12rem 0.5rem; font-size: 0.7rem; }
.lb-cust-note { margin: 0.45rem 0.3rem 0.2rem; font-size: 0.64rem; line-height: 1.35; color: var(--text3); }

/* ── leave-without-saving prompt ─────────────────────────────────────── */
.lb-modal-back {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}
.lb-modal {
  width: min(26rem, 90vw); background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); padding: 1.1rem 1.2rem;
}
.lb-modal-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.lb-modal-text { font-size: 0.82rem; color: var(--text2, var(--text)); line-height: 1.4; }
.lb-modal-err { min-height: 1.1rem; margin-top: 0.4rem; font-size: 0.75rem; color: var(--bad-text, #c0392b); }
.lb-modal-btns { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.6rem; }

/* ── JPEG: the print copy, laid out off screen for html2canvas ──────── */
.lb-jpeg-stage .lb-sheet { max-width: none; margin: 0; }
.lb-jpeg-stage .lb-page { height: 75cqw; min-height: 0; padding-bottom: 0; box-sizing: border-box; overflow: hidden; }
.lb-jpeg-stage .lb-note { border-color: transparent !important; overflow: hidden; white-space: pre-wrap; }

/* The regular Pre-Scout Prep print (h2h-print-mode) stays as it was; the
   builder has its own PDF button. */
@media print {
  body.h2h-print-mode .lb-wrap { display: none !important; }
}

/* Compact view (js/lineup-builder.js compactHtml): Game Lineups on Scores and
   the recap's window. Just the lineup, read side by side: no exports, span
   switch, source line or Reset/Save/Hide in the bar. */
.lb-compact [data-act="span"], .lb-compact .lb-span, .lb-compact [data-act="pdf"], .lb-compact [data-act="jpeg"],
.lb-compact [data-act="collapse"], .lb-compact [data-act="reset"], .lb-compact [data-act="save"],
.lb-compact .lb-src { display: none !important; }
.lb-compact .lb-bar { padding: 0.45rem 0.8rem; }
.lb-compact .lb-bar-title { font-size: 0.82rem; flex: 1; }
.lb-compact .lb-body-wrap { padding: 0.6rem 0.75rem 0.75rem; }
.lbc { font-family: 'Rubik', sans-serif; color: var(--lb-navy, #00205b); font-variant-numeric: tabular-nums; }
.lbc-sec { margin-bottom: 0.7rem; }
.lbc-sec:last-child { margin-bottom: 0; }
.lbc-sec-title {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text3); border-bottom: 1px solid var(--border); padding-bottom: 0.2rem; margin-bottom: 0.35rem;
}
.lbc-row { display: grid; gap: 0.35rem; align-items: stretch; margin-bottom: 0.3rem; }
.lbc-row.lbc-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lbc-row.lbc-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lbc-row.lbc-row-1 { grid-template-columns: minmax(0, 1fr); }
.lbc-two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0.9rem; }
.lbc-cell { border: 1px solid var(--border); border-radius: 6px; padding: 0.3rem 0.45rem; background: #fff; min-width: 0; min-height: 2.6rem; }
.lbc-cell.lbc-empty { border-style: dashed; display: flex; align-items: center; justify-content: center; }
.lbc-cell .lb-add { margin: 0; padding: 0.1rem 0.4rem; font-size: 0.68rem; border: none; }
.lbc-cell.lb-over { outline: 2px solid var(--oilers-orange); outline-offset: 1px; }
.lbc-cell.lb-dragging { opacity: 0.5; }
.lbc-name {
  position: static; font-size: 0.82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; line-height: 1.25;
}
.lbc-num { color: var(--text2); margin-right: 0.3em; font-weight: 600; }
.lbc-name .lb-hand { font-size: 0.7rem; }
.lbc-tag { margin-left: 0.4em; font-size: 0.58rem; font-weight: 700; text-transform: uppercase; color: var(--text3); }
.lbc-stats { font-size: 0.66rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.05rem; }
.lbc-none { font-size: 0.72rem; color: var(--text3); }
.lbc-add7 {
  font: inherit; font-size: 0.7rem; font-weight: 600; cursor: pointer; margin-top: 0.1rem;
  background: none; border: 1px dashed var(--border); border-radius: 6px; color: var(--text2); padding: 0.25rem 0.6rem;
}
.lbc-add7:hover { color: var(--oilers-orange); border-color: var(--oilers-orange); }
/* Scratches / Injuries: plain lines, two columns. */
.lbc-list { columns: 2; column-gap: 1.2rem; font-size: 0.76rem; }
.lbc-li { break-inside: avoid; padding: 0.08rem 0; display: flex; align-items: baseline; gap: 0.4em; }
.lbc-li-name { font-weight: 600; }
.lbc-link { cursor: pointer; }
.lbc-link:hover { color: var(--oilers-orange); }
.lbc-li-note { color: var(--text3); font-size: 0.7rem; }
.lbc-li .lb-o-x { border: none; background: none; cursor: pointer; color: var(--text3); font-size: 0.85rem; line-height: 1; padding: 0 0.15rem; }
.lbc-li .lb-o-x:hover { color: var(--bad-text, #c0392b); }
.lbc-adds { display: flex; gap: 0.6rem; margin-top: 0.3rem; }
.lbc-adds .lb-scr-add { font: inherit; font-size: 0.68rem; background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; }
/* Phone / iPad held upright (css/mobile.css's query): Defense over Goalies,
   names and stats wrap instead of clipping in the narrow cells. */
@media screen and (max-width: 700px), screen and (max-height: 500px) and (pointer: coarse), screen and (orientation: portrait) and (pointer: coarse) and (max-width: 1100px) {
  .lbc-two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lbc-row { gap: 0.25rem; }
  .lbc-cell { padding: 0.25rem 0.3rem; }
  .lbc-name { font-size: 0.74rem; white-space: normal; overflow-wrap: anywhere; }
  .lbc-stats { font-size: 0.6rem; white-space: normal; }
  .lbc-list { columns: 1; }
  .lb-compact .lb-body-wrap { padding: 0.45rem; }
}
