:root {
  color-scheme: dark;
  --bg: #101b18;
  --panel: #192722;
  --border: #304039;
  --muted: #a1b0a6;
  --cream: #f4efe2;
  --gold: #e9c580;
  --green: #91c4a4;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--cream);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 35% 0%, #25382a66, transparent 55%);
  min-height: 100vh;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
button {
  font: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
.topbar {
  height: 83px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.5%;
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2.8px;
}
.brand b {
  font-weight: 400;
  color: var(--gold);
}
.brand-mark {
  width: 39px;
  height: 43px;
  display: grid;
  place-content: center;
  border: 1px solid var(--gold);
  border-radius: 17px 17px 13px 13px;
  font:
    italic 29px Georgia,
    serif;
  color: var(--gold);
  position: relative;
}
.brand-mark span {
  font: 9px Arial;
  position: absolute;
  bottom: 2px;
  right: 3px;
}
.header-right {
  display: flex;
  gap: 30px;
  align-items: center;
}
.room-name {
  font-size: 10px;
  letter-spacing: 2px;
  color: #c3cec5;
}
.room-name span {
  margin: 0 12px;
  color: #53675a;
}
.connection {
  font-size: 11px;
  letter-spacing: 0.6px;
  border: 1px solid #47604f;
  background: #263b2d;
  padding: 8px 12px;
  border-radius: 20px;
  color: #c2e4cd;
}
.connection:before,
.live-dot {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9addae;
  margin-right: 7px;
}
.connection.connecting {
  color: var(--gold);
  border-color: #756548;
  background: #393124;
}
.connection.connecting:before {
  background: var(--gold);
}
main {
  max-width: 1640px;
  margin: auto;
  padding: 38px 4.5% 0;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 29px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2.1px;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 11px;
}
h1 {
  font:
    42px Georgia,
    'Times New Roman',
    serif;
  letter-spacing: -1.3px;
  margin: 0 0 12px;
}
h1 em {
  color: var(--gold);
  font-weight: 400;
}
.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.live-count {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 26px;
}
.live-count .live-dot {
  box-shadow: 0 0 0 4px #9addae12;
}
.live-count strong {
  color: var(--cream);
  font-size: 15px;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.race-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}
.race-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 24px;
  height: 95px;
}
.race-toolbar .eyebrow {
  display: block;
  font-size: 8px;
  margin-bottom: 7px;
}
.race-toolbar h2 {
  font:
    25px Georgia,
    serif;
  margin: 0;
}
.phase-tag {
  font-size: 9px;
  letter-spacing: 1.6px;
  padding: 9px 13px;
  border: 1px solid #57634b;
  border-radius: 5px;
  color: var(--gold);
  background: #e9c58009;
}
.phase-tag.racing {
  color: #b7e8c7;
  border-color: #4a8660;
}
.timer {
  display: flex;
  align-items: center;
  gap: 13px;
}
.timer > span {
  font-size: 8px;
  letter-spacing: 1.1px;
  max-width: 65px;
  line-height: 1.7;
  color: var(--muted);
  text-align: right;
}
.timer strong {
  font-size: 33px;
  font-weight: 400;
  min-width: 60px;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.timer small {
  font-size: 12px;
  margin-left: 3px;
}
.phase-progress {
  height: 3px;
  background: #334638;
}
.phase-progress span {
  display: block;
  height: 100%;
  background: var(--gold);
  width: 0;
}
.finish-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: #fff4c7;
}
.finish-flash.celebrate {
  animation: finish-glow 650ms ease-out forwards;
}
@keyframes finish-glow {
  from {
    opacity: 0.42;
  }
  to {
    opacity: 0;
  }
}
.stretch-banner {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 5px 14px;
  background: #641306e6;
  border: 1px solid #ffd569;
  color: #fff0a0;
  font-size: clamp(8px, 1.2vw, 14px);
  font-weight: 900;
  letter-spacing: 2px;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .finish-flash.celebrate {
    animation: none;
  }
}
.track-wrap {
  position: relative;
  aspect-ratio: 1280/560;
  background: #538e32;
  overflow: hidden;
}
#GameDiv,
#Cocos3dGameContainer,
#GameCanvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
#GameCanvas {
  outline: none;
}
.track-caption {
  position: absolute;
  top: 17px;
  left: 19px;
  letter-spacing: 1.6px;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  background: #172a22c9;
  padding: 8px 10px;
  border-radius: 4px;
}
.track-caption .live-dot {
  width: 5px;
  height: 5px;
}
.race-distance {
  position: absolute;
  top: 17px;
  right: 19px;
  padding: 8px 10px;
  border-radius: 4px;
  background: #172a22df;
  color: #fff;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.finish-label {
  position: absolute;
  right: auto;
  top: 39%;
  font-size: 7px;
  letter-spacing: 1px;
  background: #f4efe2;
  color: #253026;
  padding: 4px;
  transform: translateX(-50%);
}
.finish-line {
  position: absolute;
  right: auto;
  top: 47%;
  height: 44%;
  width: 10px;
  opacity: 0.8;
  background: conic-gradient(#f4efe2 25%, #1a2b22 0 50%, #f4efe2 0 75%, #1a2b22 0) 0 0 / 10px 10px;
  pointer-events: none;
}
.lane-numbers {
  position: absolute;
  left: 1.7%;
  top: 47%;
  height: 44%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.lane-numbers span {
  border: 1px solid #fff7;
  color: white;
  background: #17332355;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 9px;
}
.race-footer {
  padding: 17px 21px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  min-height: 58px;
}
.auto-cycle {
  font-size: 8px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.auto-cycle .live-dot {
  width: 4px;
  height: 4px;
  margin-right: 5px;
}
.pick-panel {
  background: #192722;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.section-heading h2 {
  font:
    25px Georgia,
    serif;
  margin: 0 0 9px;
}
.section-heading p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 18px;
}
.horse-list {
  display: grid;
  gap: 7px;
}
.horse-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #13211b;
  border: 1px solid #324238;
  border-radius: 7px;
  min-height: 61px;
  padding: 5px 10px;
  width: 100%;
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.horse-card:hover:enabled {
  border-color: #ad9463;
  background: #293426;
}
.horse-card:disabled {
  cursor: default;
}
.horse-card.selected {
  border-color: var(--gold);
  background: #3b3c28;
}
.horse-card img {
  width: 66px;
  height: 49px;
  object-fit: contain;
}
.horse-card .number {
  font-size: 10px;
  color: var(--horse-color);
  font-weight: bold;
  min-width: 10px;
}
.horse-card .horse-info {
  flex: 1;
}
.horse-card strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}
.horse-card .horse-subtitle {
  font-size: 9px;
  color: #b0bcb0;
}
.radio {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border: 1px solid #5e6a5c;
  border-radius: 50%;
}
.selected .radio {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 3px #3b3c28;
  background: var(--gold);
}
.selection-summary {
  padding: 13px 10px;
  border-radius: 5px;
  background: #253329;
  text-align: center;
  font-size: 11px;
  color: var(--gold);
  margin-top: 15px;
  line-height: 1.5;
}
.pick-note {
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
}
.error-message {
  font-size: 11px;
  color: #ffb5a5;
  line-height: 1.5;
  margin: 0;
}
.error-message:not(:empty) {
  margin-top: 10px;
}
.lower-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  margin-top: 25px;
}
.recent-panel,
.how-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  background: #17251e80;
}
.lower-grid h2 {
  font:
    20px Georgia,
    serif;
  margin: 0;
}
.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.section-row .eyebrow {
  margin: 0;
  font-size: 8px;
  color: var(--muted);
}
.history {
  display: flex;
  gap: 9px;
  margin-top: 19px;
  min-height: 54px;
  overflow: auto;
}
.empty-history {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  color: #d6ddcf;
}
.empty-history span {
  font-size: 11px;
  color: var(--muted);
}
.history-item {
  min-width: 93px;
  flex: 1;
  border-left: 2px solid var(--horse-color);
  padding: 4px 9px;
  background: #27362a;
  border-radius: 0 4px 4px 0;
}
.history-item small {
  font-size: 8px;
  color: var(--muted);
  display: block;
  margin-bottom: 7px;
}
.history-item strong {
  font-size: 10px;
  display: block;
  white-space: nowrap;
}
.steps {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 25px;
}
.steps > div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.steps b {
  font:
    19px Georgia,
    serif;
  color: var(--gold);
}
.steps span {
  font-size: 11px;
  white-space: nowrap;
}
.steps small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 8px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 0;
  font-size: 8px;
  letter-spacing: 1.1px;
  color: #9caca0;
}
.page-footer > span:last-child {
  font-size: 10px;
  letter-spacing: 0;
}
.footer-star {
  color: var(--gold);
  margin: 0 8px;
}
.loading {
  position: absolute;
  inset: 0;
  background: #172920f5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  color: var(--cream);
  padding: 25px;
  text-align: center;
}
.loading > span:last-child {
  font-size: 12px;
  color: var(--muted);
}
.spinner {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid #667150;
  border-top-color: var(--gold);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
[hidden] {
  display: none !important;
}

.lane-numbers {
  top: 26.8%;
  height: 63.2%;
}
.finish-line {
  top: 26.8%;
  height: 63.2%;
}
.finish-label {
  top: 20%;
}
@media (min-width: 1450px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .horse-card {
    min-height: 67px;
  }
}
@media (max-width: 1100px) {
  main {
    padding: 28px 3% 0;
  }
  .topbar {
    padding: 0 3%;
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 16px;
  }
  .pick-panel {
    padding: 19px;
  }
  .race-toolbar {
    padding: 18px;
  }
  .timer > span {
    display: none;
  }
  .race-footer {
    font-size: 10px;
    padding: 14px;
  }
  .auto-cycle {
    display: none;
  }
  .lower-grid {
    gap: 16px;
  }
  .steps {
    gap: 10px;
  }
  .steps > div {
    gap: 6px;
  }
  .steps span {
    font-size: 10px;
  }
}
@media (max-width: 800px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
  .pick-panel {
    padding: 22px;
  }
  .horse-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .horse-card {
    gap: 5px;
    padding: 7px;
  }
  .horse-card img {
    width: 55px;
  }
  .horse-card .number {
    display: none;
  }
  .horse-card strong {
    font-size: 11px;
  }
  .horse-card .horse-subtitle {
    font-size: 8px;
  }
  .radio {
    width: 12px;
    height: 12px;
  }
  .selection-summary {
    margin-top: 14px;
  }
  .lower-grid {
    grid-template-columns: 1fr 1fr;
  }
  .how-panel,
  .recent-panel {
    padding: 20px 17px;
  }
  .steps {
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
  }
  .steps small {
    display: inline;
    margin-left: 12px;
  }
  .section-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .history {
    flex-wrap: wrap;
    overflow: visible;
  }
  .history-item {
    min-width: 85px;
  }
  .room-name {
    display: none;
  }
  .page-footer > span:last-child {
    display: none;
  }
}
@media (max-width: 520px) {
  .topbar {
    height: 69px;
    padding: 0 20px;
  }
  .brand {
    font-size: 12px;
    letter-spacing: 1.5px;
    gap: 10px;
  }
  .brand-mark {
    width: 31px;
    height: 36px;
    font-size: 25px;
  }
  .connection {
    font-size: 9px;
    padding: 7px 9px;
  }
  main {
    padding: 25px 16px 0;
  }
  .intro {
    margin-bottom: 24px;
    align-items: flex-start;
  }
  .intro .eyebrow {
    font-size: 7px;
    letter-spacing: 1.4px;
  }
  h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .subtitle {
    font-size: 11px;
    max-width: 240px;
  }
  .live-count {
    gap: 3px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 65px;
    font-size: 9px;
    margin-top: 30px;
  }
  .live-count .live-dot {
    margin-right: 3px;
  }
  .live-count strong {
    font-size: 12px;
  }
  .race-toolbar {
    height: 82px;
    padding: 15px;
  }
  .race-toolbar h2 {
    font-size: 22px;
  }
  .phase-tag {
    font-size: 7px;
    padding: 7px 8px;
    letter-spacing: 0.8px;
  }
  .timer strong {
    font-size: 28px;
    min-width: 44px;
  }
  .track-caption {
    font-size: 5px;
    top: 8px;
    left: 8px;
    padding: 5px;
    letter-spacing: 1px;
  }
  .track-caption .live-dot {
    width: 3px;
    height: 3px;
    margin-right: 3px;
  }
  .race-distance {
    top: 8px;
    right: 8px;
    padding: 5px;
    font-size: 7px;
    letter-spacing: 0;
  }
  .lane-numbers span {
    width: 10px;
    height: 10px;
    font-size: 6px;
    border-width: 0.5px;
  }
  .finish-line {
    width: 5px;
    background-size: 5px 5px;
  }
  .finish-label {
    font-size: 4px;
    padding: 2px;
    letter-spacing: 0.5px;
  }
  .race-footer {
    font-size: 10px;
    line-height: 1.6;
    min-height: 55px;
    padding: 12px 15px;
  }
  .horse-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .horse-card {
    min-height: 68px;
  }
  .horse-card img {
    width: 52px;
  }
  .pick-panel {
    padding: 20px 16px;
  }
  .section-heading h2 {
    font-size: 24px;
  }
  .lower-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    flex-direction: row;
    gap: 8px;
  }
  .steps > div {
    flex-direction: column;
    gap: 9px;
  }
  .steps small {
    display: block;
    margin: 7px 0 0;
  }
  .section-row {
    flex-direction: row;
    align-items: center;
  }
  .section-row .eyebrow {
    font-size: 7px;
  }
  .lower-grid h2 {
    font-size: 19px;
  }

  .loading {
    gap: 8px;
  }
  .loading strong {
    font-size: 12px;
  }
  .loading > span:last-child {
    font-size: 10px;
  }
  .spinner {
    width: 20px;
    height: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .spinner {
    animation: none;
  }
}

/* Original asset-pack controls and result screens. */
.track-results {
  position: absolute;
  top: 50%;
  left: 4%;
  transform: translateY(-50%);
  width: 72%;
  padding: 16px;
  background: #400000ed url('/assets/gui-panel.webp') center / 100% 100% no-repeat;
  box-shadow: 0 8px 24px #0006;
  text-align: center;
}
.track-results > p {
  margin: 0 0 12px;
  color: #fff177;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}
.track-places {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.track-places > div {
  padding: 12px 8px;
  border: 2px solid #f6d346;
  background: #240000d9;
}
.track-places .track-second {
  border-color: #c7d7e4;
}
.track-places b {
  display: block;
  font-size: 13px;
  color: #ffe465;
  margin-bottom: 9px;
}
.track-second b {
  color: #dce5ee;
}
.track-places strong {
  display: block;
  font-size: 20px;
  color: #fff;
}
.track-results small {
  display: block;
  margin-top: 12px;
  font-size: 10px;
  color: #ffe7c5;
}
@media (max-width: 520px) {
  .track-results {
    padding: 9px;
  }
  .track-results > p {
    font-size: 7px;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
  }
  .track-places {
    gap: 5px;
  }
  .track-places > div {
    padding: 7px 3px;
    border-width: 1px;
  }
  .track-places b {
    font-size: 7px;
    margin-bottom: 5px;
  }
  .track-places strong {
    font-size: 11px;
  }
  .track-results small {
    font-size: 6px;
    margin-top: 6px;
  }
}
.race-toolbar,
.gameplay-controls {
  background: #730000 url('/assets/gameplay-bar.webp') center / 100% 100% no-repeat;
}
.race-toolbar .eyebrow,
.race-toolbar h2,
.race-toolbar .timer strong {
  color: #fff077;
}
.race-toolbar .timer > span {
  color: #fff0c0;
}
.race-toolbar .phase-tag {
  background: #300000b0;
  border-color: #e5bd25;
  color: #fff2a0;
}
.gameplay-controls {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 17px;
}
.gameplay-controls > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff276;
  text-align: center;
  line-height: 1.5;
}
.sound-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff276;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
  min-width: 54px;
  min-height: 44px;
}
.sound-button img {
  width: 34px;
  height: 34px;
}
.sound-button[aria-pressed='false'] img {
  opacity: 0.6;
}
.sound-button:focus-visible {
  outline: 2px solid #fff276;
  outline-offset: 3px;
}
.asset-button {
  display: inline-flex;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 0;
}
.asset-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.asset-button:hover:enabled {
  filter: brightness(1.18);
}
.asset-button:disabled {
  opacity: 0.4;
  cursor: default;
}
.race-callout {
  position: absolute;
  width: 30%;
  max-height: 33%;
  object-fit: contain;
  top: 31%;
  left: 35%;
  pointer-events: none;
  filter: drop-shadow(0 4px 4px #0009);
}
.horse-card {
  border: 1px solid #b29831;
  background: #690300 url('/assets/gui-panel.webp') center / 100% 100% no-repeat;
  border-radius: 3px;
}
.horse-card strong {
  color: #fff6bd;
}
.horse-card .horse-subtitle {
  color: #f3d6b3;
}
.horse-card:hover:enabled {
  background: #870800 url('/assets/gui-panel.webp') center / 100% 100% no-repeat;
  filter: brightness(1.16);
}
.horse-card.selected {
  background: #610000 url('/assets/gui-panel.webp') center / 100% 100% no-repeat;
  border: 2px solid #fff06c;
  box-shadow: 0 0 0 2px #ffe84240;
}
.selected .radio {
  background: #fff06c;
  box-shadow: inset 0 0 0 3px #730000;
  border-color: #fff06c;
}
.results-board {
  margin: 16px;
  padding: 20px;
  background: #660400 url('/assets/gui-panel.webp') center / 100% 100% no-repeat;
  color: #fff6db;
}
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.results-heading .eyebrow {
  margin-bottom: 6px;
  color: #fff26b;
}
.results-heading h2 {
  margin: 0;
  font:
    25px Georgia,
    serif;
  color: #fff5b7;
}
.results-heading .asset-button {
  width: 32px;
  height: 32px;
}
.podium {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px 10px;
  background: #340000e8;
  border: 2px solid #eac84f;
}
.second-place {
  border-color: #bdcbd3;
}
.place-label {
  color: #ffdf52;
  font-size: 29px;
  letter-spacing: 1px;
}
.place-label span {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  margin-top: 3px;
}
.second-place .place-label {
  color: #e4edf3;
}
.podium-horse {
  width: 132px;
  height: 94px;
  max-width: 100%;
  object-fit: contain;
  margin-top: 6px;
}
.podium-card h3 {
  margin: 5px 0 7px;
  font:
    bold 23px Georgia,
    serif;
  color: #fff6ca;
}
.podium-card p {
  margin: 0 0 9px;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff;
}
.win-art {
  width: 74px;
  height: 32px;
  object-fit: contain;
}
.runnerup-note {
  display: flex;
  align-items: center;
  min-height: 32px;
  font-size: 9px;
  line-height: 1.5;
  color: #d4dce5;
}
#winner-message {
  margin: 16px 0 7px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.6;
}
#winner-message.pick-won {
  color: #fff07b;
}
.results-rule {
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: #f4d6c0;
  line-height: 1.5;
}
.history {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
}
.history-item {
  min-width: 0;
  padding: 10px;
}
.history-item strong,
.history-second {
  white-space: normal;
  line-height: 1.5;
}
.history-second {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  color: #c7d7e4;
}
.empty-history {
  grid-column: 1 / -1;
}
@media (max-width: 520px) {
  .gameplay-controls {
    padding: 8px 10px;
    min-height: 60px;
    gap: 9px;
  }
  .gameplay-controls > span {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .results-board {
    margin: 10px;
    padding: 14px;
  }
  .results-heading h2 {
    font-size: 19px;
  }
  .results-heading .eyebrow {
    font-size: 7px;
  }
  .podium {
    gap: 8px;
  }
  .podium-card {
    padding: 12px 6px;
  }
  .place-label {
    font-size: 25px;
  }
  .place-label span {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .podium-horse {
    width: 105px;
    height: 76px;
  }
  .podium-card h3 {
    font-size: 17px;
  }
  .podium-card p {
    font-size: 11px;
  }
  .runnerup-note {
    font-size: 7px;
  }
  #winner-message {
    font-size: 12px;
  }
  .results-rule {
    font-size: 10px;
  }
}
