/* Extracted from _xemidocs/reference/prototypes/live-room-original.html. */
.hidden {
  display: none !important
}

:root {
  --night: #0a1f2b;
  --dirt: #c79a5e;
  --dirt2: #b07f43;
  --dirt3: #9c6c34;
  --rail: #eef0e8;
  --ticket: #f4ead0;
  --ticket-line: #d8c79c;
  --tote: #ffcf52;
  --tote-dim: #a07f2c;
  --hot: #ef3b41;
  --hot-d: #c12a30;
  --cream: #f4ead0;
  --muted: #8fb3a6;
  --ink: #10241c;
  --line: rgba(244, 234, 208, .14);
  --spd: #ff8a3c;
  --stm: #46c8f0;
  --cha: #fb3d8e;
  --vib: #7cdf9a;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  height: 100%
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--cream);
  overflow: hidden;
  background: radial-gradient(80% 50% at 18% -8%, rgba(120, 200, 255, .10), transparent 60%),
    radial-gradient(80% 50% at 82% -8%, rgba(255, 210, 120, .10), transparent 60%),
    linear-gradient(180deg, #08161e 0%, var(--night) 38%, #07221a 100%);
}

.app {
  display: grid;
  grid-template-columns: 1fr 366px;
  grid-template-rows: auto 1fr;
  height: 100vh;
  width: 100vw
}

header {
  grid-column: 1/-1
}

.mixer {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 60;
  width: 226px;
  background: linear-gradient(180deg, #0e3026, #0a241c);
  border: 1px solid rgba(255, 207, 82, .3);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  padding: 13px;
  display: none
}

.mixer.open {
  display: block
}

.mx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: 'Anton';
  font-weight: 400;
  letter-spacing: .5px;
  color: var(--tote);
  font-size: 13px;
  text-transform: uppercase
}

.mx-mute {
  background: #0e2a1e;
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
  font-family: 'Outfit'
}

.mx-mute.muted {
  background: var(--hot);
  border-color: var(--hot);
  color: #fff
}

.mx-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 0;
  font-size: 12px
}

.mx-row span {
  width: 84px;
  color: var(--muted);
  flex: 0 0 auto
}

.mx-row input[type=range] {
  flex: 1;
  min-width: 0;
  height: 5px;
  border-radius: 5px;
  accent-color: var(--tote);
  cursor: pointer
}

.mixer.dim .mx-row {
  opacity: .4;
  pointer-events: none
}

.arena {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px clamp(12px, 2.4vw, 22px)
}

.race-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap
}

.race-head h2 {
  font-family: 'Anton';
  font-weight: 400;
  font-size: clamp(15px, 2.6vw, 19px);
  margin: 0;
  letter-spacing: .5px;
  text-transform: uppercase
}

.rh-right {
  display: flex;
  align-items: center;
  gap: 10px
}

.bet-toggle {
  display: none;
  font-family: 'Anton';
  letter-spacing: .5px;
  text-transform: uppercase;
  font-size: 13px;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #f5474d, #cf2d33);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 15px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(239, 59, 65, .35)
}

.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 207, 82, .35);
  border-radius: 7px;
  padding: 7px 11px;
  color: var(--tote);
  background: rgba(255, 207, 82, .07);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.view-switch:hover {background:rgba(255,207,82,.14)}

/* bet-toggle is mobile-only; desktop uses the always-visible paddock */
.phase {
  font-family: 'Space Mono';
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 5px;
  border: 1px dashed var(--tote-dim);
  color: var(--tote);
  white-space: nowrap;
  background: rgba(0, 0, 0, .2)
}

.phase.bet {
  border-style: solid;
  border-color: #cf2d33;
  color: #fff;
  background: linear-gradient(180deg, #f5474d, #cf2d33);
  cursor: pointer
}

.phase.run {
  border-color: #5fd38a;
  color: #5fd38a;
  background: rgba(95, 211, 138, .08)
}

.arena-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.stadium {
  flex: 1 1 auto;
  min-height: 250px;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .05)
}

.stands {
  flex: 0 0 auto;
  height: clamp(30px, 4.4vh, 46px);
  position: relative;
  background: linear-gradient(180deg, #0a2230, #0c2a2c);
  overflow: hidden
}

.stands::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .5) 1px, transparent 1.4px);
  background-size: 9px 8px;
  opacity: .18
}

