/* Remix Tiles — styles */
:root {
  /* RIFFVOLT palette */
  --bg: #04050d;
  --bg2: #0a0f2c;
  --panel: rgba(14, 16, 40, 0.72);
  --panel-solid: #0f1230;
  --line: rgba(255, 255, 255, 0.14);
  --line2: rgba(255, 255, 255, 0.26);
  --text: #eef2ff;
  --muted: rgba(226, 232, 255, 0.66);
  --a1: #2bd9ff;
  --a2: #b14dff;
  --a3: #ff2e93;
  --gold: #ffb627;
  --ok: #7cff4f;
  --bad: #ff3d6e;
  --grad: linear-gradient(90deg, #ff2e93, #b14dff 60%, #7a5cff);
  --r: 14px;
  --dim: 0.72;
  --font: 'Chakra Petch', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Teko', 'Chakra Petch', Impact, sans-serif;
  --glass-fill: linear-gradient(155deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05) 38%, rgba(255, 255, 255, 0.025) 72%, rgba(255, 255, 255, 0.06));
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 30px 70px -28px rgba(0, 0, 0, 0.8);
  --ease-pop: cubic-bezier(.2, 1.5, .4, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.in-game {
  overflow: hidden; overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--a1); }
img { display: block; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd {
  display: inline-block; min-width: 1.7em; padding: 1px 6px; margin: 0 2px;
  border-radius: 6px; border: 1px solid var(--line2); border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.05); font: 600 12px var(--font); text-align: center;
}
:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; }

/* ---------- background ---------- */
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#bg .bg-glow {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 15% 10%, rgba(94, 240, 255, 0.14), transparent 70%),
    radial-gradient(45% 40% at 85% 20%, rgba(139, 92, 255, 0.16), transparent 70%),
    radial-gradient(50% 45% at 60% 100%, rgba(255, 94, 168, 0.12), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
}
#bg .bg-art {
  position: absolute; inset: 0; background: url("../assets/stages/synth.webp") center / cover no-repeat;
  opacity: 0.32; filter: saturate(1.1);
}
#bg .bg-cover {
  position: absolute; inset: -40px;
  background-size: cover; background-position: center;
  filter: blur(36px) saturate(1.3);
  opacity: 0; transition: opacity 0.8s;
}
#bg .bg-cover.on { opacity: calc(1 - var(--dim)); }
body:not(.in-game) #bg .bg-cover.on { opacity: 0.18; }
@keyframes drift { to { transform: translate3d(3%, -2%, 0) rotate(3deg); } }

