/* Letter-hood page (Nov 27 2026). Colors only through the site's variables (tokens.css). The start screens copy Word
   Elevator's (we- became lh-); the board wears mgbWord's board themes (data-board, tokens.css --plb-*: texture,
   tray and textured tiles). Red Flare's rule holds: red is a filled block (light text on it), a line or a border on
   dark, never text. */

.lh main { color: var(--iron-ink); }
.lh :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- start screens (Word Elevator's) ---------- */
.lh-start, .lh-end { padding: 28px var(--gutter) 56px; }
.lh-card { max-width: 620px; margin: 0 auto; padding: 22px; border: 1px solid var(--iron-rule); border-radius: 14px;
  background: var(--iron-card); display: grid; gap: 16px; }
.lh-card[hidden], .lh-play[hidden], .lh-end[hidden] { display: none; }
.lh-how { display: grid; gap: 8px; color: var(--iron-soft); }
.lh-how p { margin: 0; }
.lh-how b { color: var(--iron-ink); }
.lh-how .lh-small { justify-self: start; }
.lh-choice { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.lh-choice[hidden] { display: none; }
.lh-choice legend { padding: 0; margin-bottom: 8px; font-family: var(--font-accent); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--iron-soft); }
#game-settings, #lobby-settings { display: grid; gap: 16px; }
.lh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lh-chips button, .lh-small { padding: 9px 14px; border: 1px solid var(--iron-rule); border-radius: 999px; background: transparent;
  color: var(--iron-ink); font: inherit; font-size: 15px; cursor: pointer; }
.lh-chips button[aria-pressed="true"] { border-color: var(--ember); background: var(--ember); color: var(--on-ember); }
.lh-small:hover, .lh-chips button:hover { border-color: var(--iron-soft); }
.lh-chips--bot button { display: inline-flex; align-items: center; gap: 6px; }
.lh-chips--bot .lh-shelbot { width: 22px; height: 22px; }
.lh-chip-note { margin: 0; font-size: 14px; color: var(--iron-soft); }
.lh-go { justify-self: start; padding: 12px 30px; border: 0; border-radius: 10px; font-family: var(--font-accent); font-size: 16px;
  font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--on-ember); background: var(--ember); cursor: pointer; }
.lh-go:hover { background: var(--ember-hover); }
.lh-go:disabled { opacity: .5; cursor: default; }
.lh-status { margin: 0; color: var(--iron-soft); }
.lh-status:empty { display: none; }
.lh-home { gap: 12px; }
.lh-message { margin: 0; padding: 10px 12px; font-weight: 700; background: var(--iron-bg-alt); border-left: 3px solid var(--ember); }
.lh-message[hidden] { display: none; }
.lh-big { display: grid; grid-template-columns: 52px 1fr auto; gap: 2px 12px; align-items: center; width: 100%; min-height: 80px; padding: 14px;
  border: 1px solid var(--iron-rule); border-radius: 12px; background: var(--iron-bg-alt); color: var(--iron-ink); font: inherit; text-align: left; cursor: pointer; }
