/* Theology Run — Bishop García Diego High School
   Brand: Cardinal Red #A20927, white, black, light gray #DDDDDD.
   Playful game world, disciplined brand chrome. */

:root {
  --cardinal: #A20927;
  --cardinal-dark: #7C071E;
  --cardinal-light: #C8304C;
  --ink: #14161A;
  --gray: #DDDDDD;
  --paper: #FFFFFF;
  --shadow: 0 18px 44px rgba(20, 22, 26, .28);
  --radius: 18px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --body: 'Lato', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* The hidden attribute must win over any display rule below, or an invisible
   overlay keeps eating pointer events across the whole screen. */
[hidden] { display: none !important; }

/* Mode switching: Free Play hides everything to do with questions and energy. */
body.mode-free .quiz-only { display: none !important; }
body:not(.mode-free) .free-only { display: none !important; }
body:not(.mode-race) .race-only { display: none !important; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: var(--body); color: var(--ink);
  background: #BFE4F2;
  -webkit-tap-highlight-color: transparent;
}

#game { position: fixed; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }

/* ============================ HUD ============================ */

#hud { position: fixed; inset: 0; pointer-events: none; padding: 16px clamp(14px, 3vw, 30px); }

.hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
@media (max-width: 700px) { .energy { width: 100%; } .hud-stats { width: 100%; } }

.energy { width: min(330px, 46vw); }
.energy-label {
  font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.45); margin-bottom: 6px;
}
.energy-label span { font-size: 15px; letter-spacing: 0; }
.energy-track {
  height: 20px; border-radius: 999px; background: rgba(255,255,255,.42);
  border: 3px solid #fff; box-shadow: var(--shadow); overflow: hidden;
}
.energy-fill {
  height: 100%; width: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cardinal-light), var(--cardinal));
  transition: width .12s linear, background .3s;
}
.energy-fill.is-low { background: linear-gradient(90deg, #F7C948, #FF7A45); animation: pulse .7s infinite alternate; }
@keyframes pulse { to { filter: brightness(1.25); } }

.hud-stats { display: flex; gap: 10px; align-items: center; pointer-events: auto; }
.stat {
  background: rgba(255,255,255,.92); border-radius: 12px; padding: 6px 12px;
  box-shadow: var(--shadow); text-align: center; min-width: 74px;
}
.stat-k { display: block; font-family: var(--sans); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #6B7280; }
.stat-v { display: block; font-family: var(--sans); font-weight: 700; font-size: 17px; color: var(--cardinal); font-variant-numeric: tabular-nums; }

.ghost-btn {
  pointer-events: auto; font-family: var(--sans); font-weight: 700; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: #fff; cursor: pointer;
  background: rgba(20,22,26,.42); border: 2px solid rgba(255,255,255,.7);
  border-radius: 12px; padding: 9px 14px;
}
.ghost-btn:hover { background: var(--cardinal); }

/* On-demand question button: bank energy before a hard stretch. */
.answer-btn {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cardinal); cursor: pointer;
  background: #fff; border: 2px solid var(--cardinal); border-radius: 12px;
  padding: 7px 14px 7px 8px; box-shadow: var(--shadow); opacity: .55;
  transition: opacity .15s, transform .12s, background .15s;
}
.answer-btn.is-ready { opacity: 1; }
.answer-btn.is-ready:hover { background: var(--cardinal); color: #fff; transform: translateY(-1px); }
.answer-btn.is-ready:hover .answer-icon { background: #fff; color: var(--cardinal); }
.answer-icon {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--cardinal); color: #fff; font-size: 13px; font-weight: 700;
}

.hud-section {
  position: absolute; left: 50%; top: 76px; transform: translateX(-50%);
  font-family: var(--serif); font-weight: 900; font-size: clamp(17px, 3vw, 28px);
  color: #fff; text-shadow: 0 3px 14px rgba(0,0,0,.6); white-space: nowrap;
  pointer-events: none;
}

.progress {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(460px, 66vw); height: 11px; border-radius: 999px;
  background: rgba(20,22,26,.42); border: 2px solid rgba(255,255,255,.9);
  overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.progress-fill { height: 100%; width: 0; background: #fff; transition: width .2s; }

.toasts { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 7px; align-items: center; }
.toast {
  font-family: var(--sans); font-weight: 700; font-size: 13px; color: #fff;
  background: rgba(20,22,26,.82); padding: 8px 16px; border-radius: 999px;
  box-shadow: var(--shadow); transition: opacity .5s, transform .5s;
}
.toast.good { background: #1F7A46; }
.toast.warn { background: var(--cardinal); }
.toast.is-out { opacity: 0; transform: translateY(-12px); }

/* ============================ Touch ============================ */

#touchControls { position: fixed; inset: 0; pointer-events: none; display: none; }
body.touch #touchControls:not([hidden]) { display: block; }

.stick {
  pointer-events: auto; position: absolute; left: 26px; bottom: 26px;
  width: 128px; height: 128px; border-radius: 50%;
  background: rgba(255,255,255,.24); border: 3px solid rgba(255,255,255,.7);
  display: grid; place-items: center; touch-action: none;
}
.stick-knob { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.answer-touch {
  pointer-events: auto; position: absolute; right: 26px; bottom: 156px;
  min-width: 118px; padding: 13px 18px; border-radius: 999px;
  border: 4px solid #fff; background: #fff; color: var(--cardinal);
  font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: .08em;
  box-shadow: var(--shadow); touch-action: none; opacity: .6; transition: opacity .15s;
}
.answer-touch.is-ready { opacity: 1; }

.jump-btn {
  pointer-events: auto; position: absolute; right: 26px; bottom: 34px;
  width: 108px; height: 108px; border-radius: 50%; border: 4px solid #fff;
  background: var(--cardinal); color: #fff; font-family: var(--sans);
  font-weight: 700; font-size: 15px; letter-spacing: .1em; box-shadow: var(--shadow); touch-action: none;
}

/* ============================ Quiz ============================ */

.quiz {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(12, 14, 18, .62); backdrop-filter: blur(5px);
  opacity: 0; transition: opacity .22s; z-index: 40;
}
.quiz.is-open { opacity: 1; }
.quiz-card {
  width: min(760px, 100%); max-height: 92vh; overflow: auto;
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(20px, 3.4vw, 34px);
  border-top: 9px solid var(--cardinal);
  transform: translateY(14px) scale(.98); transition: transform .22s;
}
.quiz.is-open .quiz-card { transform: none; }

.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.quiz-headright { display: flex; align-items: center; gap: 12px; }
.quiz-badge.is-bonus { background: #1F7A46; }
.quiz-close {
  font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: #6B7280; background: #fff; cursor: pointer;
  border: 2px solid var(--gray); border-radius: 10px; padding: 6px 12px;
}
.quiz-close:hover { border-color: var(--cardinal); color: var(--cardinal); }
.quiz-badge {
  font-family: var(--sans); font-weight: 700; font-size: 10px; letter-spacing: .18em;
  white-space: nowrap;
  text-transform: uppercase; color: #fff; background: var(--cardinal);
  padding: 5px 12px; border-radius: 999px;
}
.quiz-counter { font-family: var(--sans); font-size: 12px; color: #6B7280; font-weight: 600; }

.quiz-question { font-family: var(--serif); font-weight: 700; font-size: clamp(20px, 2.9vw, 28px); line-height: 1.28; margin: 0 0 6px; }
.quiz-metaref { font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cardinal); font-weight: 700; margin-bottom: 16px; min-height: 14px; }

.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  font-family: var(--body); font-size: 16px; line-height: 1.4; color: var(--ink);
  background: #F7F7F8; border: 2px solid var(--gray); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; transition: border-color .14s, background .14s, transform .1s;
}
.quiz-option:hover:not(:disabled) { border-color: var(--cardinal); background: #fff; }
.quiz-option:active:not(:disabled) { transform: scale(.99); }
.quiz-option:focus-visible { outline: 3px solid var(--cardinal); outline-offset: 2px; }
.quiz-option .key {
  flex: 0 0 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; background: var(--cardinal); color: #fff;
  font-family: var(--sans); font-weight: 700; font-size: 14px;
}
.quiz-option:disabled { cursor: default; opacity: .82; }
.quiz-option.is-correct { border-color: #1F7A46; background: #EAF7EF; opacity: 1; }
.quiz-option.is-correct .key { background: #1F7A46; }
.quiz-option.is-wrong { border-color: var(--cardinal); background: #FCECEF; opacity: 1; }

.quiz-feedback { margin-top: 14px; font-size: 15px; line-height: 1.5; min-height: 22px; }
.quiz-feedback.is-good { color: #1F7A46; font-weight: 700; }
.quiz-feedback.is-bad { color: var(--cardinal-dark); font-weight: 700; }
.quiz-cooldown {
  margin-top: 12px; font-family: var(--sans); font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase; color: #6B7280;
}
.quiz-hint { margin-top: 16px; font-size: 12px; color: #6B7280; border-top: 1px solid var(--gray); padding-top: 12px; }

/* ============================ Screens ============================ */

.screen {
  position: fixed; inset: 0; z-index: 30; overflow: auto;
  background: linear-gradient(160deg, rgba(255,255,255,.93), rgba(255,255,255,.85));
  backdrop-filter: blur(7px);
  display: grid; place-items: start center; padding: clamp(20px, 4vw, 48px) 20px;
}
.screen-inner { width: min(900px, 100%); text-align: center; }
.screen-inner.narrow { width: min(520px, 100%); }

.brandmark { width: 210px; max-width: 54vw; margin-bottom: 10px; }

.title {
  font-family: var(--serif); font-weight: 900; font-size: clamp(42px, 8vw, 78px);
  line-height: .95; margin: 6px 0 10px; color: var(--ink); letter-spacing: -.02em;
}
.title span { color: var(--cardinal); }
.title.small { font-size: clamp(30px, 5vw, 46px); }

.tagline { font-size: clamp(15px, 2vw, 18px); color: #4B5563; max-width: 52ch; margin: 0 auto 26px; line-height: 1.55; }

.notice {
  background: #FCECEF; border: 2px solid var(--cardinal); color: var(--cardinal-dark);
  border-radius: 12px; padding: 12px 16px; margin: 0 auto 24px; max-width: 620px;
  font-weight: 700; font-size: 14px;
}

.section-head {
  font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: #6B7280; margin: 0 0 14px;
}

.pack-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(270px, 360px)); justify-content: center; margin-bottom: 30px; }
.pack-card {
  display: block; background: #fff; border: 2px solid var(--gray); border-left: 7px solid var(--cardinal);
  border-radius: 14px; padding: 18px 20px; cursor: pointer; font: inherit; text-align: left;
  display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.pack-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--cardinal); }
.pack-card.is-custom { border-left-color: #1F7A46; }
.pack-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.2; margin-bottom: 4px; }
.pack-sub { display: block; font-size: 13px; color: #6B7280; margin-bottom: 14px; }
.pack-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; }
.chip {
  font-family: var(--sans); font-weight: 700; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; background: var(--cardinal); color: #fff; padding: 4px 10px; border-radius: 999px;
}
.best { font-size: 12px; color: #6B7280; font-weight: 700; }
.empty { color: #6B7280; grid-column: 1 / -1; text-align: center; padding: 30px; }

/* Free Play card, above the question sets. */
.mode-card {
  display: block; width: min(560px, 100%); margin: 0 auto 34px; text-align: left;
  background: var(--cardinal); color: #fff; border: 0; border-radius: 16px;
  padding: 22px 26px; cursor: pointer; font: inherit;
  box-shadow: var(--shadow); transition: transform .12s, filter .12s;
}
.mode-card:hover { transform: translateY(-2px); filter: brightness(1.08); }
.mode-title { display: block; font-family: var(--serif); font-weight: 900; font-size: 27px; margin-bottom: 6px; }
.mode-sub { display: block; font-size: 14px; line-height: 1.5; opacity: .92; margin-bottom: 14px; }
.mode-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chip-alt { background: #fff; color: var(--cardinal); }
.mode-card .best { color: #fff; opacity: .9; }

.title-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }

.btn {
  font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: .06em;
  padding: 14px 26px; border-radius: 999px; border: 2px solid var(--cardinal);
  background: var(--cardinal); color: #fff; cursor: pointer; text-decoration: none; display: inline-block;
  transition: transform .12s, background .12s;
}
.btn:hover { transform: translateY(-2px); background: var(--cardinal-dark); border-color: var(--cardinal-dark); }
.btn-secondary { background: #fff; color: var(--cardinal); }
.btn-secondary:hover { background: var(--gray); color: var(--cardinal-dark); }
.btn-ghost { background: transparent; color: #4B5563; border-color: var(--gray); }
.btn-ghost:hover { background: var(--gray); color: var(--ink); }

.footnote { font-size: 12px; color: #9CA3AF; letter-spacing: .04em; }

.crown-badge { font-size: 62px; line-height: 1; margin-bottom: 6px; }

.scoreboard { background: #fff; border: 2px solid var(--gray); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; text-align: left; }
.score-row { display: flex; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--gray); font-size: 15px; }
.score-row:last-child { border-bottom: 0; }
.score-row b { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.score-row.total { background: var(--cardinal); color: #fff; font-size: 19px; }
.score-row.total b { font-size: 26px; }

/* ============================ Help ============================ */

.help {
  border: 0; border-radius: var(--radius); padding: clamp(22px, 3vw, 34px);
  max-width: 560px; width: 92vw; box-shadow: var(--shadow); border-top: 9px solid var(--cardinal);
}
.help::backdrop { background: rgba(12,14,18,.6); }
.help h2 { font-family: var(--serif); margin: 0 0 16px; font-size: 28px; }
.help h3 { font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #6B7280; margin: 22px 0 8px; }
.help p { line-height: 1.6; margin: 0 0 10px; font-size: 15px; }
.help-grid { display: grid; gap: 8px; }
.help-grid div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--gray); font-size: 14px; }
.help-grid b { font-family: var(--sans); }
.help-grid span { color: #6B7280; text-align: right; }
.help .btn { margin-top: 20px; }


/* ============================ Finish: what to study ============================ */

.miss-block { text-align: left; margin: 4px 0 26px; }
.miss-block .section-head { display: flex; align-items: center; gap: 10px; }
.miss-list {
  list-style: none; margin: 0; padding: 0;
  background: #fff; border: 2px solid var(--gray); border-radius: var(--radius); overflow: hidden;
}
.miss {
  padding: 15px 20px; border-bottom: 1px solid var(--gray); border-left: 5px solid var(--cardinal);
}
.miss:last-child { border-bottom: 0; }
.miss-q { margin: 0 0 6px; font-weight: 700; font-size: 15px; line-height: 1.45; }
.miss-a { margin: 0 0 4px; font-size: 14px; color: #1F7A46; }
.miss-a b { font-family: var(--sans); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.miss-x { margin: 0; font-size: 13px; color: #6B7280; line-height: 1.5; }


/* ============================ Portrait phones ============================
   The stats row wraps under the energy bar, so everything below it has to move
   down, and the on-screen controls must not sit on top of the progress bar. */

@media (max-width: 700px), (orientation: portrait) {
  #hud { padding: 12px 12px 0; }
  .energy { width: 100%; }
  .hud-stats { width: 100%; justify-content: flex-start; gap: 7px; margin-top: 9px; }
  .stat { min-width: 0; flex: 1 1 0; padding: 5px 6px; }
  .stat-v { font-size: 15px; }
  .ghost-btn { padding: 7px 11px; font-size: 11px; flex: 0 0 auto; }

  .hud-section {
    top: auto; bottom: 268px; font-size: 16px;
    background: rgba(20,22,26,.45); padding: 5px 15px; border-radius: 999px;
    backdrop-filter: blur(2px);
  }

  .progress { bottom: 240px; width: min(280px, 70vw); }
  .toasts { bottom: 306px; }
  .toast { font-size: 12px; padding: 7px 13px; }

  .stick { left: 18px; bottom: 32px; width: 116px; height: 116px; }
  .stick-knob { width: 50px; height: 50px; }
  .jump-btn { right: 18px; bottom: 38px; width: 96px; height: 96px; font-size: 14px; }
  .answer-touch { right: 18px; bottom: 148px; min-width: 108px; padding: 12px 16px; font-size: 12px; }
  .answer-btn .answer-label { display: none; }
  .answer-btn { padding: 6px; gap: 0; }

  .quiz-card { padding: 20px 18px; max-height: 88vh; }
  .quiz-question { font-size: 19px; }
  .quiz-option { font-size: 15px; padding: 13px 13px; gap: 11px; }
  .quiz-option .key { flex-basis: 30px; height: 30px; font-size: 13px; }
  .quiz-hint { font-size: 11px; }
  .keys-hint { display: none; }          /* no keyboard on a phone */
  .quiz-badge { font-size: 9px; letter-spacing: .12em; padding: 5px 10px; }
  .quiz-close { padding: 6px 10px; font-size: 10px; }
  .quiz-counter { font-size: 11px; }
  .freeplay-tag { font-size: 10px; padding: 6px 12px; letter-spacing: .14em; }
  .mode-card { padding: 18px 20px; margin-bottom: 26px; }
  .mode-title { font-size: 23px; }
}


/* ============================ Class Race ============================ */

.mode-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 34px; }
.mode-row .mode-card { margin: 0; width: auto; }
@media (max-width: 720px) { .mode-row { grid-template-columns: 1fr; } }

.mode-race { background: var(--ink); }
.mode-race:hover { filter: brightness(1.3); }

/* Live leaderboard during a race */
.board {
  position: absolute; right: clamp(12px, 3vw, 28px); top: 92px;
  width: 232px; pointer-events: auto;
  background: rgba(255,255,255,.94); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; border-top: 5px solid var(--cardinal);
}
.board-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--sans); font-weight: 700; font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cardinal); padding: 9px 12px;
  border-bottom: 1px solid var(--gray);
}
.board-toggle {
  font: inherit; font-size: 9px; color: #6B7280; background: none;
  border: 1px solid var(--gray); border-radius: 6px; padding: 2px 7px; cursor: pointer;
}
.board.is-collapsed .board-list { display: none; }
.board-list { list-style: none; margin: 0; padding: 4px 0; max-height: 46vh; overflow-y: auto; }
.board-row {
  display: grid; grid-template-columns: 18px 10px 1fr auto; align-items: center; gap: 7px;
  padding: 5px 12px; font-size: 12.5px;
}
.board-row.is-me { background: #FCECEF; font-weight: 700; }
.board-row.is-done .board-name { color: #1F7A46; }
.board-rank { font-family: var(--sans); font-weight: 700; color: #9CA3AF; font-size: 11px; }
.board-dot { width: 10px; height: 10px; border-radius: 50%; }
.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-stat { font-size: 10.5px; color: #6B7280; font-variant-numeric: tabular-nums; }
.board-empty { padding: 14px 12px; color: #9CA3AF; font-size: 12px; text-align: center; }

.final-board {
  background: #fff; border: 2px solid var(--gray); border-radius: var(--radius);
  margin: 0 0 24px; text-align: left; max-height: none;
}
.finish-place {
  font-family: var(--serif); font-weight: 900; font-size: clamp(26px, 5vw, 40px);
  color: var(--cardinal); margin-bottom: 10px;
}

/* Join dialog */
.join { max-width: 440px; }
.join-lede { color: #4B5563; font-size: 15px; margin: 0 0 20px; }
.join-field { display: block; margin-bottom: 14px; text-align: left; }
.join-field span {
  display: block; font-family: var(--sans); font-weight: 700; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: #6B7280; margin-bottom: 5px;
}
.join-field input {
  width: 100%; font-family: var(--body); font-size: 17px; padding: 12px 14px;
  border: 2px solid var(--gray); border-radius: 10px;
}
.join-field input:focus { outline: none; border-color: var(--cardinal); }
#joinCode {
  font-family: var(--sans); font-weight: 700; font-size: 30px; letter-spacing: .3em;
  text-align: center; text-transform: uppercase;
}
.join-error {
  background: #FCECEF; border: 1px solid var(--cardinal); color: var(--cardinal-dark);
  border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; text-align: left;
}

/* Lobby */
.lobby-code {
  font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: #6B7280; margin-bottom: 6px;
}
.lobby-code b { color: var(--cardinal); font-size: 22px; letter-spacing: .3em; }
.lobby-roster {
  list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 7px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); text-align: left;
}
.lobby-name {
  display: flex; align-items: center; gap: 9px; background: #fff;
  border: 1px solid var(--gray); border-radius: 10px; padding: 9px 13px; font-size: 14px;
}
.lobby-name.is-me { border-color: var(--cardinal); font-weight: 700; }

@media (max-width: 700px), (orientation: portrait) {
  .board { top: auto; bottom: 340px; right: 10px; width: 190px; }
  .board-list { max-height: 26vh; }
  .board-row { font-size: 11.5px; padding: 4px 10px; }
}
