/* BitBet Arcade. Neon casino look; built phone-first, landscape-first. */
:root {
  color-scheme: dark;
  --bg: #070514;
  --ink: #f4f0ff;
  --muted: #a99fd0;
  --cyan: #35e5ff;
  --pink: #ff3fd0;
  --violet: #8a4dff;
  --gold: #ffc533;
  --gold-2: #ff9a1f;
  --glass: rgb(16 10 40 / 62%);
  --line: rgb(138 77 255 / 45%);
  --danger: #ff7a8a;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --display: "Arial Black", "Segoe UI Black", Impact, "Helvetica Neue", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.4 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html[data-screen="lobby"],
html[data-screen="lobby"] body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.ico {
  display: inline-grid;
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.ico svg {
  width: 100%;
  height: 100%;
}

.noscript {
  padding: 24px;
  text-align: center;
}

/* shown for the instant before the first answer from the server */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

.boot img {
  border-radius: 20px;
  animation: hop 0.8s ease-in-out infinite;
  box-shadow: 0 0 24px rgb(255 63 208 / 45%);
}

/* --- the wordmark -------------------------------------------------------------------------------- */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  position: relative;
  font-family: var(--display);
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  filter: drop-shadow(0 2px 0 #2a0a55) drop-shadow(0 0 10px rgb(255 90 220 / 45%));
  user-select: none;
}

.wordmark b {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgb(40 8 70 / 55%);
}

.wordmark .bit {
  background-image: linear-gradient(180deg, #ffe46b 0 46%, #ff9a1f 54% 100%);
}

.wordmark .bet {
  background-image: linear-gradient(180deg, #c9a8ff 0 46%, #8a4dff 54% 100%);
}

.wordmark small {
  position: absolute;
  left: 2px;
  top: 100%;
  margin-top: 2px;
  font: 800 0.3em/1 var(--body);
  letter-spacing: 0.62em;
  color: var(--cyan);
  text-shadow: 0 0 8px rgb(53 229 255 / 70%);
  white-space: nowrap;
}

/* --- sparkles -------------------------------------------------------------------------------------- */
.sparkles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.spark {
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: 0;
  background: radial-gradient(circle, #fff 0 12%, rgb(255 230 120 / 80%) 22%, transparent 62%);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 4px rgb(255 220 100 / 80%));
  animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.2) rotate(0deg);
  }
  50% {
    opacity: 0.95;
    transform: scale(var(--s, 1)) rotate(90deg);
  }
}

/* ===================================================================================================
   SIGN IN
   =================================================================================================== */
.login {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  isolation: isolate;
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #0b0724 url("/img/logo-landscape-tiny.webp") center / cover;
}

/* Landscape: the banner art, blurred to fill the screen, with the crisp banner on the left. */
.backdrop::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: url("/img/logo-landscape.webp") center / cover;
  filter: blur(26px) saturate(1.2) brightness(0.55);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgb(7 5 20 / 0%) 0, rgb(7 5 20 / 55%) 100%),
    repeating-linear-gradient(0deg, rgb(0 0 0 / 14%) 0 1px, transparent 1px 3px);
}

.login {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  align-items: center;
  gap: clamp(8px, 2vw, 32px);
  padding: max(10px, var(--safe-t)) max(14px, var(--safe-r)) max(10px, var(--safe-b)) max(14px, var(--safe-l));
}

.hero {
  display: block;
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-height: calc(100dvh - 20px);
}

.hero img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 20px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgb(53 229 255 / 35%),
    0 0 40px rgb(255 63 208 / 35%),
    0 30px 70px rgb(0 0 0 / 55%);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-5px);
  }
}

.login-dock {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
}

.login-card {
  width: min(380px, 100%);
  padding: 22px 22px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgb(34 18 80 / 82%), rgb(14 8 36 / 88%));
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgb(255 63 208 / 18%),
    0 0 36px rgb(138 77 255 / 30%),
    0 24px 60px rgb(0 0 0 / 55%),
    inset 0 1px 0 rgb(255 255 255 / 10%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.login-card h1 {
  margin: 0 0 22px;
  display: grid;
  justify-items: center;
}

.login-card .wordmark {
  font-size: 34px;
  margin-bottom: 14px;
}

.lead {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  border-radius: 14px;
  background: rgb(6 3 22 / 78%);
  border: 1px solid rgb(138 77 255 / 40%);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.field:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgb(53 229 255 / 22%);
}

.field > .ico {
  margin-left: 14px;
  color: var(--violet);
}

.field input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 16px; /* 16px stops iOS zooming into the field */
}

