/* ============================================================
   Lobby — built to the design output's measurements.
   Hard 3px edges, 5px offset drops, flush plates. Nothing soft.
   ============================================================ */
/* app.css pads every <section> for the old editorial pages; the lobby lays out
   its own rhythm with .gap instead. */
#main section { padding-block: 0; }

#main {
  min-width: 0;
  box-sizing: border-box;
  padding: 24px 28px 20px;
  display: flex;
  flex-direction: column;
}
.gap { height: 32px; }

/* ---- hero ---- */
.hero {
  position: relative;
  height: 460px;
  overflow: hidden;
  border: 3px solid var(--ink-sink);
  background: var(--ink-raise);
}
.hero__art { position: absolute; inset: 0; z-index: 0; }
.hero:not(.is-set) .hero__in > :is(h1, p, .hero__cta), .hero:not(.is-set) .hero__art { visibility: hidden; }
.hero__art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink-raise) 36%, transparent 58%); }
.hero__in {
  position: relative;
  z-index: 1;
  padding: 26px 34px;
  max-width: 528px;
  box-sizing: border-box;
}
.hero__now {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px;
  background: var(--ink-sink);
  border-left: 4px solid var(--accent);
}
.hero__now .dot { width: 7px; height: 7px; background: var(--accent); }
.hero__now .m { font-size: 11.5px; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; }
.hero h1 {
  margin: 12px 0 0;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--bone);
  text-wrap: balance;
}
.hero p {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--bone-70);
  max-width: 410px;
}
.hero__cta { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn-accent, .btn-raise {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border-radius: var(--r);
  border: 3px solid var(--ink-sink);
  text-transform: uppercase;
  text-decoration: none;
}
.btn-accent {
  padding: 0 26px;
  background: var(--accent);
  box-shadow: 5px 5px 0 var(--ink-sink);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .06em;
}
.btn-accent:active { box-shadow: none; translate: 5px 5px; }
.btn-raise {
  padding: 0 22px;
  background: var(--ink-lift);
  color: var(--bone);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
}
.commit {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 7px 11px;
  background: var(--ink-sink);
  font-size: 12px;
  flex-wrap: wrap;
}
.commit .k { color: var(--bone-45); text-transform: uppercase; letter-spacing: .1em; }
.commit .v { color: var(--bone); }
.commit i { width: 1px; height: 13px; background: var(--line); }

/* ---- section heads ---- */
.head { display: flex; align-items: stretch; gap: 0; margin-bottom: 14px; }
.head .no {
  display: flex;
  align-items: center;
  padding: 0 9px;
  background: var(--accent);
  font-size: 12px;
  font-weight: 600;
  color: var(--on-accent);
}
.head h2 {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 14px;
  background: var(--ink-sink);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone);
}
.head .hrule { flex: 1; align-self: center; height: 3px; background: var(--ink-sink); }
.head .cap {
  display: flex;
  align-items: center;
  padding-left: 14px;
  font-size: 12px;
  color: var(--bone-45);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ---- game grids ---- */
/* Left to size themselves, tiles take the height of their own blurb and no two
   in a row match. Stretching the row and letting the body grow keeps every box
   the same size whatever the text does. */
.grid { display: grid; gap: 1px; align-items: stretch; background: var(--ink-sink); }
.grid--live { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid--tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) {
  .grid--live { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  text-decoration: none;
  background: var(--ink-raise);
  border: 0;
  transition: background .2s;
}
.tile:hover { background: var(--accent-08); }
.tile__art > svg[viewBox='0 0 240 106'] { height: auto !important; aspect-ratio: 240 / 106; }
.tile__art {
  display: block;
  position: relative;
  border-bottom: 1px solid var(--ink-sink);
  overflow: hidden;
  line-height: 0;
}
.tile__flag {
  position: absolute;
  top: 0; left: 0;
  padding: 4px 8px;
  background: var(--ink-sink);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
}
.tile__flag--live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: var(--gold);
  color: #1C060C;
  letter-spacing: .12em;
}
.tile__flag--live i { width: 6px; height: 6px; background: #B0302E; border-radius: 50%; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tile__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 0 auto;          /* takes up the slack so every tile ends level */
  padding: 10px 12px 11px;
}
.tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tile__top .d { font-size: 16px; font-weight: 900; color: var(--bone); text-transform: uppercase; }
.tile__top .m { font-size: 12px; color: var(--gold); }
.tile__sub { display: block; margin-top: 1px; font-size: 12.5px; color: var(--bone-45); }
.tile__state {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bone-45);
}
.tile__state b { color: var(--bone); font-weight: 500; }
.tile__state span { color: var(--accent); }

/* ---- live bets + weekly race ---- */
.pair { display: grid; gap: 20px; }
@media (min-width: 1040px) { .pair { grid-template-columns: 1.4fr 1fr; } }
.feed, .race {
  border: 3px solid var(--ink-sink);
  background: var(--ink-raise);
}
.feed__head, .feed .row {
  display: grid;
  grid-template-columns: 1.2fr 1fr .8fr .9fr;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12px;
}
.feed__head {
  background: var(--ink-sink);
  color: var(--bone-45);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.feed .row { border-bottom: 1px solid var(--line); color: var(--bone-70); }
.feed .row:last-child { border-bottom: 0; }
.feed .row .win { color: var(--accent); }
.feed .row .lose { color: var(--red); }
.feed .row .right, .feed__head span:nth-child(n+3) { text-align: right; }

.race .row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  color: var(--bone-70);
}
.race .row:last-of-type { border-bottom: 0; }
.race .row .rank { color: var(--bone-45); }
.race .row--me { background: var(--accent-08); color: var(--bone); }
.race .row--me .rank { color: var(--accent); }
.race p { margin: 0; padding: 10px 12px; font-size: 12px; color: var(--bone-45); border-top: 1px solid var(--line); }

/* ---- footer ---- */
.floor-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding-top: 16px;
  font-size: 12px;
  color: var(--bone-45);
  text-transform: uppercase;
  letter-spacing: .06em;
  flex-wrap: wrap;
}
.floor-foot .hrule { flex: 1; height: 3px; background: var(--ink-sink); min-width: 40px; }
.floor-foot a { color: var(--bone-45); text-decoration: none; }
.floor-foot a:hover { color: var(--accent); }

@media (max-width: 640px) {
  #main { padding: 16px 14px 18px; }
  .hero__in { padding: 24px 20px; }
  .grid { gap: 12px; }
}

.tile__title {
  display: block;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--bone);
  text-transform: uppercase;
}

/* Long names must not push the multiplier onto its own line. */
.tile__top { flex-wrap: nowrap; }
.tile__top .d { min-width: 0; overflow-wrap: anywhere; }
.tile__top .m { flex: 0 0 auto; }

@media (max-width: 720px) {
  /* the art is scenery on a phone; the copy has to stay readable over it */
  .hero { height: auto; min-height: 432px; }
  .hero p { min-height: 4.2em; }
  .commit { flex-wrap: nowrap; max-width: 100%; }
  .commit .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero__art { opacity: .3; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn-accent, .btn-raise { justify-content: center; }
  .head { flex-wrap: wrap; }
  .head .cap { padding: 6px 0 0; }
  .head .hrule { display: none; }
}

/* a long handle must not crush the rank or the amount out of the row */
.race .row .who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.race .row .rank { text-align: right; }
