:root {
  --bg: #0e1020;
  --surface: #181b33;
  --surface-2: #232748;
  --text: #ece9f7;
  --dim: #9a98b8;
  --accent: #ff7a59;
  --ok: #43d6b6;
  --miss: #e0728f;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font-family: "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif; }
[hidden] { display: none !important; }
main { max-width: 520px; margin: 0 auto; padding: 24px 16px 48px; }
.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 14px; padding: 24px 16px; }
h1 { font-size: 1.6rem; margin: 0; }
h2 { font-size: 1.2rem; margin: 0; }
p { margin: 0; color: var(--dim); line-height: 1.6; }
.big { font-size: 2.4rem; font-weight: 800; color: var(--text); }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .12em; font-size: .85rem; }

input[type=text] { width: 100%; font: inherit; font-size: 1.1rem; padding: 14px 16px; color: var(--text);
  background: var(--surface); border: 2px solid var(--surface-2); border-radius: var(--r); outline: none; }
input[type=text]:focus { border-color: var(--accent); }
button { font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: var(--r);
  padding: 14px 20px; background: var(--accent); color: #1a0d08; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.ghost { background: var(--surface-2); color: var(--text); }
button.wide { width: 100%; font-size: 1.1rem; }

.suggest { list-style: none; margin: 8px 0 0; padding: 0; background: var(--surface);
  border-radius: var(--r); overflow: hidden; }
.suggest li { padding: 13px 16px; border-bottom: 1px solid var(--surface-2); cursor: pointer; }
.suggest li:last-child { border-bottom: 0; }
.suggest li:active { background: var(--surface-2); }
.suggest small { color: var(--dim); margin-left: 8px; }
.chosen { margin-top: 12px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--r);
  border: 2px solid var(--accent); font-weight: 700; }

.card { background: var(--surface); border-radius: var(--r); padding: 16px; }
.result-ok { color: var(--ok); }
.result-miss { color: var(--miss); }

/* 唱盤 */
.vinyl { width: min(60vw, 260px); aspect-ratio: 1; }
.disc { width: 100%; height: 100%; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 30%, rgba(255,255,255,.05) 30.5% 31%, transparent 31.5% 38%,
      rgba(255,255,255,.05) 38.5% 39%, transparent 39.5% 46%, rgba(255,255,255,.05) 46.5% 47%, transparent 47.5%),
    conic-gradient(from 30deg, #14152a, #26294d 12%, #14152a 25%, #26294d 62%, #14152a 75%, #26294d 88%, #14152a);
  box-shadow: 0 10px 40px rgba(0,0,0,.5); display: grid; place-items: center;
  animation: spin 3.2s linear infinite; }
.vinyl.paused .disc { animation-play-state: paused; }
.label { width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.label span { width: 12%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .disc { animation-duration: 12s; } }

.bar { height: 10px; width: 100%; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; }

.rank { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.rank li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px;
  background: var(--surface); border-radius: var(--r); }
.rank li b { color: var(--accent); margin-right: 10px; }
.rank li.me { outline: 2px solid var(--ok); }
.rank .delta { color: var(--ok); font-size: .85em; margin-left: 8px; }