.stands::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .35)), repeating-linear-gradient(90deg, #15414a 0 6px, #0f343b 6px 12px)
}

.lights {
  position: absolute;
  top: 5px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none
}

.lights b {
  width: 50px;
  height: 12px;
  border-radius: 7px;
  background: radial-gradient(circle, #fff7d6, #ffd24d 60%, transparent 72%);
  filter: blur(1px);
  opacity: .85
}

.track {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 26px), linear-gradient(180deg, var(--dirt), var(--dirt2) 55%, var(--dirt3));
  border-top: 3px solid var(--rail);
  border-bottom: 3px solid #7a5526
}

.lane {
  flex: 1 1 0;
  min-height: 38px;
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .10)
}

.lane:last-child {
  border-bottom: none
}

.lane:nth-child(even) .runway {
  background: rgba(0, 0, 0, .05)
}

.lane.police {
  animation: police .35s steps(2) infinite
}

@keyframes police {
  0% {
    box-shadow: inset 0 0 50px rgba(40, 90, 255, .65)
  }

  100% {
    box-shadow: inset 0 0 50px rgba(255, 40, 40, .65)
  }
}

.lane.dead {
  filter: saturate(.25) brightness(.85)
}

.lane.win {
  animation: winglow 1.1s ease-in-out 3
}

@keyframes winglow {

  0%,
  100% {
    box-shadow: inset 0 0 0 rgba(255, 207, 82, 0)
  }

  50% {
    box-shadow: inset 0 0 60px rgba(255, 207, 82, .55)
  }
}

.post {
  width: clamp(96px, 22vw, 190px);
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 clamp(6px, 1.4vw, 11px);
  background: linear-gradient(180deg, rgba(8, 28, 22, .92), rgba(6, 22, 18, .92));
  border-right: 2px solid rgba(255, 255, 255, .12);
  z-index: 3
}

.gate {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-family: 'Space Mono';
  font-weight: 700;
  font-size: 12px;
  color: #08201a
}

.post .meta {
  min-width: 0
}

.post .nm {
  font-weight: 700;
  font-size: clamp(10px, 1.6vw, 12.5px);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.post .od {
  font-family: 'Space Mono';
  font-size: 11px;
  color: var(--tote);
  font-weight: 700
}

.post .od.out {
  color: var(--hot);
  text-decoration: line-through
}

.runway {
  position: relative;
  flex: 1;
  height: 100%;
  background-image:
    linear-gradient(90deg, transparent calc(25% - 1px), rgba(255, 255, 255, .14) 25%, transparent calc(25% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, .14) 50%, transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(75% - 1px), rgba(255, 255, 255, .14) 75%, transparent calc(75% + 1px))
}

.runway::after {
  content: "";
  position: absolute;
  left: 95%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 16px;
  background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%), linear-gradient(45deg, #fff 25%, #111 25%, #111 75%, #fff 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
  opacity: .95;
  box-shadow: 0 0 8px rgba(0, 0, 0, .4)
}

.shadow {
  position: absolute;
  top: 72%;
  left: 2%;
  transform: translateX(-50%);
  width: 28px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .5), transparent 70%);
  z-index: 1;
  pointer-events: none
}

.dust {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0;
  z-index: 1
}

.poop {
  position: absolute;
  bottom: 5px;
  transform: translateX(-50%);
  font-size: 17px;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4))
}

.dograce {
  position: absolute;
  top: 50%;
  left: -12%;
  transform: translateY(-50%) scaleX(-1);
  font-size: 26px;
  z-index: 8;
  animation: dogrun 1.7s linear forwards;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .45))
}

@keyframes dogrun {
  to {
    left: 116%
  }
}

.runner {
  position: absolute;
  top: 50%;
  left: 2%;
  transform: translate(-50%, -50%);
  transition: left .25s linear;
  z-index: 2;
  will-change: left
}

.sprite {
  display: inline-block;
  font-size: clamp(22px, 4.4vw, 30px);
  transform: scaleX(-1);
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .45))
}

.runner.lead .sprite {
  animation: bob .4s infinite;
  filter: drop-shadow(0 0 10px rgba(255, 207, 82, .8)) drop-shadow(0 5px 4px rgba(0, 0, 0, .45))
}

@keyframes bob {
  50% {
    transform: scaleX(-1) translateY(-18%)
  }
}