.field input::placeholder {
  color: #7d73a8;
}

.peek {
  width: 48px;
  height: 52px;
  border: 0;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.error {
  min-height: 1.3em;
  margin: 0 0 10px;
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}

.cta {
  position: relative;
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffe46b 0%, var(--gold) 45%, var(--gold-2) 100%);
  color: #2a1250;
  font: 900 18px/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    0 4px 0 #a85a06,
    0 8px 24px rgb(255 154 31 / 45%),
    inset 0 1px 0 rgb(255 255 255 / 70%);
  transition:
    transform 0.08s,
    box-shadow 0.08s,
    filter 0.15s;
  overflow: hidden;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 55%), transparent);
  transform: skewX(-20deg);
  animation: sweep 3.6s ease-in-out infinite;
}

@keyframes sweep {
  0%,
  55% {
    left: -60%;
  }
  100% {
    left: 130%;
  }
}

.cta:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #a85a06,
    0 4px 14px rgb(255 154 31 / 40%),
    inset 0 1px 0 rgb(255 255 255 / 70%);
}

.cta:disabled {
  filter: saturate(0.6) brightness(0.9);
  cursor: wait;
}

.cta.busy .ico {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fine {
  margin: 14px 0 0;
  text-align: center;
  color: #7d73a8;
  font-size: 13px;
}

.shake {
  animation: shake 0.35s;
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

/* Portrait: the tall art fills the screen and the form sits in the empty lower third. */
@media (orientation: portrait) {
  .login {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    gap: 0;
    padding: 0;
  }

  .backdrop {
    background: #0b0724 url("/img/logo-portrait.webp") 50% 0 / cover no-repeat;
  }

  .backdrop::before {
    display: none;
  }

  .backdrop::after {
    background:
      linear-gradient(0deg, rgb(7 5 20 / 92%) 0, rgb(7 5 20 / 55%) 26%, transparent 46%),
      repeating-linear-gradient(0deg, rgb(0 0 0 / 12%) 0 1px, transparent 1px 3px);
  }

  .hero {
    display: none;
  }

  .login-dock {
    grid-row: 2;
    padding: 0 max(18px, var(--safe-r)) max(22px, calc(var(--safe-b) + 14px)) max(18px, var(--safe-l));
  }

  .login-card {
    width: min(440px, 100%);
    padding: 16px 18px 14px;
    background: linear-gradient(180deg, rgb(34 18 80 / 70%), rgb(14 8 36 / 85%));
  }

  .login-card h1 {
    margin-bottom: 4px;
  }

  .error:empty {
    min-height: 0;
    margin: 0;
  }

  .login-card .wordmark {
    font-size: 0;
    margin: 0;
  }

  /* the logo art already says BitBet: the card just adds the word Arcade */
  .login-card .wordmark b {
    display: none;
  }

  .login-card .wordmark small {
    position: static;
    margin: 0;
    font-size: 15px;
    letter-spacing: 0.9em;
    padding-left: 0.9em;
  }
}

/* Short landscape phones: tighter card so nothing scrolls. */
@media (orientation: landscape) and (max-height: 520px) {
  .login-card {
    padding: 14px 16px 12px;
    border-radius: 18px;
  }

  .login-card h1 {
    margin-bottom: 18px;
  }

  .login-card .wordmark {
    font-size: 26px;
    margin-bottom: 10px;
  }

  .lead {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .field {
    margin-bottom: 8px;
  }

  .field input,
  .peek {
    height: 44px;
  }

  .cta {
    height: 46px;
    font-size: 16px;
  }

  .fine {
    margin-top: 8px;
    font-size: 12px;
  }

  .error {
    margin-bottom: 6px;
    min-height: 1.1em;
  }
}

/* Narrow landscape (or a small window): drop the side-by-side layout if there is no room. */
@media (orientation: landscape) and (max-width: 640px) {
  .login {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1.1fr);
  }
}

/* ===================================================================================================
   LOBBY
   =================================================================================================== */
.lobby {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
  background: var(--bg);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* the blurred art of whichever game is centred */
.ambient {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.amb {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(1.35) brightness(0.62);
  opacity: 0;
  transition: opacity 0.7s ease;
}

.amb.on {
  opacity: 1;
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0, rgb(138 77 255 / 25%), transparent 60%),
    linear-gradient(180deg, rgb(7 5 20 / 55%), rgb(7 5 20 / 10%) 35%, rgb(7 5 20 / 70%)),
    repeating-linear-gradient(0deg, rgb(0 0 0 / 12%) 0 1px, transparent 1px 3px);
}

/* top bar */
.top {
  position: relative;
  z-index: 5;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mascot {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow:
    0 0 0 2px rgb(255 197 51 / 80%),
    0 0 18px rgb(255 63 208 / 45%);
}

.brand .wordmark {
  font-size: 26px;
  margin-bottom: 9px;
}

.right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px 5px 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(40 22 90 / 85%), rgb(14 8 36 / 90%));
  border: 1px solid rgb(255 197 51 / 60%);
  box-shadow:
    0 0 18px rgb(255 197 51 / 20%),
    inset 0 1px 0 rgb(255 255 255 / 10%);
  transition:
    box-shadow 0.3s,
    border-color 0.3s;
}

.wallet .coin {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 50%));
}

