:root {
  font-family: "DM Sans", sans-serif;
  color: #22231f;
  background: #f7f5ef;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --ink: #22231f;
  --muted: #85857e;
  --line: #e9e7df;
  --coral: #df755e;
  --green: #426c53;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button { font: inherit; }
.app-shell { width: min(100% - 48px, 560px); margin: 0 auto; padding: 27px 0 22px; }
.topbar, .brand, .topbar-tag, .game-meta, .choices-heading, .card-footer, .page-footer { display: flex; align-items: center; justify-content: space-between; }
.topbar { margin-bottom: 25px; }
.brand { justify-content: flex-start; gap: 10px; color: var(--ink); text-decoration: none; font-family: Manrope, sans-serif; font-size: 15px; font-weight: 800; letter-spacing: -.7px; }
.brand-light { padding: 0 2px; color: var(--coral); font-weight: 500; }
.brand-mark { height: 18px; display: flex; align-items: center; gap: 2px; }
.brand-mark i { display: block; width: 3px; border-radius: 3px; background: var(--coral); }
.brand-mark i:nth-child(1), .brand-mark i:nth-child(5) { height: 7px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(4) { height: 13px; }
.brand-mark i:nth-child(3) { height: 18px; }
.account-area { display: flex; max-width: 250px; flex-direction: column; align-items: flex-end; gap: 5px; }
.provider-buttons { display: grid; width: 190px; gap: 5px; }
.provider-button { display: inline-flex; align-items: center; gap: 8px; min-height: 31px; padding: 0 10px; border: 1px solid #e4e1d8; border-radius: 4px; background: #fffefa; color: var(--ink); cursor: pointer; font-size: 10px; font-weight: 600; text-align: left; }
.provider-button:hover:not(:disabled) { background: #fcfaf5; border-color: #c9c5b9; }
.provider-button:disabled { cursor: default; opacity: .65; }
.provider-mark { display: inline-grid; width: 16px; place-items: center; font-family: Arial, sans-serif; font-size: 14px; font-weight: 700; }
.google-provider .provider-mark { color: #4285f4; }
.facebook-provider .provider-mark { color: #1877f2; font-size: 17px; }
.apple-provider .provider-mark { color: #111; font-size: 12px; }
.signed-in-account { display: flex; align-items: center; gap: 9px; }
.account-name { max-width: 135px; overflow: hidden; color: #6f6d64; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sign-out-button { padding: 4px 0; border: 0; background: transparent; color: var(--coral); cursor: pointer; font-size: 10px; }
.guest-note { color: #85857e; font-size: 9px; text-align: right; }
.account-history { color: #8a887f; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .1px; text-align: right; }
.auth-status { max-width: 230px; color: #8a887f; font-size: 9px; line-height: 1.3; text-align: right; }
.auth-status.error { color: #bd5e4a; }
[hidden] { display: none !important; }
.topbar-tag, .eyebrow, .round-label, .score-label, .choices-heading, .card-footer, .page-footer { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 1.25px; }
.topbar-tag { justify-content: flex-end; gap: 8px; color: #85857e; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #87a388; box-shadow: 0 0 0 3px #87a38824; }
.game-card { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #e8e5dc; border-radius: 8px; background: #fffefa; box-shadow: 0 18px 50px #3431210a, 0 2px 7px #34312108; }
.card-decoration { position: absolute; z-index: -1; pointer-events: none; }
.decoration-one { top: -131px; right: -127px; width: 265px; height: 265px; border: 1px solid #eee9df; border-radius: 50%; box-shadow: 0 0 0 19px #ffffffa8, 0 0 0 20px #eee9df; }
.decoration-two { top: -81px; right: -78px; width: 166px; height: 166px; border: 1px solid #f1ede4; border-radius: 50%; }
.game-content { padding: 38px 52px 24px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--coral); font-size: 9px; letter-spacing: 1.55px; }
.eyebrow-line { width: 17px; height: 1px; background: var(--coral); }
h1 { margin: 12px 0 5px; font-family: Manrope, sans-serif; font-size: clamp(36px, 8vw, 46px); line-height: 1.17; font-weight: 600; letter-spacing: -2.5px; }
h1 span { color: var(--coral); }
.intro { margin: 0; color: #828179; font-size: 13px; }
.game-meta { margin-top: 32px; color: #95948c; }
.round-label strong, .score-label strong { margin-left: 7px; color: var(--ink); font-size: 11px; font-weight: 500; }
.round-total { color: #a5a39a; }
.progress-track { position: relative; height: 3px; margin-top: 11px; overflow: visible; border-radius: 4px; background: #eeece6; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--coral); transition: width .35s ease; }
.progress-ticks { position: absolute; inset: 0; display: flex; justify-content: space-between; pointer-events: none; }
.progress-ticks i { position: relative; top: -1px; width: 1px; height: 5px; background: #dedbd2; }
.listen-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 53px; margin: 25px 0 22px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: #fffefa; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, transform .2s; }
.listen-button:hover { background: #383a33; transform: translateY(-1px); }
.listen-button:active { transform: translateY(0); }
.listen-button.is-playing { background: #426c53; border-color: #426c53; }
.sound-icon { display: flex; width: 19px; height: 19px; }
.sound-icon svg { width: 100%; }
.play-shortcut { position: absolute; right: 12px; display: grid; width: 21px; height: 21px; place-items: center; border: 1px solid #ffffff3c; border-radius: 3px; color: #ffffffa3; font-family: "DM Mono", monospace; font-size: 11px; }
.choices-heading { margin-bottom: 10px; color: #939189; font-size: 8px; letter-spacing: 1.2px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.choice { position: relative; display: flex; min-width: 0; height: 154px; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #e7e4dc; border-radius: 4px; background: #fffefa; cursor: pointer; transition: border .16s, background .16s, transform .16s; }
.choice:hover:not(:disabled) { transform: translateY(-2px); border-color: #c9c5b9; background: #fcfaf5; }
.choice:disabled { cursor: default; }
.choice-key { position: absolute; color: #aaa89f; font-family: "DM Mono", monospace; font-size: 8px; }
.choice-key { top: 8px; left: 9px; }
.staff-notation { display: block; width: 100%; height: 140px; overflow: visible; }
.staff-line { stroke: #8d8b81; stroke-width: 1; }
.ledger-line { stroke: #6f6d64; stroke-width: 1.2; }
.treble-clef { fill: var(--ink); font-family: "Segoe UI Symbol", "Noto Music", serif; font-size: 58px; }
.staff-accidental { fill: var(--ink); font-family: "Segoe UI Symbol", serif; font-size: 19px; }
.staff-notehead { fill: var(--ink); }
.note-stem { stroke: var(--ink); stroke-width: 1.5; }
.choice.correct { border-color: #719378; background: #f0f5ef; }
.choice.correct .choice-note { color: var(--green); }
.choice.wrong { border-color: #d88875; background: #fcf0ec; }
.choice.wrong .choice-note { color: #bd5e4a; }
.choice.reveal { border-color: #719378; background: #f0f5ef; }
.feedback { min-height: 15px; margin: 15px 0 0; color: #929087; text-align: center; font-size: 11px; }
.feedback.correct-message { color: var(--green); }
.feedback.wrong-message { color: #bd5e4a; }
.card-footer { min-height: 37px; padding: 0 52px; border-top: 1px solid #efede6; color: #a4a197; font-size: 8px; letter-spacing: 1.1px; }
.footer-note { color: #8d8b81; }
.page-footer { margin-top: 15px; color: #a09e95; font-size: 8px; letter-spacing: 1.2px; }
.footer-heart { padding-left: 3px; color: var(--coral); }
.finished { text-align: center; }
.finished .intro { max-width: 290px; margin: 0 auto; line-height: 1.7; }
.final-score { margin: 31px 0 26px; color: var(--coral); font-family: Manrope, sans-serif; font-size: 65px; font-weight: 600; letter-spacing: -4px; line-height: 1; }
.final-score span { color: #aaa79c; font-size: 20px; letter-spacing: 0; }
.save-status { min-height: 16px; margin: -14px 0 20px; color: #85857e; font-size: 11px; }
.restart-button { height: 48px; padding: 0 24px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: #fffefa; cursor: pointer; font-size: 12px; font-weight: 600; }
.restart-button:hover { background: #383a33; }
button:focus-visible { outline: 3px solid #e49a87; outline-offset: 3px; }
@media (max-width: 520px) {
  .app-shell { width: min(100% - 28px, 440px); padding-top: 19px; }
  .topbar { margin-bottom: 17px; }
  .brand { gap: 7px; font-size: 13px; }
  .account-area { max-width: 160px; }
  .provider-buttons { width: 150px; }
  .provider-button { gap: 6px; min-height: 30px; padding: 0 8px; font-size: 9px; }
  .account-name { max-width: 95px; }
  .auth-status { max-width: 160px; }
  .game-content { padding: 30px 24px 20px; }
  .card-footer { padding: 0 24px; }
  .choice { height: 143px; }
  .staff-notation { height: 132px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