.lh-big::after { content: "›"; grid-row: 1 / span 2; grid-column: 3; font-size: 24px; color: var(--iron-soft); }
.lh-big:hover { border-color: var(--iron-soft); }
.lh-big__ico { grid-row: span 2; width: 52px; height: 52px; display: grid; place-items: center; font-size: 28px; border-radius: 10px; background: var(--iron-card); }
.lh-big__ico .lh-shelbot { width: 42px; height: 42px; }
.lh-big b { font-size: 19px; }
.lh-big__sub { grid-column: 2; font-size: 14px; color: var(--iron-soft); }
.lh-big--hot { background: var(--ember); border-color: var(--ember); color: var(--on-ember); }
.lh-big--hot:hover { background: var(--ember-hover); border-color: var(--ember-hover); }
.lh-big--hot .lh-big__sub, .lh-big--hot::after { color: var(--on-ember); opacity: .85; }
.lh-big--hot .lh-big__ico { background: var(--char-950); }
.lh-bar2 { display: flex; align-items: center; gap: 6px; margin: -6px 0 -4px -10px; }
.lh-back { min-width: 44px; min-height: 44px; font-size: 28px; line-height: 1; background: none; border: 0; color: inherit; cursor: pointer; }
.lh-h { margin: 0; font-family: var(--font-accent); font-size: 20px; letter-spacing: .08em; text-transform: uppercase; }
.lh-note { margin: 0; font-size: 14px; color: var(--iron-soft); }
.lh-note:empty { display: none; }
.lh-center { text-align: center; }
.lh-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 330px; margin: 0 auto; }
.lh-slots span { aspect-ratio: 1 / 1.1; display: grid; place-items: center; font: 700 28px/1 var(--font-accent); border-radius: 8px; border: 2px solid var(--iron-rule); }
.lh-slots span.cur { border-color: var(--ember); }
.lh-slots span.full { background: var(--paper-card); color: var(--paper-title); border-color: transparent; }
.lh-keys { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.lh-keys button { aspect-ratio: 1 / 1.08; padding: 0; font: 700 20px/1 var(--font-accent); cursor: pointer; border: 0; border-radius: 6px;
  background: var(--paper-card); color: var(--paper-title); }
.lh-keys button:active { transform: translateY(2px); }
.lh-keys .del { font-family: inherit; background: var(--iron-bg-alt); color: var(--iron-ink); }
.lh-keys .paste { grid-column: 1 / -1; aspect-ratio: auto; min-height: 46px; font: 700 15px/1 var(--font-body); background: var(--iron-bg-alt); color: var(--iron-ink); }
.lh-field { display: grid; gap: 6px; }
.lh-field > span { font-family: var(--font-accent); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.lh-field input { padding: 11px 12px; border: 1px solid var(--iron-rule); border-radius: 8px; background: var(--iron-bg-alt); color: var(--iron-ink); font: inherit; font-size: 17px; }
.lh-faces { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.lh-faces button { aspect-ratio: 1; font-size: 22px; line-height: 1; padding: 0; cursor: pointer; background: var(--iron-bg-alt); border: 1px solid var(--iron-rule); border-radius: 6px; }
.lh-faces button[aria-pressed="true"] { background: var(--ember); border-color: var(--ember); }
.lh-invite { display: grid; gap: 8px; justify-items: center; padding: 14px; text-align: center; background: var(--iron-bg-alt); border: 1px solid var(--iron-rule); border-radius: 10px; }
.lh-invite span { font-family: var(--font-accent); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--iron-soft); }
.lh-invite b { font: 700 34px/1.1 var(--font-accent); letter-spacing: .14em; }
.lh-invite .lh-go { justify-self: center; }
.lh-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lh-people li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--iron-bg-alt); border-radius: 8px; font-weight: 700; min-width: 0; }
.lh-people .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-people small { font-weight: 400; color: var(--iron-soft); }
.lh-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.lh-summary span { padding: 6px 12px; border: 1px solid var(--iron-rule); border-radius: 999px; font-size: 14px; }

/* the board picker and the themed tray: /games/shared/themes.css (shared with mgbWord and Word Elevator) */

/* ---------- How to play ---------- */
.lh-sheet[hidden] { display: none; }
.lh-sheet { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: color-mix(in oklab, var(--char-950) 60%, transparent); backdrop-filter: blur(6px); }
.lh-help { width: 100%; max-width: 720px; max-height: calc(100vh - 32px); overflow: auto; gap: 10px; background: var(--iron-bg); color: var(--iron-ink); }
.lh-help:focus { outline: none; }
.lh-help__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lh-help h3 { margin: 10px 0 0; font-family: var(--font-accent); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--iron-soft); }
.lh-help p, .lh-help ul { margin: 0; line-height: 1.5; }
.lh-help ul { padding-left: 1.2em; display: grid; gap: 5px; }
.lh-help .lh-go { margin-top: 8px; }