.runner.spin .sprite {
  animation: spin .55s linear infinite
}

@keyframes spin {
  to {
    transform: scaleX(-1) rotate(360deg)
  }
}

.runner.shake .sprite {
  animation: shake .12s infinite
}

@keyframes shake {

  0%,
  100% {
    transform: scaleX(-1) rotate(-9deg)
  }

  50% {
    transform: scaleX(-1) rotate(9deg)
  }
}

.runner.turbo .sprite {
  filter: drop-shadow(10px 0 0 rgba(255, 160, 0, .7)) drop-shadow(20px 0 0 rgba(255, 90, 0, .5)) drop-shadow(30px 0 0 rgba(255, 60, 0, .3))
}

.runner.dead .sprite {
  filter: grayscale(1) brightness(.65);
  transform: scaleX(-1) rotate(90deg);
  animation: none
}

.runner.busted .sprite {
  filter: grayscale(.7) brightness(.8);
  animation: none
}

.runway .rtag {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -160%);
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8))
}

.runner.abduct {
  animation: abduct 1.6s ease-in-out
}

@keyframes abduct {
  0% {
    transform: translate(-50%, -50%) scale(1)
  }

  45% {
    transform: translate(-50%, -190%) scale(.4);
    opacity: .2
  }

  55% {
    opacity: .2
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1
  }
}

.fx {
  position: absolute;
  top: 50%;
  font-size: 22px;
  z-index: 6;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: fxUp 1.5s ease-out forwards
}

@keyframes fxUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(.5)
  }

  20% {
    opacity: 1;
    transform: translate(-50%, -95%) scale(1.25)
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(1)
  }
}

.fx.big {
  font-size: 30px
}

.ufo {
  position: absolute;
  top: -42px;
  font-size: 32px;
  z-index: 7;
  animation: ufoDrop 1.6s ease-in-out
}

@keyframes ufoDrop {
  0% {
    top: -42px;
    opacity: 0
  }

  30% {
    top: 6px;
    opacity: 1
  }

  65% {
    top: 6px
  }

  100% {
    top: -42px;
    opacity: 0
  }
}

.cruiser {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  z-index: 7;
  animation: cruise 1.4s ease-out
}

@keyframes cruise {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(70px)
  }

  35% {
    opacity: 1;
    transform: translateY(-50%) translateX(0)
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0)
  }
}

.commentary {
  flex: 0 0 auto;
  background: linear-gradient(180deg, var(--ticket), #ecdfbf);
  color: var(--ink);
  border-radius: 10px;
  border: 1px solid var(--ticket-line);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  overflow: hidden
}

.commentary .cap {
  background: linear-gradient(180deg, #f5474d, #cf2d33);
  color: #fff;
  font-family: 'Anton';
  letter-spacing: 1px;
  font-size: 12px;
  padding: 6px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase
}

.commentary .cap .who {
  font-family: 'Outfit';
  font-weight: 500;
  opacity: .9;
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px
}

.callbig {
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-family: 'Anton';
  font-weight: 400;
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.1;
  letter-spacing: .3px;
  overflow: hidden
}

.callbig.flash {
  animation: callflash .5s
}

@keyframes callflash {
  0% {
    background: #ffe39a
  }

  100% {
    background: transparent
  }
}

.feed {
  height: 56px;
  overflow: auto;
  padding: 2px 15px 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #6b5828
}

.feed .ev b {
  color: var(--hot-d)
}

.livebet {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  min-height: 44px;
  background: linear-gradient(180deg, #0c2a22, #082019);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 15px;
  font-size: 13.5px
}

.livebet .tag {
  font-family: 'Anton';
  color: var(--tote);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase
}

.livebet b {
  color: var(--tote)
}

.paddock {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  border-radius: 12px;
  background: rgba(4, 14, 10, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s
}

.paddock.open {
  opacity: 1;
  pointer-events: auto
}

.sheet {
  margin: auto;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, #0c2a20, #08201a);
  border: 1px solid rgba(255, 207, 82, .25);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65);
  transform: translateY(14px) scale(.99);
  transition: transform .2s
}

.paddock.open .sheet {
  transform: none
}

.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line)
}

.sheet-head h3 {
  font-family: 'Anton';
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 1px;
  margin: 0;
  color: var(--tote);
  text-transform: uppercase
}

.sheet-head .sub {
  font-family: 'Outfit';
  color: var(--muted);
  font-size: 11px;
  margin-left: 6px;
  letter-spacing: 0;
  text-transform: none
}

.close {
  flex: 0 0 auto;
  background: #0e2a1e;
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 7px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: .12s
}

.close:hover {
  border-color: var(--hot);
  color: var(--hot)
}

.cards {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 13px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 11px;
  align-content: start
}

.card {
  position: relative;
  overflow: visible;
  background: linear-gradient(180deg, #103026, #0c241c);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px 12px;
  cursor: pointer;
  transition: transform .14s, box-shadow .14s, border-color .14s;
  box-shadow: inset 0 4px 0 var(--accent)
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 4px 0 var(--accent), 0 12px 24px rgba(0, 0, 0, .4);
  border-color: var(--accent)
}

.card.sel {
  border-color: var(--tote);
  box-shadow: inset 0 4px 0 var(--accent), 0 0 0 2px rgba(255, 207, 82, .35), 0 12px 24px rgba(0, 0, 0, .4)
}

.card .top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 0 7px
}

.card .e {
  font-size: 27px;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4))
}