/* ---------- screens ---------- */
.screen { position: relative; z-index: 1; display: none; }
.screen.active { display: block; }
#game.active { position: fixed; inset: 0; display: block; }
#gameCanvas { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.pause-btn {
  position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line2);
  backdrop-filter: blur(8px); color: #fff;
}
.pause-btn:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 14px max(20px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(7, 8, 15, 0.92), rgba(7, 8, 15, 0.7));
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand-mark { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.brand-mark i { width: 6px; border-radius: 2px; background: var(--grad); background-size: 400% 100%; animation: bars 2.4s ease-in-out infinite; }
.brand-mark i:nth-child(1) { height: 55%; animation-delay: 0s; background-position: 0 0; }
.brand-mark i:nth-child(2) { height: 100%; animation-delay: -0.6s; background-position: 33% 0; }
.brand-mark i:nth-child(3) { height: 40%; animation-delay: -1.2s; background-position: 66% 0; }
.brand-mark i:nth-child(4) { height: 75%; animation-delay: -1.8s; background-position: 100% 0; }
@keyframes bars { 50% { transform: scaleY(0.6); } }
.brand-mark i { transform-origin: bottom; }
.brand-word { font-weight: 900; letter-spacing: 0.18em; font-size: 18px; }

.search {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s;
}
.search:focus-within { border-color: rgba(94, 240, 255, 0.5); background: rgba(255, 255, 255, 0.08); }
.search .ic { color: var(--muted); width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--text);
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn.on { color: var(--a3); }
.icon-btn.on .ic { fill: currentColor; }

.profile-chip {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 5px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
}
.profile-chip:hover { background: rgba(255, 255, 255, 0.1); }
.lvl-badge {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 900; font-size: 14px; color: #0a0b14; background: var(--grad);
}
.lvl-badge.xl { width: 64px; height: 64px; border-radius: 18px; font-size: 28px; }
.chip-text { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.chip-title { font-size: 12px; font-weight: 700; line-height: 1; }
.xpbar { width: 70px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width 0.6s; }
.xpbar.big { width: 100%; height: 9px; border-radius: 5px; }
.streak { display: flex; align-items: center; gap: 3px; font-weight: 800; color: var(--muted); font-size: 14px; }
.streak .ic { width: 17px; height: 17px; }
.streak.hot { color: #ff9a4a; }
.streak.hot .ic { fill: rgba(255, 154, 74, 0.35); }

/* ---------- menu ---------- */
.menu-main { max-width: 1320px; margin: 0 auto; padding: 22px max(20px, env(safe-area-inset-left)) 40px; }
.hero { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.hero-card {
  position: relative; overflow: hidden; min-height: 168px; border-radius: 20px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); display: flex;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.hero-card:hover { transform: translateY(-3px); border-color: var(--line2); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7); }
.hero-card.busy { opacity: 0.6; pointer-events: none; }
.hero-body { position: relative; z-index: 1; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.hero-card h2 { margin: 2px 0 0; font-size: 22px; line-height: 1.15; font-weight: 800; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hero-card p { margin: 0; color: var(--muted); font-size: 14px; }
.hero-foot { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a1); }
.eyebrow .ic { width: 15px; height: 15px; }
.eyebrow .reset { color: var(--muted); letter-spacing: 0; text-transform: none; font-weight: 500; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); color: var(--text); }
.pill.gold { color: #1a1300; background: var(--gold); border-color: transparent; }
.pill.gold.done { background: rgba(255, 211, 107, 0.2); color: var(--gold); text-decoration: line-through; }
.pill.tiny { padding: 1px 7px; font-size: 10px; }
.pill .ok, b.ok { color: var(--ok); }

.daily .hero-art {
  position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.55;
  mask-image: linear-gradient(90deg, transparent 15%, #000 75%); -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 75%);
}
.daily { background: linear-gradient(120deg, rgba(255, 211, 107, 0.12), rgba(18, 20, 38, 0.9) 50%); }
.daily .eyebrow { color: var(--gold); }
.daily.done .hero-art { filter: grayscale(0.6); }
.warmup { background: linear-gradient(140deg, rgba(94, 240, 255, 0.12), rgba(18, 20, 38, 0.9) 60%); }
.quick { background: linear-gradient(140deg, rgba(255, 94, 168, 0.13), rgba(18, 20, 38, 0.9) 60%); }
.quick .eyebrow { color: var(--a3); }
.mini-tiles { position: absolute; right: 14px; top: 0; bottom: 0; width: 76px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; opacity: 0.55; overflow: hidden; }
.mini-tiles i { display: block; height: 30px; border-radius: 4px; background: linear-gradient(var(--a1), var(--a2)); animation: fall 2.2s linear infinite; }
.mini-tiles i:nth-child(1) { grid-column: 1; animation-delay: 0s; }
.mini-tiles i:nth-child(2) { grid-column: 3; animation-delay: -0.55s; }
.mini-tiles i:nth-child(3) { grid-column: 2; animation-delay: -1.1s; }
.mini-tiles i:nth-child(4) { grid-column: 4; animation-delay: -1.65s; }
.mini-tiles i:nth-child(5) { grid-column: 1; animation-delay: -0.9s; height: 60px; }
.mini-tiles i:nth-child(6) { grid-column: 4; animation-delay: -0.3s; }
.mini-tiles i { grid-row: 1; align-self: start; }
@keyframes fall { from { transform: translateY(-70px); } to { transform: translateY(200px); } }

.browse-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color 0.15s, background 0.15s; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: #0a0b14; background: var(--text); }
.filters { display: flex; gap: 8px; }
.select { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.select select, .set-pane select {
  background: transparent; border: 0; outline: none; font-weight: 600; color: var(--text); cursor: pointer; padding-right: 2px;
}
.select select option, .set-pane select option { background: var(--panel-solid); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 18px; }
.card {
  position: relative; border-radius: var(--r); overflow: hidden; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  animation: cardIn 0.35s both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: var(--line2); box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.8); }
.card .cover { position: relative; aspect-ratio: 1; background: linear-gradient(135deg, #1a1d36, #0d0f1c); overflow: hidden; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .cover img { transform: scale(1.06); }
.card .dur { position: absolute; left: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); }
.card .fav { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px); color: #fff; opacity: 0; transition: opacity 0.15s, transform 0.15s; }
.card .fav .ic { width: 18px; height: 18px; }
.card:hover .fav, .card .fav.on, .card:focus-within .fav { opacity: 1; }
.card .fav.on { color: var(--a3); }
.card .fav.on .ic { fill: currentColor; }
.card .fav:active { transform: scale(0.88); }
.card .play-hover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7, 8, 15, 0.35); opacity: 0; transition: opacity 0.18s; pointer-events: none; }
.card .play-hover .ic { width: 46px; height: 46px; padding: 12px; border-radius: 50%; background: #fff; color: #0a0b14; box-sizing: content-box; width: 22px; height: 22px; }
.card:hover .play-hover { opacity: 1; }
.grade-badge { position: absolute; left: 8px; top: 8px; min-width: 30px; padding: 2px 7px; border-radius: 8px; font-weight: 900; font-size: 13px; text-align: center; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); }
.card .meta { padding: 11px 13px 13px; }
.card h3 { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .artist { margin: 1px 0 8px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-row { display: flex; align-items: center; justify-content: space-between; }
.dots { display: flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.dots i.on { background: var(--c); box-shadow: 0 0 8px -1px var(--c); }
.rate { font-size: 12px; font-weight: 700; color: var(--ok); }
.card .mapper { margin: 6px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .mapper .cur { color: var(--gold); }
.card.skeleton { aspect-ratio: 0.72; cursor: default; background: linear-gradient(100deg, rgba(255, 255, 255, 0.03) 30%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.03) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite; }
.card.skeleton:hover { transform: none; box-shadow: none; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.grid-status { padding: 26px 0 0; display: grid; place-items: center; }
.grid-status .end { margin: 0; font-size: 13px; }
.sentinel { height: 1px; }
.empty { display: grid; place-items: center; gap: 10px; text-align: center; padding: 40px 0; color: var(--muted); }
.empty .ic { width: 38px; height: 38px; opacity: 0.6; }
.empty p { margin: 0; max-width: 360px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: var(--a1); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.foot { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 24px 20px 40px; text-align: center; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- grades ---------- */
.g-sp { color: #ffe27a; text-shadow: 0 0 18px rgba(255, 226, 122, 0.6); }
.g-s { color: #7cf7ff; }
.g-a { color: #a6ff8f; }
.g-b { color: #7ab8ff; }
.g-c { color: #ffb36b; }
.g-d { color: #ff8a9a; }
.g-f { color: var(--bad); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; font-weight: 700; font-size: 15px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line2); color: var(--text);
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.13); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn.primary { background: var(--grad); color: #0a0b14; border: 0; box-shadow: 0 10px 30px -10px rgba(139, 92, 255, 0.8); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { height: 52px; padding: 0 28px; font-size: 17px; border-radius: 14px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: rgba(255, 90, 122, 0.4); }

/* ---------- modals & overlays ---------- */
.modal, .overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 5, 10, 0.66); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity 0.22s, visibility 0.22s;
}
.modal.open, .overlay.show { opacity: 1; visibility: visible; }
.modal { z-index: 60; overflow-y: auto; }
#calib { z-index: 70; }
.modal-card {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto;
  border-radius: 22px; background: linear-gradient(180deg, #161936, #0f1126); border: 1px solid var(--line2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); padding: 26px;
  transform: translateY(14px) scale(0.98); transition: transform 0.25s cubic-bezier(.2, .8, .2, 1);
}
.modal.open .modal-card { transform: none; }
.modal-card h2 { margin: 0 0 14px; font-size: 24px; font-weight: 800; }
.modal-card .close { position: absolute; top: 14px; right: 14px; z-index: 2; }

/* detail */
.detail-card { max-width: 880px; display: grid; grid-template-columns: 300px 1fr; gap: 26px; padding: 26px; }
.detail-art { position: relative; align-self: start; }
.detail-art img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; background: #1a1d36; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9); }
.preview-eq { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: flex-end; gap: 3px; height: 22px; padding: 6px 8px; border-radius: 9px; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.3s; box-sizing: content-box; }
.preview-eq.on { opacity: 1; }
.preview-eq i { width: 4px; height: 100%; border-radius: 2px; background: var(--a1); transform-origin: bottom; animation: eq 0.9s ease-in-out infinite; }
.preview-eq i:nth-child(2) { animation-delay: -0.3s; } .preview-eq i:nth-child(3) { animation-delay: -0.6s; } .preview-eq i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.detail-body { min-width: 0; display: flex; flex-direction: column; }
.detail-body h2 { margin: 6px 40px 2px 0; font-size: 28px; line-height: 1.1; }
.d-artist { margin: 0; font-size: 17px; color: var(--text); opacity: 0.85; }
.d-mapper { margin: 4px 0 14px; color: var(--muted); font-size: 14px; }
.d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.d-tags:empty { display: none; }
.d-tags .tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.d-tags .tag i { width: 26px; height: 18px; border-radius: 999px; background-size: cover; background-position: center; flex: none; }
.d-tags .tag.plain { padding-left: 10px; }
.d-tags .tag .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.d-stats div, .p-stats div, .r-judges div { padding: 9px 11px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.d-stats span, .p-stats span, .r-judges span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.d-stats b, .p-stats b, .r-judges b { font-size: 17px; font-weight: 800; }
.d-chars { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.d-chars:empty { display: none; }
.d-chars button { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); }
.d-chars button.active { color: var(--text); border-color: var(--a1); background: rgba(94, 240, 255, 0.08); }
.d-diffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.diff-pill {
  position: relative; text-align: left; padding: 10px 12px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.04); border: 1.5px solid var(--line); transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.diff-pill:hover { background: rgba(255, 255, 255, 0.08); }
.diff-pill:active { transform: scale(0.97); }
.diff-pill b { display: block; color: var(--dc); font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 22px; }
.diff-pill span { font-size: 12px; color: var(--muted); }
.diff-pill em { position: absolute; top: 9px; right: 9px; font-style: normal; font-weight: 900; font-size: 13px; }
.diff-pill em.rec { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 5px; border-radius: 5px; background: rgba(94, 240, 160, 0.15); color: var(--ok); }
.diff-pill.active { border-color: var(--dc); background: color-mix(in srgb, var(--dc) 14%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dc) 18%, transparent); }
.d-best { margin: 14px 0 0; font-size: 14px; }
.d-best .fc { color: var(--ok); font-weight: 800; } .d-best .ap { color: var(--gold); font-weight: 800; }
.d-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.d-actions .btn.primary { margin-left: auto; min-width: 150px; }
.d-desc { margin: 18px 0 0; font-size: 13px; color: var(--muted); white-space: pre-line; max-height: 110px; overflow: auto; border-top: 1px solid var(--line); padding-top: 12px; }

.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; font-weight: 600; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track { width: 42px; height: 24px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); position: relative; transition: background 0.2s; flex: none; }
.toggle .track i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle input:checked + .track { background: var(--a2); }
.toggle input:checked + .track i { transform: translateX(18px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--a1); outline-offset: 2px; }

/* loading */
.loading-card, .pause-card {
  width: 100%; max-width: 380px; text-align: center; padding: 30px 28px; border-radius: 24px;
  background: linear-gradient(180deg, #161936, #0f1126); border: 1px solid var(--line2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.loading-card img { width: 140px; height: 140px; margin: 0 auto 16px; border-radius: 18px; object-fit: cover; box-shadow: 0 16px 40px -14px #000; animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03); } }
.loading-card h3 { margin: 0; font-size: 20px; }
.loading-card #lStep { margin: 4px 0 14px; color: var(--muted); font-size: 14px; }
.progress { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width 0.2s; }
.progress i.indef { width: 35% !important; animation: indef 1.1s ease-in-out infinite; }
@keyframes indef { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.loading-card .tip { margin: 16px 0; font-size: 13px; color: var(--muted); min-height: 2.6em; }

/* pause */
.pause-card { display: flex; flex-direction: column; gap: 10px; }
.pause-card h2 { margin: 0; font-size: 30px; font-weight: 900; }
.pause-card > p { margin: 0 0 10px; color: var(--muted); }
.pause-card .hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* calibration */
.calib-card { max-width: 420px; }
.calib-pad {
  --pulse: 0;
  width: 170px; height: 170px; margin: 12px auto; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
  background: radial-gradient(circle, rgba(94, 240, 255, calc(0.08 + var(--pulse) * 0.35)), rgba(139, 92, 255, 0.08) 70%);
  border: 2px solid rgba(94, 240, 255, calc(0.25 + var(--pulse) * 0.6));
  transform: scale(calc(1 + var(--pulse) * 0.05)); touch-action: none;
}
.calib-pad.hit { animation: padhit 0.2s; }
@keyframes padhit { 50% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.08); } }
.row-btns { display: flex; gap: 10px; justify-content: center; }

/* results */
#results { overflow-y: auto; }
.results-card {
  width: 100%; max-width: 560px; padding: 24px; border-radius: 24px; margin: auto;
  background: linear-gradient(180deg, rgba(22, 25, 54, 0.96), rgba(15, 17, 38, 0.97)); border: 1px solid var(--line2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); animation: none;
}
#results.show .results-card { animation: rise 0.45s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
.r-head { display: flex; gap: 14px; align-items: center; }
.r-head img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; background: #1a1d36; }
.r-head h2 { margin: 2px 0 0; font-size: 20px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-head > div { min-width: 0; }
.r-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.r-main { display: flex; align-items: center; gap: 22px; margin: 18px 0; }
.r-grade { font-size: 96px; font-weight: 900; line-height: 1; width: 130px; text-align: center; flex: none; }
.r-grade.pop { animation: gradePop 0.7s cubic-bezier(.2, 1.6, .4, 1) 0.15s both; }
@keyframes gradePop { from { transform: scale(2.2) rotate(-8deg); opacity: 0; } }
.r-scorebox { min-width: 0; }
.r-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.badge { padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(255, 255, 255, 0.08); }
.badge.gold { background: var(--gold); color: #1a1300; }
.badge.fc { background: rgba(94, 240, 160, 0.18); color: var(--ok); }
.badge.ap { background: linear-gradient(90deg, #ffe27a, #ffb36b); color: #241600; }
.badge.bad { background: rgba(255, 90, 122, 0.18); color: var(--bad); }
.r-score { font-size: 42px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.05; }
.r-acc { font-size: 16px; font-weight: 600; color: var(--muted); }
.r-prev { font-size: 13px; color: var(--muted); margin-top: 4px; }
.r-prev .up { color: var(--ok); }
.r-judges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.r-judges .perfect b { color: #7cf7ff; } .r-judges .great b { color: #a6ff8f; } .r-judges .good b { color: #ffd36b; } .r-judges .miss b { color: var(--bad); }
.r-xp { margin-top: 16px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.r-xp-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.r-xp-row #rXpGain { color: var(--a1); }
.lvlup { color: var(--gold); }
.r-xp-break { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.r-xp-break b { color: var(--text); }
.r-unlocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 12px; }
.r-unlocks:empty { display: none; }
.unlock { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 211, 107, 0.16), rgba(255, 211, 107, 0.03)); border: 1px solid rgba(255, 211, 107, 0.3); }
.unlock .ic { color: var(--gold); width: 24px; height: 24px; }
.unlock b { display: block; font-size: 14px; }
.unlock span { font-size: 12px; color: var(--muted); }
.r-actions { display: grid; grid-template-columns: auto 1fr 1fr 1.3fr; gap: 8px; margin-top: 18px; }
.r-actions .btn { padding: 0 12px; }

/* game over */
#gameover { background: rgba(10, 2, 6, 0.55); backdrop-filter: blur(3px); overflow-y: auto; }
.go-card {
  width: 100%; max-width: 480px; margin: auto; padding: 28px 26px 24px; border-radius: 24px; text-align: center;
  background: linear-gradient(180deg, rgba(40, 10, 22, 0.96), rgba(16, 10, 26, 0.97)); border: 1px solid rgba(255, 61, 90, 0.35);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85), 0 0 60px -20px rgba(255, 61, 90, 0.5);
}
#gameover.show .go-card { animation: rise 0.45s cubic-bezier(.2, .8, .2, 1); }
.go-title {
  position: relative; margin: 0; font: 700 72px/0.9 'Teko', var(--font); letter-spacing: 0.04em; color: #ff3d5a;
  text-shadow: 0 0 28px rgba(255, 61, 90, 0.6);
}
#gameover.show .go-title { animation: goShake 0.5s 0.1s both; }
.go-title::before, .go-title::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0.55; mix-blend-mode: screen; }
.go-title::before { color: #5ef0ff; transform: translate(-3px, 1px); clip-path: inset(0 0 55% 0); }
.go-title::after { color: #ffd36b; transform: translate(3px, -1px); clip-path: inset(55% 0 0 0); }
@keyframes goShake { 0% { transform: scale(1.8); opacity: 0; } 40% { transform: scale(0.95); opacity: 1; } 55% { transform: translateX(-6px); } 70% { transform: translateX(5px); } 85% { transform: translateX(-2px); } }
.go-sub { margin: 6px 0 18px; color: var(--muted); }
.go-run { padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); text-align: left; }
.go-song { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 10px; }
.go-song b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-song span { font-weight: 700; flex: none; }
.go-track { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.go-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffc23d, #ff3d5a); transition: width 0.9s cubic-bezier(.2, .8, .2, 1); }
.go-track b { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 61, 90, 0.45); transition: left 0.9s cubic-bezier(.2, .8, .2, 1); }
.go-where { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.go-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 16px; }
.go-stats div { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.go-stats span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.go-stats b { font-size: 16px; }
.go-chance { margin-bottom: 12px; }
.go-chance .btn { width: 100%; }
.go-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.go-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.go-diffs-row { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.go-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.go-diffs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.go-diff { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--dc); border: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.go-diff:hover { background: rgba(255, 255, 255, 0.09); }
.go-diff.on { border-color: var(--dc); background: color-mix(in srgb, var(--dc) 16%, transparent); cursor: default; }

/* settings */
.settings-card { max-width: 600px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); margin-bottom: 14px; }
.seg button { flex: 1; padding: 8px 6px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.active { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.set-pane { display: none; }
.set-pane.active { display: block; }
.set-pane .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.set-pane .row:last-child { border-bottom: 0; }
.set-pane .row > label:first-child, .set-pane .row > span:first-child { font-weight: 600; font-size: 14px; }
.set-pane label b { color: var(--a1); margin-left: 4px; font-weight: 700; }
.set-pane label small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.set-pane select { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 210px; max-width: 45%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); outline: none; flex: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 92, 255, 0.4); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 92, 255, 0.4); cursor: pointer; }
.keybinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.keybinds .key { padding: 12px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1.5px solid var(--line2); border-bottom-width: 4px; text-align: center; }
.keybinds .key small { display: block; font-size: 11px; color: var(--muted); }
.keybinds .key b { font-size: 24px; font-weight: 900; }
.keybinds .key.listening { border-color: var(--a1); animation: blink 0.8s infinite; }
@keyframes blink { 50% { background: rgba(94, 240, 255, 0.12); } }
.themes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.theme { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px; border-radius: 12px; border: 1.5px solid var(--line); font-size: 12px; font-weight: 600; }
.theme i { width: 44px; height: 32px; border-radius: 7px; background: linear-gradient(90deg, var(--l) 0 25%, transparent 25% 50%, var(--l) 50% 75%, transparent 75%), linear-gradient(var(--a), var(--b)); background-size: 100% 100%, 25% 60%; background-repeat: no-repeat; background-position: 0 0, 25% 20%; background-color: var(--l); border: 1px solid var(--line); }
.theme.active { border-color: var(--a1); background: rgba(94, 240, 255, 0.07); }
.row.danger label { color: var(--bad); }

/* profile */
.profile-card { max-width: 680px; }
.p-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.p-head > div:last-child { flex: 1; min-width: 0; }
.p-head h2 { margin: 0 0 8px; }
.p-head p { margin: 8px 0 0; font-size: 13px; }
.p-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.profile-card h3 { margin: 22px 0 10px; font-size: 17px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); opacity: 0.45; filter: grayscale(1); }
.ach.got { opacity: 1; filter: none; background: linear-gradient(90deg, rgba(255, 211, 107, 0.13), rgba(255, 255, 255, 0.02)); border-color: rgba(255, 211, 107, 0.3); }
.ach .ic { width: 24px; height: 24px; color: var(--gold); }
.ach b { display: block; font-size: 13px; }
.ach span { font-size: 11px; color: var(--muted); line-height: 1.3; display: block; }

/* how to */
.howto-card { max-width: 760px; text-align: center; }
.howto-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 16px; text-align: left; }
.howto-steps > div { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.howto-steps h4 { margin: 12px 0 4px; font-size: 16px; }
.howto-steps p { margin: 0; font-size: 13px; color: var(--muted); }
.how-ill { height: 90px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 0 2px; position: relative; overflow: hidden; }
.how-ill::after { content: ''; position: absolute; left: 0; right: 0; bottom: 16px; height: 2px; background: #fff; box-shadow: 0 0 10px var(--a1); }
.how-ill i { position: relative; }
.how-ill.lanes i.on::before { content: ''; position: absolute; left: 3px; right: 3px; height: 26px; border-radius: 5px; background: linear-gradient(var(--a1), var(--a2)); animation: howfall 1.6s linear infinite; }
.how-ill.hold i.long::before { content: ''; position: absolute; left: 30%; right: 30%; height: 70px; border-radius: 6px; background: rgba(120, 150, 255, 0.6); animation: howfall 2.2s linear infinite; }
.how-ill.hold i.long::after { content: ''; position: absolute; left: 3px; right: 3px; height: 22px; border-radius: 5px; background: linear-gradient(var(--a1), var(--a2)); animation: howfallHead 2.2s linear infinite; }
@keyframes howfall { from { top: -80px; } to { top: 95px; } }
@keyframes howfallHead { from { top: -32px; } to { top: 143px; } }
.how-ill.combo { display: grid; place-items: center; font-size: 46px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.how-ill.combo::after { display: none; }
.howto-card > p { font-size: 14px; margin: 0 0 18px; }

/* toasts */
#toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: calc(100vw - 32px); }
.toast {
  display: flex; gap: 12px; align-items: center; min-width: 240px; max-width: 380px; padding: 12px 16px; border-radius: 14px;
  background: rgba(20, 22, 44, 0.95); border: 1px solid var(--line2); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
  font-size: 14px; transform: translateX(30px); opacity: 0; transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), opacity 0.3s; backdrop-filter: blur(10px);
}
.toast.in { transform: none; opacity: 1; }
.toast .ic { color: var(--a1); width: 22px; height: 22px; }
.toast b { display: block; }
.toast span { display: block; font-size: 12px; color: var(--muted); }
.toast.error { border-color: rgba(255, 90, 122, 0.4); }
.toast.error .ic { color: var(--bad); }
.toast.ach { border-color: rgba(255, 211, 107, 0.45); background: linear-gradient(90deg, rgba(60, 48, 18, 0.96), rgba(20, 22, 44, 0.96)); }
.toast.ach .ic { color: var(--gold); }

.fatal { position: fixed; inset: 0; z-index: 99; display: grid; place-content: center; text-align: center; background: var(--bg); padding: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero .daily { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 40px; }
  .search kbd { display: none; }
  .brand-word { font-size: 16px; }
  .chip-text { display: none; }
  .menu-main { padding: 16px 16px 32px; }
  .hero { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .hero-card { min-height: 0; }
  .hero-body { padding: 14px 16px; }
  .hero-card h2 { font-size: 18px; }
  .hero-card p { font-size: 13px; }
  .warmup p, .quick p { display: none; }
  .mini-tiles { display: none; }
  .browse-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .filters .select { flex: 1; }
  .filters .select select { flex: 1; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .meta { padding: 9px 10px 11px; }
  .card .fav { opacity: 1; }
  .modal, .overlay { padding: 12px; }
  .modal-card { padding: 20px 18px; max-height: calc(100vh - 24px); border-radius: 20px; }
  .detail-card { grid-template-columns: 1fr; gap: 14px; }
  .detail-art { display: flex; gap: 14px; align-items: center; }
  .detail-art img { width: 110px; border-radius: 14px; }
  .detail-body h2 { font-size: 22px; margin-right: 0; }
  .d-stats { grid-template-columns: repeat(2, 1fr); }
  .d-actions { flex-wrap: wrap; }
  .d-actions .btn.primary { flex-basis: 100%; margin-left: 0; order: 5; }
  .r-main { gap: 12px; }
  .r-grade { font-size: 72px; width: 92px; }
  .r-score { font-size: 32px; }
  .r-judges { grid-template-columns: repeat(2, 1fr); }
  .r-actions { grid-template-columns: auto 1fr 1fr; }
  .r-actions #rRetry { grid-column: 1 / -1; order: -1; }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  .howto-steps { grid-template-columns: 1fr; }
  .set-pane .row { flex-wrap: wrap; }
  input[type=range] { max-width: 100%; width: 100%; }
  .themes { justify-content: flex-start; }
}
@media (max-width: 330px) {
  .hero { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
@media (max-width: 760px) {
  .go-card { padding: 22px 18px 18px; }
  .go-title { font-size: 56px; }
}


/* =====================================================================
   RIFFVOLT look: display type, pill buttons, glass panels, stage art
   ===================================================================== */
.ic { fill: currentColor; stroke: none; }

/* display type */
.brand-word, .hero-card h2, .modal-card h2, .detail-body h2, .pause-card h2, .r-head h2, .loading-card h3,
.howto-steps h4, .profile-card h3, .r-score, .r-grade, .d-stats b, .p-stats b, .r-judges b, .go-stats b, .lvl-badge {
  font-family: var(--display); font-weight: 600; letter-spacing: 0.02em;
}
.brand-word { font-size: 30px; font-style: italic; letter-spacing: 0.06em; line-height: 1; padding-top: 4px; }
.hero-card h2 { font-size: 34px; line-height: 0.9; font-style: italic; text-transform: uppercase; padding-top: 4px; }
.modal-card h2, .pause-card h2 { font-size: 44px; line-height: 0.85; font-style: italic; text-transform: uppercase; padding-top: 6px; }
.detail-body h2 { font-size: 40px; line-height: 0.9; font-style: italic; text-transform: uppercase; padding-top: 4px; }
.r-head h2 { font-size: 30px; text-transform: uppercase; font-style: italic; line-height: 0.95; }
.loading-card h3 { font-size: 30px; font-style: italic; text-transform: uppercase; line-height: 1; }
.howto-steps h4 { font-size: 24px; text-transform: uppercase; font-style: italic; }
.profile-card h3 { font-size: 26px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.r-score { font-size: 56px; font-weight: 600; }
.r-grade { font-weight: 700; font-style: italic; font-size: 120px; }
.d-stats b, .p-stats b, .r-judges b, .go-stats b { font-size: 26px; line-height: 1; }
.eyebrow { font-weight: 700; letter-spacing: 0.12em; }

/* brand mark: four lane-coloured pucks */
.brand-mark { align-items: flex-end; gap: 4px; height: 24px; }
.brand-mark i { width: 9px; height: 6px !important; border-radius: 50%; animation: none; transform: none; box-shadow: 0 0 10px currentColor; }
.brand-mark i:nth-child(1) { background: #ff3d6e; color: #ff3d6e; }
.brand-mark i:nth-child(2) { background: #ffb627; color: #ffb627; margin-bottom: 10px; }
.brand-mark i:nth-child(3) { background: #2ee6ff; color: #2ee6ff; margin-bottom: 4px; }
.brand-mark i:nth-child(4) { background: #7cff4f; color: #7cff4f; margin-bottom: 14px; }

/* buttons */
.btn {
  border-radius: 999px; min-height: 48px; padding: 10px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line); box-shadow: inset 0 1px rgba(255, 255, 255, 0.2); letter-spacing: 0.02em;
}
.btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07)); border-color: var(--line2); }
.btn.primary {
  position: relative; overflow: hidden; color: #fff; border: none;
  background: linear-gradient(90deg, #ff2e93, #b14dff 60%, #7a5cff);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.45), inset 0 -2px rgba(0, 0, 0, 0.15), 0 14px 36px -12px rgba(255, 46, 147, 0.9);
  font: 600 24px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; padding-top: 13px;
}
.btn.primary.big { font-size: 30px; min-height: 58px; }
.btn.primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent); transform: skew(-20deg);
}
.btn.primary:hover::after, .btn.primary:focus-visible::after { animation: shine 0.9s ease-out; }
@keyframes shine { to { left: 120%; } }
.btn.ghost { background: transparent; box-shadow: none; }
.icon-btn {
  border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25);
}
.icon-btn:hover { border-color: var(--a1); box-shadow: inset 0 1px rgba(255, 255, 255, 0.25), 0 0 18px -2px rgba(43, 217, 255, 0.6); }
.icon-btn.on { color: #ff3d6e; }
.pause-btn { border-radius: 50%; }

/* glass panels */
.modal-card, .loading-card, .pause-card, .results-card {
  background: var(--glass-fill), rgba(10, 12, 34, 0.8);
  border: 1px solid var(--line); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.go-card { background: linear-gradient(155deg, rgba(255, 61, 110, 0.16), rgba(255, 255, 255, 0.03) 45%), rgba(16, 8, 24, 0.9); border-color: rgba(255, 61, 110, 0.4); }
.modal { background: rgba(3, 4, 14, 0.6); }
.modal.open .modal-card { animation: pop 0.28s var(--ease-pop) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.95) translateY(10px); } }

/* tabs, segments, chips */
.tabs { border-radius: 999px; background: rgba(255, 255, 255, 0.05); }
.tabs button { border-radius: 999px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 13px; }
.tabs button.active { color: #fff; background: linear-gradient(90deg, #ff2e93, #b14dff); box-shadow: 0 6px 18px -8px rgba(255, 46, 147, 0.9); }
.seg { border-radius: 999px; }
.seg button { border-radius: 999px; text-transform: uppercase; font-size: 13px; letter-spacing: 0.05em; font-weight: 700; }
.seg button.active { background: rgba(43, 217, 255, 0.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(43, 217, 255, 0.5); }
.select, .search { border-radius: 999px; }
.pill.gold { background: #ffb627; color: #1d1200; }
.lvl-badge { color: #fff; background: linear-gradient(135deg, #ff2e93, #b14dff); font-size: 20px; padding-top: 3px; border-radius: 50%; }
.lvl-badge.xl { font-size: 40px; }
.xpbar i, .progress i { background: linear-gradient(90deg, #ffb627, #ff2e93); }
.toggle input:checked + .track { background: #ff2e93; }

/* home cards on RIFFVOLT art */
.hero-card { border-color: var(--line2); background: #0a0c22; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.hero-card .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform 0.6s cubic-bezier(.2, .9, .25, 1); }
.hero-card:hover .hero-bg { transform: scale(1.05); }
.hero-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(4, 5, 13, 0.92) 0%, rgba(4, 5, 13, 0.7) 45%, rgba(4, 5, 13, 0.15) 100%); }
.hero-card .hero-body { z-index: 2; }
.hero-card .hero-art { z-index: 1; opacity: 0.45; }
.daily::after { background: linear-gradient(90deg, rgba(20, 12, 2, 0.94) 0%, rgba(20, 12, 2, 0.72) 50%, rgba(20, 12, 2, 0.2) 100%); }
.daily .eyebrow { color: #ffb627; }
.warmup .eyebrow { color: #2bd9ff; }
.quick .eyebrow { color: #ff2e93; }
.hero-card p { color: rgba(226, 232, 255, 0.8); }

/* song cards */
.card { border-radius: 16px; }
.card h3 { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1; letter-spacing: 0.02em; padding-top: 3px; }
.card .play-hover .ic { background: linear-gradient(135deg, #ff2e93, #b14dff); color: #fff; }

/* profile header art */
.p-head { position: relative; margin: -26px -26px 18px; padding: 26px; border-radius: 22px 22px 0 0; overflow: hidden; background: url("../assets/art/profile.webp") center 35% / cover; }
.p-head::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 5, 13, 0.9), rgba(4, 5, 13, 0.55)); }
.p-head > * { position: relative; }

/* menu backdrop */
#bg .bg-art { opacity: 0.38; }
#bg .bg-glow { display: none; }
@media (max-width: 760px) {
  .hero-card h2 { font-size: 28px; }
  .modal-card h2, .pause-card h2 { font-size: 38px; }
  .detail-body h2 { font-size: 32px; }
  .p-head { margin: -20px -18px 16px; padding: 20px 18px; }
}


/* =====================================================================
   Every screen: phones (portrait + landscape), notches, tablets, desktops
   ===================================================================== */

/* brand */
.brand-word { text-transform: uppercase; white-space: nowrap; }
.brand-word em {
  font-style: inherit; padding-right: 0.08em;
  background: linear-gradient(90deg, #ff2e93, #b14dff 70%, #7a5cff); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* notches, rounded corners and the home indicator */
.topbar {
  padding-top: max(14px, env(safe-area-inset-top));
  padding-right: max(20px, env(safe-area-inset-right));
  padding-left: max(20px, env(safe-area-inset-left));
}
.menu-main { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.foot { padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 16px)); padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.modal, .overlay {
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.pause-btn { top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); }
#toasts { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }

/* the real visible height on phones (the browser bars come and go) */
.modal-card { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); }
/* a card taller than the screen scrolls from its top instead of being cut off */
.modal, .overlay { overflow-y: auto; overscroll-behavior: contain; }
.overlay > *, .modal > * { margin: auto; }

/* filters never push the page sideways */
.filters { min-width: 0; }
.select { min-width: 0; }
.select select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .filters { width: 100%; }
  .filters .select { flex: 1 1 0; }
  .filters .select span { flex: none; }
  .filters .select select { flex: 1 1 0; width: 0; }
}
/* settings tabs always fit on one line */
.seg button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 430px) {
  .seg { gap: 2px; padding: 3px; }
  .seg button { padding: 8px 2px; font-size: 11px; letter-spacing: 0.02em; }
}

/* touch screens: no sticky hover effects, favourite button always reachable, no zoom on focus */
@media (hover: none) {
  .card:hover, .hero-card:hover { transform: none; box-shadow: none; }
  .card:hover .cover img, .hero-card:hover .hero-bg { transform: none; }
  .card:hover .play-hover { opacity: 0; }
  .card .fav { opacity: 1; }
  .card:active { transform: scale(0.98); }
  .hero-card:active { transform: scale(0.985); }
}
@media (pointer: coarse) {
  .search input { font-size: 16px; }
  .search kbd { display: none; }
}

/* big desktops and TVs */
@media (min-width: 1600px) {
  .menu-main, .foot { max-width: 1560px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
  .hero-card { min-height: 200px; }
}
@media (min-width: 2200px) {
  body { font-size: 16px; }
  .menu-main, .foot { max-width: 2000px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .hero-card { min-height: 240px; }
}

/* tablets */
@media (min-width: 761px) and (max-width: 1040px) {
  .detail-card { grid-template-columns: 240px 1fr; gap: 22px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
}

/* phones */
@media (max-width: 760px) {
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); padding-right: max(16px, env(safe-area-inset-right)); padding-left: max(16px, env(safe-area-inset-left)); }
  .menu-main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .modal, .overlay {
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .modal-card { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .brand-word { font-size: 26px; }
  .top-actions { gap: 6px; }
  .icon-btn, .profile-chip { height: 40px; }
  .icon-btn { width: 40px; }
  .card h3 { font-size: 20px; }
}
@media (max-width: 430px) {
  .brand-mark { display: none; }
  .hero-card h2 { font-size: 26px; }
  .hero-body { padding: 12px 14px; }
  .eyebrow { font-size: 11px; letter-spacing: 0.08em; }
  .pill { font-size: 11px; padding: 3px 9px; }
  .grid { gap: 8px; }
  .card .meta { padding: 8px 9px 10px; }
  .card h3 { font-size: 18px; }
  .card .artist { font-size: 12px; margin-bottom: 6px; }
  .tabs button { padding: 7px 11px; font-size: 12px; }
  .detail-body h2 { font-size: 28px; }
  .d-stats b, .p-stats b, .r-judges b, .go-stats b { font-size: 22px; }
  .d-diffs { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .modal-card h2, .pause-card h2 { font-size: 34px; }
  .r-head img { width: 52px; height: 52px; }
  .r-head h2 { font-size: 24px; }
  .r-grade { font-size: 80px; width: 80px; }
  .r-score { font-size: 40px; }
  .r-actions .btn { padding: 0 10px; }
  .loading-card, .pause-card { padding: 24px 18px; }
  .go-title { font-size: 50px; }
  .keybinds { gap: 6px; }
  .keybinds .key b { font-size: 20px; }
  .p-head { gap: 12px; }
  .lvl-badge.xl { width: 52px; height: 52px; font-size: 32px; }
  .ach-grid { grid-template-columns: 1fr; }
  .toast { min-width: 0; }
}
@media (max-width: 360px) {
  .profile-chip { padding-right: 5px; }
  .profile-chip .streak { display: none; }
  .brand-word { font-size: 24px; }
  .hero-card h2 { font-size: 24px; }
  .hero-foot .pill:nth-child(2) { display: none; }
  .card h3 { font-size: 17px; }
  .card .mapper { display: none; }
  .r-main { gap: 8px; }
  .r-grade { font-size: 68px; width: 66px; }
  .r-score { font-size: 34px; }
  .go-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .go-stats div { padding: 7px 8px; }
  .d-actions { gap: 8px; }
}
/* Galaxy Fold cover screen and other very narrow phones */
@media (max-width: 300px) {
  .topbar, .menu-main { padding-left: 10px; padding-right: 10px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .card h3 { font-size: 15px; }
  .card .meta-row .rate { display: none; }
  .filters { flex-direction: column; }
  .icon-btn { width: 36px; height: 36px; }
  .profile-chip { height: 36px; }
  .lvl-badge { width: 28px; height: 28px; font-size: 17px; }
  .r-actions { grid-template-columns: 1fr 1fr; }
  .r-actions #rCopy { display: none; }
  .go-actions { grid-template-columns: 1fr; }
  .keybinds { grid-template-columns: repeat(2, 1fr); }
}

/* phones held sideways and other short screens */
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { position: relative; padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; }
  .menu-main { padding-top: 12px; }
  .hero { grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .hero .daily { grid-column: auto; }
  .hero-card { min-height: 0; }
  .hero-body { padding: 12px 14px; }
  .hero-card h2 { font-size: 24px; }
  .hero-card p { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .modal, .overlay { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .modal-card { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 16px 18px; }
  .modal-card h2 { font-size: 32px; margin-bottom: 10px; }
  .detail-card { grid-template-columns: 170px 1fr; gap: 16px; max-width: 760px; }
  .detail-art { display: block; }
  .detail-art img { width: 100%; }
  .detail-body h2 { font-size: 28px; }
  .d-stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 10px; }
  .d-stats div { padding: 6px 8px; }
  .d-actions { flex-wrap: nowrap; margin-top: 12px; }
  .d-actions .btn.primary { flex-basis: auto; order: 0; margin-left: auto; }
  .d-desc { display: none; }
  .loading-card { max-width: 520px; display: grid; grid-template-columns: 110px 1fr; gap: 6px 18px; text-align: left; align-items: center; padding: 18px 20px; }
  .loading-card img { width: 110px; height: 110px; margin: 0; grid-row: span 4; }
  .loading-card .tip { margin: 6px 0; min-height: 0; }
  .loading-card #lCancel { justify-self: start; }
  .pause-card { max-width: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 18px 20px; }
  .pause-card h2, .pause-card > p, .pause-card .hint { grid-column: 1 / -1; }
  .pause-card #pResume { grid-column: 1 / -1; }
  .pause-card h2 { font-size: 34px; }
  .pause-card > p { margin: 0; }
  .calib-card { grid-template-columns: 1fr; }
  .calib-pad { width: 120px; height: 120px; margin: 4px auto; }
  .results-card { max-width: 760px; padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .results-card > .r-head, .results-card > .r-actions, .results-card > .r-unlocks { grid-column: 1 / -1; }
  .r-main { margin: 10px 0; }
  .r-grade { font-size: 84px; width: 84px; }
  .r-score { font-size: 40px; }
  .r-judges { align-self: center; }
  .r-xp { margin-top: 0; grid-column: 1 / -1; }
  .r-actions { margin-top: 12px; }
  .go-card { max-width: 720px; padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; text-align: left; }
  .go-title { font-size: 52px; grid-column: 1 / -1; text-align: center; }
  .go-sub { grid-column: 1 / -1; text-align: center; margin: 2px 0 10px; }
  .go-run { grid-column: 1; grid-row: 3; }
  .go-stats { grid-column: 1; grid-row: 4; margin: 10px 0 0; }
  .go-chance { grid-column: 2; grid-row: 3; align-self: start; margin-bottom: 8px; }
  .go-actions { grid-column: 2; grid-row: 4; align-self: start; margin-top: 10px; }
  .go-diffs-row { grid-column: 1 / -1; grid-row: 5; margin-top: 10px; padding-top: 8px; }
  .go-hint { display: none; }
  .howto-steps { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .how-ill { height: 64px; }
  .howto-steps > div { padding: 12px; }
  .howto-steps h4 { font-size: 20px; margin-top: 8px; }
  .p-head { margin: -16px -18px 12px; padding: 16px 18px; }
  #toasts { bottom: max(8px, env(safe-area-inset-bottom)); }
}
@media (max-height: 380px) and (orientation: landscape) {
  .hero { display: none; }
  .r-xp-break { display: none; }
  .go-run { padding: 10px; }
}

/* long option text never widens a settings row */
.set-pane select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
/* the search box gives up width before anything in the top bar overflows */
.search { min-width: 0; }
@media (min-width: 761px) and (max-width: 900px) { .chip-text { display: none; } }
/* short screens: Retry / Next / Songs stay on screen while the results scroll */
@media (max-height: 520px) and (orientation: landscape) {
  .results-card > .r-actions { position: sticky; bottom: 0; z-index: 2; margin: 12px -20px -16px; padding: 10px 20px 14px; border-radius: 0 0 24px 24px; background: linear-gradient(180deg, rgba(12, 14, 34, 0), rgba(12, 14, 34, 0.96) 35%); }
}
/* the Play button stays on screen while a long song detail scrolls (phones, short screens) */
@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  .detail-card .d-actions { position: sticky; bottom: 0; z-index: 3; margin-left: -18px; margin-right: -18px; padding: 12px 18px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(12, 14, 34, 0), rgba(12, 14, 34, 0.97) 28%); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .detail-card .d-actions { margin-left: 0; margin-right: -18px; padding-left: 0; }
}
/* card grids never ask for more than the screen has */
.r-unlocks { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.ach-grid { grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
@media (max-width: 300px) { .results-card, .go-card { padding-left: 14px; padding-right: 14px; } }

/* song detail: difficulty + Play first, map details below */
.d-artist { margin-bottom: 16px; }
.d-chars { margin-bottom: 10px; }
.d-best { margin-top: 12px; }
.d-best:empty { display: none; }
.d-actions { margin-top: 14px; }
.d-info { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.d-info .d-mapper { margin: 0 0 10px; }
.d-info .d-tags { margin: 0 0 12px; }
.d-info .d-stats { margin-bottom: 0; }
.d-info .d-desc { margin-top: 14px; }
@media (max-height: 520px) and (orientation: landscape) {
  .d-artist { margin-bottom: 10px; }
  .d-actions { margin-top: 10px; }
  .d-info { margin-top: 12px; padding-top: 10px; }
}

/* =====================================================================
   Website: analytics consent, footer links
   ===================================================================== */
.consent {
  position: fixed; z-index: 85; left: 50%; transform: translateX(-50%);
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px));
  width: min(560px, calc(100% - 24px)); padding: 16px 18px; border-radius: 18px;
  display: flex; align-items: center; gap: 16px;
  background: var(--glass-fill), rgba(10, 12, 34, 0.92); border: 1px solid var(--line2); box-shadow: var(--glass-shadow), 0 20px 50px -18px #000;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  animation: rise 0.4s cubic-bezier(.2, .8, .2, 1);
}
.consent p { margin: 0; font-size: 13px; color: var(--muted); }
.consent p b { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.consent-btns { display: flex; gap: 8px; flex: none; }
.consent .btn { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.consent #consentYes { background: linear-gradient(90deg, #ff2e93, #b14dff); border: 0; color: #fff; }
body.in-game .consent { display: none; }
@media (max-width: 520px) {
  .consent { flex-direction: column; align-items: stretch; gap: 12px; }
  .consent-btns .btn { flex: 1; }
}

.foot-links { display: flex; justify-content: center; gap: 18px; margin-top: 10px; }
.foot-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot-links a:hover { color: var(--text); }

/* a game, not a document: no text selection, no dragging or saving pictures (text fields still work) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg, a, canvas { -webkit-user-drag: none; user-drag: none; }
