/* the stage (stage.html): an empty page with one dancing figure in it */
:root {
  --bg: #fff; --ink: #111; --ink2: #8a8a8e; --ink3: #c7c7cc; --line: rgba(0, 0, 0, .1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #000; --ink: #f2f2f2; --ink2: #8d8d93; --ink3: #3a3a3c; --line: rgba(255, 255, 255, .16); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #000; --ink: #f2f2f2; --ink2: #8d8d93; --ink3: #3a3a3c; --line: rgba(255, 255, 255, .16); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.35 Inter, -apple-system, system-ui, sans-serif;
  overflow: hidden; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.top {
  position: fixed; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 18px 0;
  font-size: 13px; color: var(--ink2);
}
.mark { font-weight: 600; letter-spacing: .01em; }
.help { width: 32px; height: 32px; margin: -6px -8px 0 0; border-radius: 50%; font-weight: 500; }
.help:hover { color: var(--ink); }

.stage {
  position: fixed; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  touch-action: none; cursor: pointer;
}
.slide { display: flex; flex-direction: column; align-items: center; transition: transform .38s cubic-bezier(.3, .8, .3, 1), opacity .3s; }
.slide.out-l { transform: translateX(-38vw); opacity: 0; }
.slide.out-r { transform: translateX(38vw); opacity: 0; }
.slide.snap { transition: none; }

.dancer-box { position: relative; width: min(112vw, 64dvh, 640px); height: min(112vw, 64dvh, 640px); }
.dancer-cv { position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; pointer-events: none; }
.locked .dancer-cv { opacity: .14; filter: grayscale(1); } /* not out yet: faint and grey, just breathing */

.meta { margin-top: 6px; text-align: center; padding: 0 24px; min-height: 44px; }
.name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.sub { margin-top: 3px; font-size: 12.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.sub .loved { color: #ff375f; }

/* progress: a thin line along the bottom edge, with a taller invisible touch area to scrub */
.seek {
  position: fixed; z-index: 2; left: 0; right: 0; bottom: 0;
  height: calc(28px + env(safe-area-inset-bottom)); touch-action: none; cursor: pointer;
}
.seek::before { content: ""; position: absolute; left: 0; right: 0; bottom: env(safe-area-inset-bottom); height: 2px; background: var(--line); transition: height .15s; }
.seek i { position: absolute; left: 0; bottom: env(safe-area-inset-bottom); height: 2px; width: 0; background: var(--ink); transition: height .15s; }
.seek.drag::before, .seek.drag i, .seek:hover::before, .seek:hover i { height: 4px; }
.seek:focus-visible { outline: none; }
.seek:focus-visible::before { height: 4px; }

.readme { position: fixed; inset: 0; z-index: 5; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; }
.readme-body { max-width: 420px; width: 100%; }
.readme pre { font: inherit; white-space: pre-wrap; margin: 0 0 22px; }
.readme-links a { color: var(--ink2); font-size: 13px; text-decoration: none; }
.readme-links a:hover { color: var(--ink); }
.readme-close { margin-top: 28px; font-size: 13px; color: var(--ink2); }

.toast {
  position: fixed; z-index: 6; left: 50%; bottom: calc(44px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; white-space: nowrap;
}