.card .nm {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  flex: 1
}

.card .od {
  font-family: 'Space Mono';
  font-weight: 700;
  font-size: 15px;
  color: #08201a;
  background: var(--tote);
  padding: 3px 8px;
  border-radius: 6px
}

.card .bio {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 9px;
  line-height: 1.35
}

.stat {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 8px;
  margin: 4px 0
}

.stat .sl {
  font-size: 9.5px;
  letter-spacing: .6px;
  color: var(--muted);
  text-transform: uppercase
}

.stat .bar {
  height: 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden
}

.stat .fill {
  height: 100%;
  border-radius: 5px;
  width: 0;
  transition: width .7s cubic-bezier(.2, .8, .2, 1)
}

.betbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .18)
}

.stake {
  display: flex;
  gap: 6px
}

.stake button {
  font-family: 'Space Mono';
  font-weight: 700;
  background: #0e2a1e;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  transition: .12s
}

.stake button:hover {
  border-color: var(--tote)
}

.stake button.on {
  background: var(--tote);
  color: #000;
  border-color: var(--tote)
}

.placebet {
  margin-left: auto;
  font-family: 'Anton';
  letter-spacing: 1px;
  font-size: 14px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f5474d, #cf2d33);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 11px 24px;
  cursor: pointer;
  transition: .12s;
  box-shadow: 0 4px 12px rgba(239, 59, 65, .35)
}

.placebet:hover {
  filter: brightness(1.08)
}

.placebet:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none
}

.myslip {
  font-size: 12px;
  color: var(--muted);
  width: 100%;
  margin-top: 3px
}

.myslip b {
  color: var(--tote)
}

.chat {
  position: relative;
  background: linear-gradient(180deg, #0b251e, #081c16);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0
}

.ch-head {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 0
}

.ch-tabs {
  display: flex;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0
}

.ch-tab {
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-family: 'Anton';
  letter-spacing: .5px;
  font-size: 13px;
  text-transform: uppercase;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: .12s
}

.ch-tab:hover {
  color: var(--cream);
  border-color: var(--line)
}

.ch-tab.active {
  color: var(--tote);
  border-color: rgba(255, 207, 82, .35);
  background: rgba(255, 207, 82, .07)
}

.dm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: var(--hot);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 0 4px;
  margin-left: 4px;
  display: none
}

.ch-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto
}

.ch-tools .cnt {
  font-size: 11px;
  color: var(--muted)
}

.ch-tools .cnt .g {
  color: #5fd38a
}

.chip-btn.focus-wallet {
  display: none;
  width: auto;
  padding: 0 10px;
  gap: 5px;
  font-size: 12px;
  font-family: 'Space Mono';
  border-color: rgba(255, 207, 82, .4)
}

.chip-btn,
.emoji-btn,
.ch-close {
  background: #0e2a1e;
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: .12s
}

.chip-btn:hover,
.emoji-btn:hover,
.ch-close:hover {
  border-color: var(--tote)
}

.ch-close {
  display: none;
  font-size: 18px
}

.msgs {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px
}

/* DM tab view */
.dm-view {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column
}

.dm-view.hidden {
  display: none
}