.wallet .coin svg {
  width: 100%;
  height: 100%;
}

.amount {
  display: grid;
  line-height: 1.05;
}

.amount small {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.amount strong {
  font: 900 20px/1.1 var(--display);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: #fff4c4;
  text-shadow: 0 0 12px rgb(255 197 51 / 55%);
}

.wallet.up {
  border-color: #5dffa0;
  box-shadow: 0 0 28px rgb(93 255 160 / 55%);
}

.wallet.down {
  border-color: #ff9a7a;
}

.account {
  position: relative;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background: linear-gradient(160deg, #4a2aa0, #1a1040);
  color: #fff;
  font: 900 18px/1 var(--display);
  box-shadow: 0 0 14px rgb(53 229 255 / 40%);
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  padding: 8px;
  border-radius: 16px;
  background: rgb(18 10 46 / 96%);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgb(0 0 0 / 60%);
  animation: pop 0.14s ease-out;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}

.who {
  margin: 0;
  padding: 8px 10px 10px;
  display: grid;
  border-bottom: 1px solid rgb(138 77 255 / 30%);
}

.who small {
  color: var(--muted);
  font-size: 12px;
}

.who b {
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-weight: 600;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgb(138 77 255 / 25%);
}

/* filters */
.filters {
  position: relative;
  z-index: 4;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 16px 6px;
}

.hello {
  margin: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-size: 14px;
  white-space: nowrap;
  min-width: 0;
}

.hello small {
  color: var(--muted);
  font-size: 14px;
}

.hello b {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14ch;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgb(138 77 255 / 45%);
  background: rgb(16 10 40 / 70%);
  color: #cfc6f5;
  font-weight: 700;
  font-size: 14px;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.chip em {
  font-style: normal;
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
}

.chip.on {
  background: linear-gradient(180deg, #a76bff, #6a35d8);
  border-color: #d3b4ff;
  color: #fff;
  box-shadow: 0 0 18px rgb(138 77 255 / 55%);
}

/* the shelf */
.shelf {
  position: relative;
  z-index: 3;
  flex: 1 1 0;
  min-height: 0;
  container-type: size;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
}

.shelf::-webkit-scrollbar {
  display: none;
}

.shelf.drag {
  cursor: grabbing;
  scroll-snap-type: none;
}

.rail {
  --ch: min(calc(100cqh - 28px), 640px);
  /* portrait cards, like the pictures made for them (scripts/make-lobby-cards.mjs) */
  --cw: calc(var(--ch) * 0.75);
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 100%;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 0 calc(50cqw - var(--cw) / 2);
  list-style: none;
}

.slot {
  flex: none;
  width: var(--cw);
  scroll-snap-align: center;
  transform: scale(calc(1 - var(--d, 1) * 0.14));
  opacity: calc(1 - var(--d, 1) * 0.45);
  will-change: transform;
}

.empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
  width: 100%;
}

.card {
  position: relative;
  display: block;
  width: 100%;
  height: var(--ch);
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: #120a2e;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, #1a1040);
  box-shadow:
    0 14px 34px rgb(0 0 0 / 55%),
    inset 0 0 0 1px rgb(255 255 255 / 8%);
  transition:
    box-shadow 0.3s,
    border-color 0.3s;
  -webkit-user-drag: none;
}

.slot.on .card {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent),
    0 0 38px color-mix(in srgb, var(--accent) 60%, transparent),
    0 20px 44px rgb(0 0 0 / 60%);
}

.card .art {
  position: absolute;
  inset: 0;
}

.card .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.slot.on .card .art img {
  transform: scale(1.12);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, rgb(8 4 24 / 92%) 0, rgb(8 4 24 / 60%) 28%, rgb(8 4 24 / 0%) 52%),
    linear-gradient(180deg, rgb(8 4 24 / 30%), transparent 18%);
}

.shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgb(255 255 255 / 20%) 50%, transparent 62%);
  transform: translateX(-120%);
}

