/* The purr games' leaderboard layer (arcade.js): today's board and the "Playing as …" line, in the games' own HUD
   style (see-through purple, cream text and border), and the sign-up / board / end-of-run cards (cream paper,
   brown ink, a pink accent), all in Fredoka. */
.arc-board, .arc-board-btn, .arc-chip, .arc-modal {
  --arc-paper: #fff6ee; --arc-ink: #4a2318; --arc-soft: #7a4a3c; --arc-pink: #ff5ea0; --arc-gold: #f2b43a;
  font-family: 'Fredoka', system-ui, sans-serif; color: var(--arc-ink);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.arc-board, .arc-board-btn, .arc-chip { display: none; }

/* ---------- today's board: top right corner, in the games' own HUD style ----------
   (the see-through purple pills with a cream border the slots, mute button and score use). Each game moves its
   sound button to the board's left on screens wide enough to show it. A game can move the board down with
   --arc-board-top (Snowboarding has its speed readout in the corner). */
.arc-board {
  position: fixed; z-index: 30; top: var(--arc-board-top, calc(12px + env(safe-area-inset-top, 0px)));
  right: calc(12px + env(safe-area-inset-right, 0px));
  width: 230px; max-height: calc(100vh - var(--arc-board-top, 12px) - 16px); overflow: auto; padding: 10px 10px 8px;
  color: #fff6ee; background: rgba(54, 36, 84, 0.38); border: 1.5px solid rgba(255, 246, 238, 0.55); border-radius: 16px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); filter: drop-shadow(0 1px 3px rgba(58, 24, 70, 0.4));
}
html.lite .arc-board, html.lite .arc-board-btn, html.lite .arc-chip {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(54, 36, 84, 0.62);
}
@media (min-width: 900px) and (min-height: 520px) {
  .arc-board.on { display: block; }
}
@media (max-width: 899.98px), (max-height: 519.98px) {
  .arc-board-btn.on { display: block; }
}
.arc-board h2 {
  margin: 0 4px 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #ffe08a;
  text-shadow: 0 1px 3px rgba(58, 24, 70, 0.6);
}
.arc-card h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--arc-ink); }
.arc-board ol, .arc-card ol { list-style: none; margin: 0; padding: 0; }
.arc-board li, .arc-card ol li {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center;
  padding: 4px 6px; border-radius: 10px; font-size: 15px; font-weight: 500;
}
.arc-board li { text-shadow: 0 1px 2px rgba(58, 24, 70, 0.5); }
.arc-board li + li, .arc-card ol li + li { margin-top: 1px; }
.arc-rank { font-weight: 600; text-align: center; color: var(--arc-soft); }
.arc-board .arc-rank { color: rgba(255, 246, 238, 0.75); }
.arc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-score { font-weight: 600; font-variant-numeric: tabular-nums; }
li.prize .arc-rank {
  color: #5a2a1a; background: #ffd36b; border-radius: 50%; width: 22px; height: 22px; line-height: 22px; font-size: 12px;
  text-shadow: none; justify-self: center;
}
.arc-card li.you { background: rgba(255, 94, 160, 0.16); }
.arc-board li.you { background: rgba(255, 94, 160, 0.35); }
li.you .arc-name::after { content: ' (you)'; color: var(--arc-pink); font-weight: 600; }
.arc-board li.you .arc-name::after { color: #ffd0e4; }
/* Specific enough to beat the row grid in both the panel and the card (otherwise the message wraps in the rank column) */
.arc-board li.arc-empty, .arc-card ol li.arc-empty { display: block; text-align: center; color: var(--arc-soft); padding: 10px 4px; }
.arc-board li.arc-empty { color: rgba(255, 246, 238, 0.85); }
.arc-foot { margin: 8px 4px 0; font-size: 12px; line-height: 1.35; color: var(--arc-soft); }
.arc-board .arc-foot { color: rgba(255, 246, 238, 0.8); text-shadow: 0 1px 2px rgba(58, 24, 70, 0.5); }

/* The same board as a pop-up on narrow screens (the 🏆 button): the panel's look, a bit more solid over the dimmed game */
.arc-card.arc-board-card {
  width: min(340px, 100%); padding: 14px 12px 12px; text-align: left; color: #fff6ee;
  background: rgba(54, 36, 84, 0.72); border: 1.5px solid rgba(255, 246, 238, 0.55); border-radius: 18px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(40, 18, 56, 0.4);
}
.arc-board-card h2 {
  margin: 0 4px 8px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #ffe08a;
  text-shadow: 0 1px 3px rgba(58, 24, 70, 0.6);
}
.arc-board-card ol li { text-shadow: 0 1px 2px rgba(58, 24, 70, 0.5); }
.arc-board-card .arc-rank { color: rgba(255, 246, 238, 0.75); }
.arc-board-card li.you { background: rgba(255, 94, 160, 0.35); }
.arc-board-card li.you .arc-name::after { color: #ffd0e4; }
.arc-card.arc-board-card ol li.arc-empty { color: rgba(255, 246, 238, 0.85); }
.arc-board-card .arc-foot { color: rgba(255, 246, 238, 0.8); text-shadow: 0 1px 2px rgba(58, 24, 70, 0.5); }
.arc-board-card .arc-btn {
  background: rgba(255, 246, 238, 0.14); color: #fff6ee; border: 1.5px solid rgba(255, 246, 238, 0.55); box-shadow: none;
}
.arc-board-card .arc-btn:active { transform: none; background: rgba(255, 246, 238, 0.25); }
html.lite .arc-board-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(54, 36, 84, 0.9); }

/* ---------- narrow screens: a button that opens the board ---------- */
.arc-board-btn {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  border: 1.5px solid rgba(255, 246, 238, 0.55); border-radius: 999px; padding: 8px 16px; cursor: pointer;
  font: 600 15px 'Fredoka', system-ui, sans-serif; color: #fff6ee; background: rgba(54, 36, 84, 0.38);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); filter: drop-shadow(0 1px 3px rgba(58, 24, 70, 0.4));
}

/* ---------- "Playing as Jess · not you?" ---------- */
.arc-chip {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  top: calc(14px + env(safe-area-inset-top, 0px));
  padding: 6px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; color: #fff6ee;
  background: rgba(54, 36, 84, 0.38); border: 1.5px solid rgba(255, 246, 238, 0.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); filter: drop-shadow(0 1px 3px rgba(58, 24, 70, 0.4));
}
.arc-chip.on:not([hidden]) { display: block; }
.arc-chip b { font-weight: 600; }
.arc-chip button { border: 0; background: none; padding: 0; font: inherit; color: #ffd0e4; text-decoration: underline; cursor: pointer; }
.arc-link {
  border: 0; background: none; padding: 0; font: inherit; color: var(--arc-pink); text-decoration: underline; cursor: pointer;
}

/* ---------- cards: sign-up, board, end of run ---------- */
.arc-modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(40, 18, 56, 0.45); overflow: auto; cursor: auto;
}
.arc-modal[hidden] { display: none; }
.arc-card {
  width: min(420px, 100%); padding: 22px 22px 18px; border-radius: 22px; background: var(--arc-paper);
  box-shadow: 0 16px 48px rgba(40, 18, 56, 0.4); text-align: center; animation: arc-in 0.22s ease-out;
}
@keyframes arc-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.arc-kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--arc-pink); }
.arc-big { font-size: clamp(40px, 12vw, 60px); font-weight: 600; line-height: 1.1; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.arc-sub { margin: 0 0 14px; font-size: 15px; line-height: 1.4; color: var(--arc-soft); }
.arc-sub b { color: var(--arc-pink); }
.arc-mini { text-align: left; margin-bottom: 4px !important; }
.arc-board-card ol, .arc-result ol { text-align: left; }

.arc-signup form { text-align: left; display: grid; gap: 10px; }
.arc-signup [hidden] { display: none; }
.arc-signup label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.arc-signup small { font-size: 12.5px; font-weight: 500; color: var(--arc-soft); }
.arc-signup input:not([type=checkbox]) {
  -webkit-user-select: text; user-select: text;
  font: 500 17px 'Fredoka', system-ui, sans-serif; color: var(--arc-ink); padding: 10px 12px;
  border: 1.5px solid rgba(74, 35, 24, 0.25); border-radius: 12px; background: #fff; width: 100%; box-sizing: border-box;
}
.arc-signup input:focus { outline: none; border-color: var(--arc-pink); box-shadow: 0 0 0 3px rgba(255, 94, 160, 0.2); }
.arc-signup .arc-opt { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.arc-signup .arc-opt input { width: 20px; height: 20px; accent-color: var(--arc-pink); }
.arc-msg { margin: 0; min-height: 1.2em; font-size: 14px; color: #c22d5f; }
.arc-msg:empty { min-height: 0; }
.arc-fine { margin: 2px 0 0; font-size: 12px; color: var(--arc-soft); text-align: center; }

.arc-actions { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.arc-btn {
  flex: 1; max-width: 200px; border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer;
  font: 600 16px 'Fredoka', system-ui, sans-serif; background: var(--arc-pink); color: #fff;
  box-shadow: 0 4px 0 #c43c78; touch-action: manipulation;
}
.arc-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #c43c78; }
.arc-btn:disabled { opacity: 0.6; }
.arc-btn.ghost { background: #fff; color: var(--arc-ink); box-shadow: 0 4px 0 rgba(74, 35, 24, 0.25); }
/* Kiosk end card: a big "Next player" on top, "Play again as …" under it */
.arc-actions.arc-stack { flex-direction: column; align-items: stretch; gap: 12px; }
.arc-stack .arc-btn { max-width: none; }
.arc-stack [data-new] { font-size: 20px; padding: 16px 18px; }
.arc-link { display: inline-block; margin-top: 12px; font-size: 14px; }

/* The vendor-day TV and other weak graphics chips (html.weak, set by gpu.js): no see-through blur or soft shadows.
   Over a moving game the browser redoes them every frame, which on the TV cost more than the game itself. */
html.weak .arc-board, html.weak .arc-board-btn, html.weak .arc-chip {
  -webkit-backdrop-filter: none; backdrop-filter: none; filter: none; background: rgba(54, 36, 84, 0.72);
}
html.weak .arc-board-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(54, 36, 84, 0.9); box-shadow: none; }
html.weak .arc-card { box-shadow: none; animation: none; }