.dm-list {
  flex: 1 1 0;
  overflow: auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px
}

.dm-convo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #0e2a1e;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: .12s
}

.dm-convo:hover {
  border-color: var(--tote)
}

.dm-convo-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.dm-convo-preview {
  font-size: 11.5px;
  color: var(--muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.dm-convo-del {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
  flex: 0 0 auto;
  opacity: 0;
  transition: .12s
}

.dm-convo:hover .dm-convo-del {
  opacity: 1
}

.dm-convo-del:hover {
  color: var(--hot)
}

.dm-empty {
  text-align: center;
  padding: 28px 14px;
  color: var(--muted);
  font-size: 12px
}

.dm-thread {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0
}

.dm-thread.hidden {
  display: none
}

.dm-thread-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line)
}

.dm-back {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: .12s
}

.dm-back:hover {
  color: var(--cream);
  border-color: rgba(255, 207, 82, .4)
}

.dm-thread-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.dm-thread-link {
  cursor: pointer;
  text-decoration: underline dotted transparent
}

.dm-thread-link:hover {
  color: var(--tote);
  text-decoration-color: currentColor
}

.dm-del {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: .12s
}

.dm-del:hover {
  color: var(--hot)
}

.dm-msgs {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.dm-msg {
  font-size: 13px;
  max-width: 80%;
  padding: 7px 11px;
  border-radius: 10px;
  line-height: 1.4;
  word-wrap: break-word
}

.dm-msg.mine {
  align-self: flex-end;
  background: rgba(255, 207, 82, .18);
  border: 1px solid rgba(255, 207, 82, .25);
  color: var(--cream)
}

.dm-msg.theirs {
  align-self: flex-start;
  background: #0e2a1e;
  border: 1px solid var(--line);
  color: var(--cream)
}

.dm-msg.gift {
  align-self: center;
  max-width: 92%;
  background: rgba(255, 207, 82, .08);
  border: 1px dashed rgba(255, 207, 82, .35);
  color: var(--tote);
  font-size: 12px;
  text-align: center
}

.dm-compose {
  flex: 0 0 auto
}

.dm-compose input {
  border-radius: 20px;
  flex: 1;
  background: #0e2a1e;
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 10px 15px;
  font-family: 'Outfit';
  font-size: 13.5px;
  outline: none;
  min-width: 0
}

.dm-compose input:focus {
  border-color: var(--tote)
}

.dm-compose button {
  flex: 0 0 auto;
  background: var(--tote);
  border: none;
  border-radius: 20px;
  width: 42px;
  cursor: pointer;
  font-size: 16px;
  color: #08201a
}

.m {
  font-size: 13.5px;
  line-height: 1.45;
  word-wrap: break-word;
  display: flex;
  gap: 8px;
  align-items: flex-start
}

.m .av {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #08201a;
  margin-top: 1px
}

.m .bd .u {
  font-weight: 700;
  margin-right: 5px
}

.m .crown {
  margin-right: 2px
}

.m .stk {
  font-size: 42px;
  line-height: 1.1;
  display: inline-block
}

.m .gifmsg {
  max-width: 175px;
  border-radius: 10px;
  display: block;
  margin-top: 3px
}

.gthumb {
  width: 52px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 auto;
  display: block
}

.emo.gifbtn {
  padding: 3px;
  height: auto
}

.m.sys {
  display: block;
  font-size: 12px;
  color: var(--tote);
  font-style: italic;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
  padding: 5px 0;
  text-align: center
}

.compose {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 11px 12px;
  border-top: 1px solid var(--line)
}

.compose input {
  flex: 1;
  background: #0e2a1e;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--cream);
  padding: 10px 15px;
  font-family: 'Outfit';
  font-size: 13.5px;
  outline: none;
  min-width: 0
}

.compose input:focus {
  border-color: var(--tote)
}

.compose .send {
  flex: 0 0 auto;
  background: var(--tote);
  border: none;
  border-radius: 20px;
  width: 42px;
  cursor: pointer;
  font-size: 16px;
  color: #08201a
}

.popover {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 62px;
  z-index: 30;
  background: linear-gradient(180deg, #0e3026, #0a241c);
  border: 1px solid rgba(255, 207, 82, .3);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  padding: 12px;
  max-height: 62%;
  overflow: auto;
  display: none
}

.popover.open {
  display: block
}

.popover h4 {
  margin: 0 6px 6px 0;
  font-family: 'Anton';
  font-weight: 400;
  letter-spacing: .5px;
  color: var(--tote);
  font-size: 13px;
  text-transform: uppercase;
  padding-right: 26px
}

.pop-x {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #0e2a1e;
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .12s
}

.pop-x:hover {
  border-color: var(--hot);
  color: var(--hot)
}

.pop-msg {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
  min-height: 14px
}

.pop-msg.bad {
  color: #ff7a7a
}

.pop-msg.good {
  color: #7cdf9a
}

.emo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px
}

.emo {
  background: #0e2a1e;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 20px;
  padding: 6px;
  cursor: pointer
}

.emo:hover {
  border-color: var(--tote)
}

.lab {
  font-size: 10px;
  letter-spacing: .6px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 10px 0 6px
}

.shop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--line)
}