.slot.on .shine {
  animation: glint 5s ease-in-out 0.6s infinite;
}

@keyframes glint {
  0%,
  60% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.tag {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgb(8 4 24 / 72%);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.tag .ico {
  width: 1.1em;
  height: 1.1em;
}

.badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: -30px;
  width: 112px;
  padding: 3px 0;
  text-align: center;
  transform: rotate(40deg);
  background: linear-gradient(180deg, #ff5d8f, #d6184f);
  font: 900 11px/1.3 var(--display);
  letter-spacing: 0.14em;
  color: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 50%);
}

.info {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 16px;
  display: grid;
  gap: 6px;
}

.info h2 {
  margin: 0;
  font: 900 clamp(18px, 6cqh, 28px) / 1.05 var(--display);
  letter-spacing: -0.01em;
  text-shadow:
    0 2px 0 rgb(0 0 0 / 55%),
    0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
}

.info p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #d8d0f4;
  font-size: 13px;
  line-height: 1.35;
}

.play {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-top: 4px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe46b 0%, var(--gold) 50%, var(--gold-2) 100%);
  color: #2a1250;
  font: 900 15px/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 3px 0 #a85a06,
    0 6px 18px rgb(255 154 31 / 40%);
  transition: transform 0.1s;
}

.card:active .play {
  transform: translateY(2px);
}

.slot.on .play {
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow:
      0 3px 0 #a85a06,
      0 0 26px rgb(255 197 51 / 85%);
  }
}

/* bottom bar */
.bottom {
  position: relative;
  z-index: 4;
  flex: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 2px 16px 8px;
}

.arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgb(16 10 40 / 72%);
  transition: opacity 0.15s;
}

.arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.mid {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

.dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(169 159 208 / 50%);
  transition:
    width 0.25s,
    background 0.25s;
}

.dot.on::before {
  width: 26px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold), var(--pink));
  box-shadow: 0 0 10px rgb(255 63 208 / 60%);
}

