:root {
  --brand: #f5c518; --brand-hover: #ffd53d; --brand-soft: #fff8e0; --brand-line: #f0d98a; --brand-ink: #5a4700;
  --ink: #23272b; --on-dark: #e8eaed; --fg: #24292e; --muted: #5c6570;
  --surface-alt: #f5f6f8; --line: #e6e8eb; --line-input: #e0e3e7;
  --danger: #cc2222; --danger-soft: #fdeaea; --success: #1f8a3b; --success-soft: #e6f6ea;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif; line-height: 1.65; color: var(--fg); background: #fff; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 1.25rem; }
header { background: var(--ink); color: var(--on-dark); position: sticky; top: 0; box-shadow: 0 2px 12px rgba(0,0,0,.3); z-index: 2; }
.bar { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.logo { font-size: 1.25rem; } .logo b { color: var(--brand); }
main { padding-block: 3rem; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.25; margin: 0 0 1.5rem; }
.hl { background: linear-gradient(transparent 60%, var(--brand) 60%); }
.muted { color: var(--muted); } .small { font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; z-index: 9; background: var(--brand); color: var(--ink); padding: .5rem 1rem; border-radius: 9999px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
label { display: block; font-weight: 600; margin: 1.5rem 0 .4rem; }
input { width: 100%; font: inherit; padding: .7rem .9rem; border: 1px solid var(--line-input); border-radius: 10px; }
code { background: var(--surface-alt); padding: .1rem .35rem; border-radius: 6px; word-break: break-all; }
.btn { font: inherit; font-weight: 600; border: 0; cursor: pointer; background: var(--brand); color: var(--ink); padding: .8rem 1.6rem; border-radius: 9999px; margin-top: 1rem; }
.btn:hover { background: var(--brand-hover); }
.btn.ghost { background: transparent; border: 2px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.link { font: inherit; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; }

fieldset { border: 0; padding: 0; margin: 0; }
.sources { display: grid; gap: .5rem; }
.sources label { display: flex; gap: .75rem; align-items: center; margin: 0; font-weight: 400; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.sources label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand-line); }
.sources input { width: auto; accent-color: var(--ink); }
.sources img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--surface-alt); }
.sources .count { margin-left: auto; color: var(--muted); font-size: .9rem; }

.stats { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: baseline; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.stats button { margin-left: auto; }
.steps { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .4rem; }
.steps li { padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 10px; min-height: 2.6rem; color: var(--muted); }
.steps li.skip { background: var(--surface-alt); }
.steps li.wrong { background: var(--danger-soft); border-color: #f2c9c7; color: var(--danger); }
.steps li.artist { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }
.steps li.right { background: var(--success-soft); color: var(--success); font-weight: 600; }

.player { display: flex; gap: 1rem; align-items: center; background: var(--ink); color: var(--on-dark); border-radius: 14px; padding: 1rem; }
.player > div { flex: 1; }
.play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--brand); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.len { font-weight: 600; margin-bottom: .4rem; }
.progress { height: 6px; background: #3a4046; border-radius: 9999px; overflow: hidden; }
#progress-fill { height: 100%; width: 0; background: var(--brand); }

.guess { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.combo { position: relative; flex: 1 1 100%; }
#suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 18rem; overflow-y: auto; z-index: 5; }
#suggest[hidden] { display: none; }
#suggest li { display: flex; flex-direction: column; padding: .5rem .7rem; border-radius: 8px; line-height: 1.3; cursor: pointer; }
#suggest li span { color: var(--muted); font-size: .85rem; }
#suggest li:hover, #suggest li[aria-selected="true"] { background: var(--brand-soft); }
.guess .btn { margin-top: 0; }
.result { display: flex; gap: 1rem; margin-top: 1.5rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; }
.result[hidden] { display: none; }
.result img { border-radius: 10px; object-fit: cover; }
.result p { margin: 0 0 .3rem; }
.verdict { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