.shop-row .ico {
  font-size: 22px
}

.shop-row .nm {
  flex: 1;
  font-size: 13px
}

.shop-owned {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .4px;
  text-transform: uppercase
}

.shop-row .pr {
  font-family: 'Space Mono';
  color: var(--tote);
  font-size: 12px
}

.gif-row .gthumb {
  width: 64px;
  height: 46px;
  object-fit: cover;
  border-radius: 7px
}

.buy {
  background: linear-gradient(180deg, #f5474d, #cf2d33);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer
}

.buy.owned {
  background: #0e2a1e;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: default
}

.name-row {
  display: flex;
  gap: 8px;
  margin: 6px 0
}

.name-row input {
  flex: 1;
  background: #0e2a1e;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--cream);
  padding: 9px 11px;
  font-size: 13px;
  outline: none;
  min-width: 0
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden
}

.confetti i {
  position: absolute;
  top: -14px;
  width: 9px;
  height: 14px;
  border-radius: 1px;
  animation: confFall linear forwards
}

@keyframes confFall {
  to {
    transform: translateY(106vh) rotate(760deg)
  }
}

.ch-handle {
  display: none
}

/* player profile popup */
.player-pop {
  position: fixed;
  z-index: 80;
  background: linear-gradient(180deg, #0e3026, #0a241c);
  border: 1px solid rgba(255, 207, 82, .3);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  padding: 14px;
  min-width: 200px;
  width: min(260px, calc(100vw - 16px));
  max-width: 260px;
  max-height: calc(100dvh - 16px);
  overflow: auto;
  overscroll-behavior: contain
}

.player-pop.hidden {
  display: none
}

.pp-name {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px
}

.pp-actions {
  display: flex;
  flex-direction: column;
  gap: 7px
}

.pp-btn {
  background: #0e2a1e;
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  font-family: 'Outfit'
}

.pp-btn:hover {
  border-color: var(--tote)
}

.pp-bar {
  margin-top: 10px;
  border-top: 1px dotted var(--line);
  padding-top: 8px;
  max-height: min(200px, 45dvh);
  overflow: auto
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #0e2a1e;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-family: 'Outfit';
  color: var(--cream);
  font-size: 13px;
  margin-bottom: 5px
}

.bar-item:hover {
  border-color: var(--tote)
}

.bi-name {
  flex: 1
}

.bi-price {
  font-family: 'Space Mono';
  color: var(--tote);
  font-size: 11px
}

/* toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #0e3026, #0a241c);
  border: 1px solid rgba(255, 207, 82, .4);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  z-index: 90;
  pointer-events: none
}

.toast.hidden {
  display: none
}


::-webkit-scrollbar {
  width: 8px;
  height: 8px
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 207, 82, .25);
  border-radius: 8px
}

@media (max-width:1024px) {
  .app {
    grid-template-columns: 1fr 320px
  }
}

@media (max-width:820px),
(orientation:landscape) and (max-height:560px) and (pointer:coarse) {
  body {
    overflow: hidden
  }

  .app {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 44px
  }

  .top-nav {
    flex: 0 0 auto;
    position: relative;
    gap: 9px;
    padding: 9px 13px
  }

  .tn-logo {
    font-size: 16px
  }

  .tn-sub {
    font-size: 9px;
    letter-spacing: 1.5px
  }

  .arena {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px 4px;
    gap: 8px
  }

  .race-head h2 {
    font-size: 14px
  }

  .bet-toggle {
    padding: 7px 12px;
    font-size: 12px;
    display: none
  }

  .phase {
    padding: 6px 11px;
    font-size: 12px
  }

  .arena.ph-bet .bet-toggle {
    display: inline-flex
  }

  .arena-body {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    gap: 8px
  }

  .stadium {
    flex: 1 1 0;
    min-height: 150px;
    max-height: 45dvh
  }

  .stands {
    height: 16px
  }

  .lights b {
    width: 30px;
    height: 7px
  }

  .post {
    width: 118px;
    padding: 0 9px
  }

  .gate {
    display: none
  }

  .post .nm {
    font-size: 11px
  }

  .post .od {
    font-size: 10.5px
  }

  .sprite {
    font-size: 23px
  }

  .commentary .cap {
    padding: 5px 12px;
    font-size: 11px
  }

  .feed {
    height: 80px
  }

  .callbig {
    height: 38px;
    padding: 0 13px;
    font-size: 13px
  }

  .livebet {
    min-height: 0;
    padding: 8px 12px;
    font-size: 12px
  }

  .chat {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 62dvh;
    z-index: 70;
    border-left: none;
    border-top: 1px solid rgba(255, 207, 82, .35);
    border-radius: 16px 16px 0 0;
    background: rgba(7, 24, 18, .88);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    transform: translateY(calc(100% - 44px));
    transition: transform .26s ease;
    box-shadow: 0 -14px 44px rgba(0, 0, 0, .6)
  }

  .chat.open {
    transform: translateY(0)
  }

  .ch-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 44px;
    flex: 0 0 44px;
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid var(--line);
    font-family: 'Anton';
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 13px;
    color: var(--tote);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none
  }

  .ch-handle .grip {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 4px;
    border-radius: 3px;
    background: rgba(255, 207, 82, .55)
  }

  .ch-handle .badge {
    min-width: 19px;
    height: 19px;
    border-radius: 10px;
    background: var(--hot);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: none;
    place-items: center;
    padding: 0 5px
  }

  .ch-close {
    display: grid
  }

  .popover {
    max-height: 70%
  }

  .paddock {
    z-index: 75
  }

  /* betbar: stacked layout for bigger tap targets */
  .betbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 12px
  }

  .stake {
    gap: 6px
  }

  .stake button {
    flex: 1;
    padding: 8px 4px;
    font-size: 11px
  }

  .placebet {
    width: 100%;
    margin-left: 0;
    padding: 11px;
    font-size: 13px
  }

  .myslip {
    margin-top: 0
  }
}

