/* Hallmark · shape: app screen · genre: modern-minimal · theme: Ultraviolet (monochrome and Inter by user request) · nav: notation toggle · footer: none · signature: a single engraved note · states: ready, question, feedback, results, error · posture: restrained · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4 · weakest: E, fixed the seven-answer layout at small widths and reserved feedback space */
/* Hallmark · redesign: polish · Inter typography and spacing refinement; wordmark removed at user request; music notation and behavior retained */
/* Hallmark · dropped #setup-title, #practice-title, #difficulty-description, #answer-instruction, #accidental-key-hint, .keyboard-hint, .result-caption · user explicitly requested removal of redundant Note Reader headings, instructions and accuracy labels */
@import url("./tokens.css");
@import url("./base.css");

.app-header { max-width: 736px; margin-inline: auto; min-height: 68px; padding: var(--space-sm) var(--space-lg); display: flex; align-items: center; justify-content: flex-end; }
.notation-switch { display: flex; gap: var(--space-2xs); }
button { cursor: pointer; border: 0; color: var(--color-ink); background: var(--color-transparent); -webkit-tap-highlight-color: var(--color-transparent); touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .6; }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.notation-switch button { min-height: 44px; min-width: 60px; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-control); color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; line-height: 1.4; white-space: nowrap; }
.notation-switch button[aria-pressed="true"] { background: var(--color-paper-3); color: var(--color-ink); }
.notation-switch button:hover { background: var(--color-paper-3); color: var(--color-ink); }
.app-main { width: 100%; max-width: 736px; min-height: calc(100svh - 68px); display: grid; align-content: start; margin-inline: auto; padding: var(--space-xl) var(--space-lg); }
.screen { width: 100%; }
.setup-screen { max-width: 440px; margin-inline: auto; }
h1 { max-width: none; line-height: 1.4; font-weight: 600; }
h1[tabindex="-1"]:focus { outline: none; }
.screen[tabindex="-1"]:focus { outline: none; }
#setup-form { display: flex; flex-direction: column; gap: var(--space-lg); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 600; line-height: 1.5; }
.segmented { display: flex; align-items: center; background: var(--color-paper-2); border-radius: var(--radius-group); padding: var(--space-2xs); gap: var(--space-2xs); }
.segmented label { min-width: 0; flex: 1; display: flex; align-items: center; cursor: pointer; position: relative; }
.segmented input { appearance: none; width: 0; height: 0; margin: 0; flex: 0; }
.segmented span { display: flex; justify-content: center; align-items: center; flex: 1; min-width: 0; min-height: 44px; padding: var(--space-xs); border-radius: var(--radius-control); font-size: var(--text-sm); font-weight: 500; line-height: 1.4; color: var(--color-muted); white-space: nowrap; }
.segmented input:checked + span { background: var(--color-paper); color: var(--color-ink); box-shadow: var(--shadow-control); }
.segmented label:hover span { color: var(--color-ink); }
.segmented input:focus-visible { outline: 0; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: -2px; border-radius: var(--radius-control); }
.segmented label:active span { background: var(--color-paper-3); }
.segmented input:disabled + span { opacity: .6; cursor: not-allowed; }
.clef-options { gap: var(--space-xs); background: var(--color-transparent); padding: 0; }
.clef-options label > span { min-height: 104px; padding: var(--space-2xs); background: var(--color-paper-2); border: 1px solid var(--color-transparent); }
.clef-options input:checked + span { border-color: var(--color-ink); background: var(--color-paper-3); box-shadow: none; }
.clef-options svg { width: 144px; max-width: 100%; height: 96px; }
.custom-settings { display: flex; flex-direction: column; gap: var(--space-xs); border-bottom: 1px solid var(--color-rule); padding-bottom: var(--space-md); }
.custom-row > label:first-child { font-weight: 600; }
.custom-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 44px; font-size: var(--text-sm); }
select { min-height: 44px; min-width: 88px; border: 1px solid var(--color-muted); border-radius: var(--radius-control); background: var(--color-paper); color: var(--color-ink); padding: var(--space-xs) var(--space-sm); cursor: pointer; }
.switch { display: flex; align-items: center; gap: var(--space-xs); position: relative; min-height: 44px; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { width: 44px; height: 26px; border-radius: var(--radius-pill); background: var(--color-muted); padding: var(--space-3xs); display: block; }
.switch-track::before { content: ''; display: block; width: 22px; height: 22px; border-radius: var(--radius-pill); background: var(--color-paper); }
.switch input:checked ~ .switch-track { background: var(--color-ink); }
.switch input:checked ~ .switch-track::before { transform: translateX(18px); }
.switch input:focus-visible ~ .switch-track { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.switch-label { color: var(--color-muted); min-width: 28px; }
.button { width: 100%; min-height: 52px; border-radius: var(--radius-group); font-weight: 600; white-space: nowrap; padding: var(--space-sm) var(--space-lg); }
.primary { color: var(--color-accent-ink); background: var(--color-accent); }
.primary:hover:not(:disabled) { background: var(--color-accent-deep); }
#start-button { margin-top: 0; }
.ad-slot:not([hidden]):not(:empty) { margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); text-align: center; }
.ad-slot:empty { display: none; }
.practice-screen { max-width: 640px; margin-inline: auto; }
.practice-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: 0; }
.text-button { min-height: 44px; padding: var(--space-xs) var(--space-sm); font-size: var(--text-sm); font-weight: 400; line-height: 1.4; color: var(--color-muted); border-radius: var(--radius-control); white-space: nowrap; }
.text-button:hover { color: var(--color-ink); background: var(--color-paper-2); }
.progress { font-size: var(--text-sm); font-weight: 400; line-height: 1.4; color: var(--color-muted); font-variant-numeric: tabular-nums; padding-right: var(--space-sm); }
.score { width: 100%; max-width: 640px; height: 240px; margin-inline: auto; }
.score svg { width: 100%; height: 100%; overflow: visible; }
.answer-area { max-width: 640px; margin-inline: auto; }
.accidental-field { margin: 0 auto var(--space-xs); width: 188px; }
.accidental-options span { font-size: var(--text-xl); line-height: 1; }
.answer-buttons { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-xs); }
.answer-button { min-height: 64px; padding: var(--space-sm) var(--space-2xs); border: 1px solid var(--color-rule-strong); border-radius: var(--radius-control); background: var(--color-paper); font-size: var(--text-lg); font-weight: 500; line-height: 1.4; white-space: nowrap; }
.answer-button:hover:not(:disabled) { background: var(--color-paper-2); }
.answer-button.is-correct { background: var(--color-success-soft); border-color: var(--color-success); color: var(--color-success); opacity: 1; }
.answer-button.is-wrong { background: var(--color-error-soft); border-color: var(--color-error); color: var(--color-error); opacity: 1; }
.feedback { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; margin-top: var(--space-xs); font-size: var(--text-md); text-align: center; }
.feedback[data-state="correct"] { color: var(--color-success); }
.feedback[data-state="wrong"] { color: var(--color-error); }
.feedback-answer { color: var(--color-ink); }
.results-screen { text-align: center; max-width: 440px; margin: 0 auto; }
.results-screen h1 { font-size: var(--text-xl); }
.result-accuracy { margin-top: var(--space-lg); font-size: 5.5rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.percent { font-size: 2rem; margin-left: var(--space-xs); letter-spacing: 0; }
.result-count { color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; margin-bottom: var(--space-xl); }
#home-button { margin-top: var(--space-md); }
.app-error, .storage-notice { font-size: var(--text-sm); margin-top: var(--space-lg); min-height: 1.5em; }
.app-error { color: var(--color-error); }
.storage-notice { color: var(--color-muted); }
@media (max-width: 600px) {
  .app-header { min-height: 68px; padding: var(--space-sm) var(--space-lg); }
  .app-main { min-height: calc(100svh - 68px); padding: var(--space-md); }
  #setup-form { gap: var(--space-lg); }
  .score { height: 240px; }
  .answer-buttons { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .answer-button { grid-column: span 2; min-height: 60px; padding-block: var(--space-xs); }
  .answer-button:nth-child(5) { grid-column: 2 / span 2; }
}
@media (max-height: 700px) {
  .app-main { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
  .score { height: 220px; }
  .practice-toolbar { margin-bottom: var(--space-xs); }
}