.hint,
.rotate {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.rotate {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 600;
}

.h-mouse {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .h-touch {
    display: none;
  }

  .h-mouse {
    display: inline;
  }
}

/* the arrows are for mouse users: a thumb swipes */
@media (hover: none) {
  .arrow {
    display: none;
  }

  .bottom {
    grid-template-columns: 1fr;
  }
}

.notice {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: #7d73a8;
}

/* short landscape phones: every pixel of height goes to the cards */
@media (max-height: 460px) {
  .top {
    padding-top: 4px;
    padding-bottom: 2px;
  }

  .mascot {
    width: 34px;
    height: 34px;
  }

  .brand .wordmark {
    font-size: 22px;
  }

  .wallet .coin {
    width: 28px;
    height: 28px;
  }

  .amount strong {
    font-size: 17px;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

  .filters {
    padding-bottom: 2px;
  }

  .chip {
    min-height: 32px;
    font-size: 13px;
    padding: 0 11px;
  }

  .notice,
  .hint {
    display: none;
  }

  .bottom {
    padding-bottom: 2px;
  }

  .dot {
    height: 16px;
  }

  .rail {
    --ch: min(calc(100cqh - 14px), 640px);
    gap: 16px;
  }

  .info {
    padding: 10px 12px 12px;
  }

  .info p {
    display: none;
  }

  .play {
    height: 34px;
    font-size: 13px;
  }
}

@media (max-height: 460px) and (hover: hover) {
  .arrow {
    width: 36px;
    height: 36px;
  }
}

/* tall landscape screens (tablets, desktops): show the blurb */
@media (min-height: 560px) {
  .info {
    padding: 18px 20px 20px;
    gap: 8px;
  }

  .info p {
    font-size: 14px;
  }
}

/* portrait phones: portrait cards, and a nudge to turn the phone */
@media (orientation: portrait) {
  .rail {
    --cw: min(78cqw, 360px);
    gap: 18px;
  }

  .top {
    padding: 8px 12px 4px;
  }

  .mascot {
    width: 36px;
    height: 36px;
  }

  .brand {
    gap: 8px;
  }

  .right {
    gap: 8px;
  }

  .wallet {
    padding-right: 12px;
  }

  .card {
    height: auto;
    aspect-ratio: 3 / 4;
    max-height: calc(100cqh - 20px);
  }

  .slot {
    align-self: center;
  }

  .hello {
    display: none;
  }

  .filters {
    justify-content: center;
  }

  .brand .wordmark small {
    display: none;
  }

  .brand .wordmark {
    margin-bottom: 0;
    font-size: 20px;
  }

  .amount strong {
    font-size: 17px;
  }

  .rotate {
    display: flex;
  }

  .hint {
    display: none;
  }

  .info p {
    display: -webkit-box;
  }
}

/* --- the curtain while a game opens ---------------------------------------------------------------- */
.launching {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 35%, #0b0724), #070514 70%);
  animation: fade-in 0.25s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.launching .mascot {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  animation: hop 0.7s ease-in-out infinite;
}

@keyframes hop {
  50% {
    transform: translateY(-12px);
  }
}

.launching p {
  margin: 0;
  display: grid;
  justify-items: center;
}

.launching small {
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
}

.launching b {
  font: 900 24px/1.2 var(--display);
}

.load-track {
  width: min(240px, 60vw);
  height: 8px;
  border-radius: 99px;
  background: rgb(255 255 255 / 12%);
  overflow: hidden;
}

.load-bar {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--pink));
  animation: load 1s ease-in-out infinite;
}

@keyframes load {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(260%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Miniature cabinets: separate artwork and captions so the full machine stays visible. */
.card{display:grid;grid-template-rows:minmax(0,1fr) auto;background:radial-gradient(ellipse at 50% 68%,color-mix(in srgb,var(--accent) 12%,transparent),transparent 62%);border-color:transparent;box-shadow:none}
.slot.on .card{border-color:transparent;box-shadow:none}
.card .art{position:relative;inset:auto;min-height:0;margin:24px 6px 0}
.card .art img{object-fit:contain;transform:none;filter:drop-shadow(0 12px 10px #0008);transition:filter .3s ease}
.slot.on .card .art img{transform:none;filter:drop-shadow(0 0 14px color-mix(in srgb,var(--accent) 32%,transparent)) drop-shadow(0 12px 10px #0008)}
.card::before,.card .shine{display:none}
.card .info{position:relative;inset:auto;text-align:center;justify-items:center;padding-top:8px;gap:5px}
.card .info p{-webkit-line-clamp:2}
.card .play{justify-self:center}
.card:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.card .badge{right:6px;top:8px;width:auto;padding:4px 10px;border-radius:8px;transform:none}
.card .tag{top:8px}
@media(orientation:portrait){.card{height:min(640px,calc(100cqh - 20px));aspect-ratio:auto}.card .info p{display:none}.card .info{padding:6px 12px 12px}.card .art{margin-top:30px}}
@media(max-height:460px){.card .info h2{font-size:16px}.card .info{gap:2px;padding:4px 8px 6px}.card .play{height:28px;margin-top:2px}.card .art{margin-top:24px}}