@media (max-width:380px) {
  .tn-logo {
    font-size: 16px
  }

  .post {
    width: 104px
  }

  .sprite {
    font-size: 21px
  }
}

/* narrow mobile: compact title + channel sub */
@media (max-width:540px) {
  .tn-logo {
    font-size: 13px
  }

  .tn-sub {
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--tote)
  }
}

/* mobile landscape = FOCUS MODE: race fills the screen, only race + bets + chat bar */
@media (orientation:landscape) and (max-height:560px) and (pointer:coarse) {
  .top-nav {
    display: none
  }

  .race-head {
    display: none
  }

  .arena {
    padding: 7px 11px;
    gap: 0
  }

  .arena-body {
    gap: 0;
    flex: 1 1 0
  }

  .stands {
    display: none
  }

  .stadium {
    min-height: 0;
    max-height: none;
    flex: 1 1 0
  }

  .commentary {
    display: none
  }

  .livebet {
    display: none
  }

  .post {
    width: 104px
  }

  .sprite {
    font-size: 20px
  }

  .chat {
    height: 88dvh
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr))
  }

  .chip-btn.focus-wallet {
    display: inline-flex
  }

  /* landscape: revert paddock to full-screen overlay */
  .paddock {
    flex-direction: row
  }

  .sheet {
    margin: auto;
    height: 100%;
    border-radius: 12px;
    transform: translateY(14px) scale(.99)
  }

  .betbar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 15px;
    gap: 8px
  }

  .stake button {
    flex: none;
    padding: 8px 12px;
    font-size: 12px
  }

  .placebet {
    width: auto;
    margin-left: auto;
    padding: 11px 24px;
    font-size: 14px
  }

  .myslip {
    margin-top: 3px
  }
}