/* ---------- playing ---------- */
body.lh[data-view="play"] .site-header, body.lh[data-view="play"] .site-footer { display: none; }
body.lh[data-view="play"] { padding-top: 0; overscroll-behavior: none; }
.lh-play { max-width: 1100px; margin: 0 auto; padding: 8px 12px calc(28px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lh-topbar { display: flex; align-items: center; gap: 8px; }
.lh-topbar .lh-small { padding: 6px 12px; font-size: 14px; }
.lh-goal { font: 600 12px var(--font-accent); letter-spacing: .1em; text-transform: uppercase; color: var(--iron-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-sound { margin-left: auto; }
.lh-clock { font: 700 26px/1 var(--font-accent); letter-spacing: .06em; padding: 5px 12px; border-radius: 8px; background: var(--iron-card); font-variant-numeric: tabular-nums; }
.lh-clock.low { background: var(--ember); color: var(--on-ember); }
.lh-table { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

/* The race (Mark's pick, mockup A "Track", Nov 27 2026): a lane each, your face running toward the finish line.
   On the clock the finish is a little past the leader, so the lanes stretch as the scores grow; in a race it's the target. */
.lh-race { display: grid; gap: 5px; position: relative; }
.lh-lane { position: relative; height: 30px; border-radius: 15px; background: var(--iron-card); border: 0; padding: 0; color: inherit; font: inherit; text-align: left; }
.lh-lane::after { content: ''; position: absolute; right: 52px; top: 3px; bottom: 3px; border-right: 3px dashed var(--iron-soft); opacity: .6; }
.lh-lane__trail { position: absolute; left: 0; top: 11px; height: 8px; border-radius: 4px; background: var(--iron-soft); opacity: .5; transition: width .6s cubic-bezier(.3, 1.4, .5, 1); }
.lh-lane__run { position: absolute; top: 0; height: 30px; display: flex; align-items: center; translate: -50% 0; font-size: 22px; line-height: 1; z-index: 1;
  transition: left .6s cubic-bezier(.3, 1.4, .5, 1); }
.lh-lane__run .lh-shelbot { width: 24px; height: 24px; }
.lh-lane__name { position: absolute; left: 34px; top: 50%; translate: 0 -50%; font: 600 11px var(--font-accent); letter-spacing: .08em; text-transform: uppercase; color: var(--iron-soft); pointer-events: none; }
.lh-lane__num { position: absolute; right: 8px; top: 50%; translate: 0 -50%; font: 700 15px var(--font-accent); font-variant-numeric: tabular-nums; }
.lh-lane__fx { position: absolute; right: 60px; top: 50%; translate: 0 -50%; font-size: 14px; letter-spacing: 2px; }
.lh-lane.me { box-shadow: inset 0 0 0 2px var(--ember); }
.lh-lane.me .lh-lane__trail { background: var(--ember); opacity: 1; }
.lh-lane.gone { opacity: .4; }
.lh-lane.bump .lh-lane__run { animation: lh-bump .45s ease-out; }
@keyframes lh-bump { 40% { scale: 1.3; } }
.lh-pop { position: absolute; font: 700 15px var(--font-accent); color: var(--iron-ink); pointer-events: none; animation: lh-pop 1s ease-out forwards; z-index: 3; }
.lh-pop.minus { background: var(--ember); color: var(--on-ember); padding: 0 6px; border-radius: 6px; }
@keyframes lh-pop { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -26px; } }
.lh-race.passed { animation: lh-passed .9s ease-out; border-radius: 15px; }
@keyframes lh-passed { 0%, 60% { box-shadow: 0 0 0 3px var(--ember); } 100% { box-shadow: 0 0 0 0 transparent; } }
.aiming .lh-lane:not(.me), .aiming-anyone .lh-lane { outline: 2px dashed var(--ember); outline-offset: 2px; cursor: crosshair; }

/* The board: mgbWord's tray (dark, lit from above) around the theme's surface, and its textured tiles */
.lh-boardcol { display: grid; }
.lh-tray { width: 100%; max-width: 460px; margin: 0 auto; }   /* the tray itself: .gt-tray (themes.css) */
/* power-ups on the board */
.lh-tray .wg-tile.lh-locked::after { content: '🔒'; position: absolute; inset: 0; display: grid; place-items: center; font-size: .9em;
  background: color-mix(in oklab, var(--char-950) 65%, transparent); border-radius: inherit; }
.lh-tray .wg-tile.lh-fog { filter: blur(5px) grayscale(.6); opacity: .55; }
.lh-tray .wg-tile.lh-mine::before { content: '💣'; position: absolute; top: 3px; left: 4px; font-size: 13px; }
.lh-tray.blind .wg-grid, .lh-tray.blind .wg-word__text { filter: blur(10px); }
.lh-tray.shuffled { box-shadow: 0 0 0 3px var(--plb-mark), 0 8px 18px var(--pl-shadow); }
.lh-tray.aim-cell .wg-tile { cursor: crosshair; outline: 2px dashed var(--plb-mark); outline-offset: -4px; }
.lh-banner { position: absolute; left: 50%; top: 56%; translate: -50% -50%; z-index: 4; max-width: 90%; text-align: center;
  background: var(--ember); color: var(--on-ember); font: 700 15px/1.3 var(--font-accent); padding: 8px 14px; border-radius: 10px; pointer-events: none; }
.lh-banner[hidden] { display: none; }
.lh-tray.low { box-shadow: 0 0 0 1px var(--pl-tray-edge), 0 0 18px 4px var(--ember); }

.lh-under { display: grid; gap: 8px; align-content: start; }
.lh-powers { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.lh-powers[hidden] { display: none; }
.lh-powers button { display: grid; justify-items: center; gap: 2px; min-width: 72px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--iron-rule);
  background: var(--iron-card); color: var(--iron-ink); font: 600 11px var(--font-accent); letter-spacing: .04em; cursor: pointer; }
.lh-powers button b { font-size: 22px; line-height: 1.1; }
.lh-powers button[aria-pressed="true"] { background: var(--ember); border-color: var(--ember); color: var(--on-ember); }
.lh-powers .lh-empty { font-size: 13px; color: var(--iron-soft); margin: 0; }
.lh-hint { margin: 0; text-align: center; font-size: 14px; color: var(--iron-soft); min-height: 1.3em; }
.lh-found { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; justify-content: center; }
.lh-found li { font: 600 13px var(--font-mono, monospace); padding: 3px 8px; border-radius: 6px; background: var(--iron-card); }
.lh-found li b { margin-left: 6px; color: var(--iron-soft); }
.lh-found li.pending { opacity: .6; }

.lh-cover { position: absolute; inset: -8px; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 20px;
  background: color-mix(in oklab, var(--char-950) 70%, transparent); backdrop-filter: blur(8px); border-radius: 12px; }
.lh-cover[hidden] { display: none; }
.lh-cover b { font: 700 34px var(--font-accent); }
.lh-cover .lh-go { justify-self: center; }

.lh-toast { position: fixed; left: 50%; top: 16%; translate: -50% 0; z-index: 30; max-width: 90vw; text-align: center; background: var(--ember); color: var(--on-ember);
  font: 700 16px/1.3 var(--font-accent); padding: 10px 16px; border-radius: 12px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.lh-toast.show { opacity: 1; }

/* computer: the grid on the left, the race and your power-ups on the right */
@media (min-width: 900px) {
  .lh-table { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: 'board race' 'board under'; grid-template-rows: auto 1fr; align-items: start; column-gap: 24px; }
  .lh-race { grid-area: race; } .lh-boardcol { grid-area: board; } .lh-under { grid-area: under; }
  .lh-tray { max-width: 520px; }
}
/* short phones: slimmer lanes so the grid still sits clear of the bottom edge */
@media (max-height: 700px) and (max-width: 899px) {
  .lh-lane, .lh-lane__run { height: 24px; } .lh-lane__trail { top: 8px; } .lh-lane__run { font-size: 18px; }
  .lh-tray .wg-word { min-height: 1.8em; } .lh-tray .wg-word__text { font-size: 22px; }
}

/* ---------- game over ---------- */
.lh-end__h { margin: 0; font-family: var(--font-accent); font-size: 28px; letter-spacing: .06em; text-transform: uppercase; }
.lh-end__score { margin: 0; font-size: 18px; }
.lh-end__score b { font: 700 40px var(--font-accent); }
.lh-rank { margin: 0; padding: 0 0 0 1.4em; display: grid; gap: 6px; }
.lh-rank:empty { display: none; }
.lh-rank b { font-family: var(--font-accent); }
.lh-rank small { color: var(--iron-soft); }
.lh-missed { display: grid; gap: 6px; font-size: 14px; }
.lh-missed > b { font-family: var(--font-accent); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--iron-soft); }
.lh-missed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lh-missed li { font: 600 13px var(--font-mono, monospace); padding: 3px 8px; border-radius: 6px; background: var(--iron-bg-alt); }
.lh-end__btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Shelbot's face (Word Elevator's) */
.lh-shelbot { display: block; overflow: visible; }
.lh-shelbot .head { fill: var(--pl-sb-head); } .lh-shelbot .shade { fill: var(--pl-sb-shade); } .lh-shelbot .ink { fill: var(--pl-sb-ink); }
.lh-shelbot .shine { fill: var(--pl-sb-shine); } .lh-shelbot .blush { fill: var(--pl-sb-blush); opacity: .7; } .lh-shelbot .tongue { fill: var(--pl-sb-blush); }
.lh-shelbot .bow { fill: var(--pl-sb-bow); } .lh-shelbot .bow-knot { fill: var(--pl-sb-bow-knot); }
.lh-shelbot .lnk { fill: none; stroke: var(--pl-sb-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lh-shelbot .ant { stroke: var(--pl-sb-shade); stroke-width: 2; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  .lh-lane__trail, .lh-lane__run { transition: none; }
  .lh-lane.bump .lh-lane__run, .lh-pop, .lh-race.passed { animation: none; }
}

/* ---------- Nov 28 2026: custom clock, new power-ups, shared and daily boards ---------- */
.lh-stepper { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.lh-stepper button { width: 44px; height: 44px; border: 1px solid var(--iron-rule); border-radius: 50%; background: transparent;
  color: var(--iron-ink); font: 700 22px/1 var(--font-accent); cursor: pointer; }
.lh-stepper button:disabled { opacity: .35; cursor: default; }
.lh-stepper b { min-width: 5ch; text-align: center; font: 700 20px var(--font-accent); }

/* What's on you right now (Wrap, Echo, Golden, Leech, Hint), over the letters */
.lh-fxline { margin: 0 0 8px; text-align: center; font: 700 14px/1.3 var(--font-accent); letter-spacing: .04em;
  color: var(--plb-tile-ink); background: color-mix(in oklab, var(--plb-tile) 88%, transparent); border-radius: 8px; padding: 4px 10px; }
.lh-fxline[hidden] { display: none; }
/* Golden: one letter scores triple */
.lh-tray .wg-tile.lh-gold { background: var(--pl-medal-gold); background-image: none; color: var(--color-deep);
  box-shadow: 0 0 0 3px var(--pl-medal-gold), 0 0 18px var(--pl-medal-gold); }
.lh-tray .wg-tile.lh-gold.on { background: var(--plb-on, var(--ember)); color: var(--plb-on-ink, var(--on-ember)); }

/* Leaderboards */
.lh-lb { display: grid; gap: 8px; }
.lh-lb > b, .lh-lb-h { margin: 0; font-family: var(--font-accent); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--iron-soft); }
.lh-lb-h[hidden] { display: none; }
.lh-rank:has(.lh-rank__n), .lh-rank:has(.lh-empty) { list-style: none; padding: 0; }   /* leaderboards number their own rows */
.lh-rank li.me { padding: 4px 8px; margin: 0 -8px; border-left: 3px solid var(--ember); background: var(--iron-bg-alt); }
.lh-rank__n { display: inline-block; min-width: 1.6em; color: var(--iron-soft); font-family: var(--font-accent); }
.lh-rank .lh-empty { color: var(--iron-soft); }
.lh-lb-mine { margin: 0; padding: 10px 12px; background: var(--iron-bg-alt); border-left: 3px solid var(--ember); }
.lh-lb-mine[hidden] { display: none; }
.lh-lb-mine b { font-family: var(--font-accent); }
.lh-go--alt { justify-self: start; }
