/* Roll Up: a skee-ball lane on the boardwalk at night. The canvas is the whole page; everything else floats over it. */

/* The fonts, the prize counter and the ticket dispenser come from ../shared/arcade.css. */

:root {
  --ink: #fbeed2;
  --ink2: rgba(251, 238, 210, .74);
  --ink3: rgba(251, 238, 210, .5);
  --bg: #100c22;
  --card: rgba(22, 15, 42, .9);
  --line: rgba(251, 238, 210, .16);
  --red: #c23a2e;
  --gold: #f2c14e;
  --teal: #5ee6d8;
  --disp: "Bungee", Impact, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#stage { position: fixed; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
svg { width: 1.3em; height: .9em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the scoreboard ---------- */
.hud {
  position: fixed; left: 0; right: 0; top: 0; z-index: 2; pointer-events: none;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 0;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.hud .score { line-height: 1; }
.hud .score small { display: block; font: 600 11px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); margin: 0 0 4px 2px; }
.hud .score b {
  display: inline-block; min-width: 3.2ch; font: 400 34px/1 var(--disp); color: #ffd36a; letter-spacing: .02em;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 170, 60, .55), 0 2px 0 rgba(0, 0, 0, .4);
}
.hud .right { display: flex; gap: 8px; align-items: center; pointer-events: auto; }
.hud button {
  height: 40px; border-radius: 999px; border: 1px solid var(--line); background: rgba(16, 12, 34, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hud .tix { display: flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; font: 400 15px var(--disp); }
.hud .menu { width: 40px; display: grid; place-content: center; gap: 4px; padding: 0; }
.hud .menu span { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--ink); }

/* things to know about the ball in hand, floating over the lane */
.notes {
  position: fixed; left: 16px; right: 16px; bottom: calc(22vh + env(safe-area-inset-bottom, 0px)); z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.notes p {
  margin: 0; width: max-content; max-width: 100%; padding: 8px 14px; border-radius: 999px; background: rgba(16, 12, 34, .74);
  text-align: center; font: 600 13px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.hint { animation: breathe 2.4s ease-in-out infinite; }
.note span { font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--ink2); margin-left: 4px; }
.note.call { box-shadow: inset 0 0 0 1.5px var(--teal); }
.note.call b { font: 400 15px/1 var(--disp); color: var(--teal); margin-left: 2px; }
.note.gold { box-shadow: inset 0 0 0 1.5px var(--gold); color: #ffd36a; }
@keyframes breathe { 50% { opacity: .55; } }
.upright { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .upright {
    display: block; position: fixed; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); margin: 0; z-index: 1;
    max-width: 30vw; font-size: 13px; line-height: 1.3; color: var(--ink2); text-align: right; pointer-events: none;
  }
}

/* ---------- cards: title, game over, menu ---------- */
.card {
  position: fixed; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(380px, calc(100vw - 28px)); max-height: calc(100dvh - 24px); overflow: auto;
  padding: 22px 22px 16px; text-align: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card h2 { margin: 2px 0 10px; font: 400 24px/1.15 var(--disp); color: var(--ink); }
.marquee {
  margin: 0 auto 14px; padding: 12px 10px 10px; border-radius: 14px; background: linear-gradient(#8e1c22, #55101a);
  border: 2px solid var(--gold); position: relative;
  box-shadow: 0 0 0 4px rgba(242, 193, 78, .14), 0 10px 30px rgba(194, 58, 46, .35);
}
.marquee::before, .marquee::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 6px;
  background: radial-gradient(circle, #ffe3a1 0 2px, rgba(255, 210, 120, .35) 2.6px, transparent 3.4px) 0 0 / 14px 6px repeat-x;
  animation: chase 0.9s steps(2) infinite;
}
.marquee::before { top: 4px; }
.marquee::after { bottom: 4px; animation-delay: .45s; }
@keyframes chase { 50% { background-position: 7px 0; } }
.marquee h1 { margin: 6px 0 4px; font: 400 44px/1 var(--disp); color: var(--ink); letter-spacing: .02em; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.lede { margin: 0 0 8px; font-weight: 600; }
.how { margin: 0 0 14px; font-size: 14px; color: var(--ink2); }
.best { margin: 12px 0 0; font-size: 13px; color: var(--ink3); min-height: 1em; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.col { display: grid; gap: 8px; margin-bottom: 14px; }
.big, .plain {
  min-height: 48px; padding: 0 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.big { font: 400 18px var(--disp); background: linear-gradient(#e2513f, var(--red)); border: 1px solid #f07a62; color: #fff6e6; box-shadow: 0 4px 0 #7a1c16; }
.big:active { transform: translateY(2px); box-shadow: 0 2px 0 #7a1c16; }
.big.alt { background: linear-gradient(#2fa79c, #1d7d75); border-color: #6ee0d4; box-shadow: 0 4px 0 #0f4a45; }
.big.alt:active { box-shadow: 0 2px 0 #0f4a45; }
.big.alt.done { background: rgba(94, 230, 216, .1); border-color: rgba(94, 230, 216, .45); color: var(--teal); box-shadow: none; font-size: 15px; }
.daily-how { margin: 10px 0 12px; font-size: 13px; color: var(--ink2); }
.plain { font-weight: 600; background: rgba(251, 238, 210, .07); border: 1px solid var(--line); }
.plain:active { background: rgba(251, 238, 210, .14); }
.tally { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 0 0 12px; }
.tally span {
  min-width: 34px; padding: 4px 6px 3px; border-radius: 999px; font: 400 12px/1 var(--disp);
  background: rgba(251, 238, 210, .08); border: 1px solid var(--line); color: var(--ink2);
}
.tally .hi { background: rgba(242, 193, 78, .18); border-color: rgba(242, 193, 78, .5); color: #ffd36a; }
.tally .golden { background: linear-gradient(#f7d877, #c9921f); border-color: #ffe7a0; color: #3a2405; }
.tally .called { box-shadow: 0 0 0 1.5px var(--teal); }
.tally .called::after { content: " ★"; color: var(--teal); }
.tally .golden.called::after { color: #0f4a45; }
.stars { margin: -4px 0 12px; font-size: 14px; color: var(--ink2); }
.stars b { color: var(--teal); font: 400 18px var(--disp); letter-spacing: .08em; margin-right: 6px; }
.back { margin: 14px 0 0; font-size: 14px; }
.back a, .floor { color: var(--ink2); text-decoration: none; }
.back a:hover, .floor:hover, .back a:focus-visible, .floor:focus-visible { color: var(--ink); text-decoration: underline; }
.floor { display: block; width: max-content; margin: -6px 0 10px -2px; padding: 4px 2px; font: 600 14px var(--body); }
a.plain { color: inherit; text-decoration: none; }

.jd-foot { margin-top: 16px; font-size: 12px; color: var(--ink3); }
.jd-foot a { color: var(--ink3); text-decoration: none; }
.jd-foot a:hover, .jd-foot a:focus-visible { text-decoration: underline; color: var(--ink2); }
.jd-foot span { margin: 0 6px; }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .hint, .marquee::before, .marquee::after { animation: none; }
}
