.practice-actions { display:flex; gap:12px; margin:0 0 20px; }
.practice-actions button { min-height:50px; padding:14px 20px; border:1px solid #40536a; border-radius:16px; color:#fff7ec; font:700 15px inherit; cursor:pointer; background:#142335; }
.practice-actions #practice-start { flex:1; background:#b82931; border-color:#ce4549; font-weight:800; }
.practice-actions #practice-start.is-listening { background:#26384a; border-color:#40536a; }
.practice-actions button:focus-visible { outline:3px solid #e8b32a; outline-offset:3px; }
.practice-actions button:disabled { opacity:.6; cursor:wait; }
:root {
  color-scheme: dark;
  font-family: Inter, ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #09111c;
  color: #f5ead8;
  --panel: #111d2a;
  --panel-2: #172535;
  --line: #27384a;
  --muted: #8fa0b3;
  --accent: #628d3e;
  --accent-dark: #26371c;
  --warning: #e0aa25;
  --danger: #b82d31;
  --anno-green: #628d3e;
  --anno-blue: #3475ad;
  --anno-gold: #e0aa25;
  --anno-red: #b82d31;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #09111c; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 7%, rgba(52,117,173,.18), transparent 27rem),
    radial-gradient(circle at 91% 31%, rgba(184,45,49,.11), transparent 24rem),
    linear-gradient(135deg, transparent 0 72%, rgba(224,170,37,.055) 72% 72.35%, transparent 72.35%),
    linear-gradient(25deg, transparent 0 81%, rgba(98,141,62,.05) 81% 81.35%, transparent 81.35%),
    #09111c;
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; touch-action: manipulation; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 15px); grid-template-rows: repeat(2, 15px); gap: 1px; width: 31px; height: 31px; font-family: "Arial Black", Futura, sans-serif; font-size: 14px; font-weight: 950; line-height: 15px; letter-spacing: -2px; }
.brand-mark i { font-style: normal; text-align: center; }
.brand-mark i:nth-child(1) { color: var(--anno-green); }
.brand-mark i:nth-child(2) { color: var(--anno-blue); }
.brand-mark i:nth-child(3) { color: var(--anno-gold); }
.brand-mark i:nth-child(4) { color: var(--anno-red); }
.brand-lockup .eyebrow { color: #f5ead8; font-family: Futura, "Avenir Next", Avenir, sans-serif; font-size: 1.28rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
#target-card[hidden] { display: none; }
.piano-key-prompt { margin: 4px 0 14px; color: var(--target-color, var(--accent)); font-size: 1.15rem; font-weight: 800; }
.piano-key-prompt:empty { display: none; }
.piano-keyboard .rhythm-cue-marker, .piano-keyboard .rhythm-timing-ring { display: none; }
.utility-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.utility-actions { display: flex; align-items: center; gap: 8px; }
.guided-link { min-height: 40px; display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid var(--anno-green); color: #c7ddaf; font-size: .76rem; font-weight: 850; text-decoration: none; }
.guided-link:hover { background: #17271f; color: #fff; }
.tour-open { margin: 0; }
.account-button { min-height: 38px; padding: 7px 13px; border: 1px solid var(--anno-green); border-radius: 0; background: transparent; color: #f5ead8; font-size: .78rem; font-weight: 850; cursor: pointer; }
.account-button.profile-button { width: 40px; height: 40px; min-height: 40px; padding: 0; overflow: hidden; border: 2px solid var(--anno-blue); border-radius: 50%; }
.account-avatar { width: 100%; height: 100%; display: grid; place-items: center; background: var(--panel-2) center/cover no-repeat; color: #f5ead8; font-size: .9rem; font-weight: 900; }
.account-dialog { width: min(430px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 0; padding: 28px; background: var(--panel); color: #f5ead8; box-shadow: 0 24px 100px #000a; }
.account-dialog::backdrop { background: #03060cce; backdrop-filter: blur(7px); }
.account-dialog h2 { margin: 8px 32px 12px 0; font-size: 1.8rem; line-height: 1.1; }
.account-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--panel-2); color: var(--muted); font-size: 1.5rem; cursor: pointer; }
.account-copy { color: #c5cfdd; line-height: 1.55; }
.account-benefits { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; color: #c5cfdd; font-size: .86rem; line-height: 1.4; }
.account-benefits li { position: relative; padding-left: 22px; }
.account-benefits li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }
#account-form { display: grid; gap: 10px; margin-top: 20px; }
#account-form label { color: var(--muted); font-size: .78rem; font-weight: 800; }
#account-form input { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: #0d121b; color: white; font: inherit; }
#account-form button, #account-sign-out { min-height: 48px; margin-top: 4px; border-radius: 12px; border: 0; font-weight: 850; cursor: pointer; }
#account-sign-out { width: 100%; }
.account-message { min-height: 1.3em; margin: 14px 0 0; color: var(--accent); font-size: .82rem; line-height: 1.45; }
.account-message.error { color: var(--danger); }
.profile-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.profile-heading h2, .profile-heading p { margin-top: 0; margin-bottom: 4px; }
.profile-photo { position: relative; flex: 0 0 78px; width: 78px; height: 78px; display: grid; place-items: center; overflow: hidden; border: 3px solid var(--anno-blue); border-radius: 50%; background: var(--panel-2); color: #f5ead8; font-size: 1.5rem; font-weight: 900; cursor: pointer; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-edit { position: absolute; right: 2px; bottom: 2px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--anno-gold); color: #09111c; font-size: 17px; line-height: 1; }
.profile-photo-message { min-height: 1.25em; margin: 10px 0 16px; color: var(--muted); font-size: .76rem; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 18px 0 24px; background: var(--line); border: 1px solid var(--line); }
.profile-stats div { min-width: 0; padding: 14px 9px; background: var(--panel-2); text-align: center; }
.profile-stats strong, .profile-stats span { display: block; }
.profile-stats strong { color: #f5ead8; font-size: 1.35rem; }
.profile-stats span { margin-top: 4px; color: var(--muted); font-size: .66rem; line-height: 1.25; }
.profile-history { margin-bottom: 18px; }
.profile-song-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); color: #c5d0dc; font-size: .8rem; }
.profile-song-row strong { color: #f5ead8; }
.profile-empty { padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.profile-sync { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .72rem; }
.profile-sync span { width: 7px; height: 7px; border-radius: 50%; background: var(--anno-green); }
.friends-open { width: 100%; min-height: 48px; margin: 4px 0 16px; border: 1px solid var(--anno-blue); background: #122943; color: #d9ecff; font-weight: 900; cursor: pointer; }
.friends-dialog { width: min(540px,calc(100% - 28px)); max-height: calc(100dvh - 30px); overflow-y: auto; }
.friends-dialog h3 { margin: 24px 0 9px; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.friend-name { display: grid; gap: 6px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.friend-name input,#friend-add-form input { min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); background: #0d1723; color: white; }
#friend-save-name { min-height: 38px; margin-top: 8px; border: 1px solid var(--line); }
.friend-code { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; margin-top: 18px; padding: 14px; border-left: 5px solid var(--anno-gold); background: var(--panel-2); }.friend-code span { grid-column: 1/-1; color: var(--muted); font-size: .7rem; text-transform: uppercase; }.friend-code strong { font-size: 1.35rem; letter-spacing: .14em; }.friend-code button,#friend-add-form button,.friend-action { min-height: 38px; border: 0; background: var(--anno-green); color: white; font-weight: 850; cursor: pointer; }
#friend-add-form { margin-top: 20px; }#friend-add-form>label { display:block;margin-bottom:7px;font-size:.78rem;font-weight:850}#friend-add-form>div{display:grid;grid-template-columns:1fr auto;gap:7px}#friend-add-form input{text-transform:uppercase;letter-spacing:.12em}.friends-list{display:grid;gap:8px}.friend-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:12px;border:1px solid var(--line);background:#0d1723}.friend-person{display:flex;align-items:center;gap:11px;min-width:0}.friend-avatar{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;overflow:hidden;border:1px solid #54667a;border-radius:50%;background:#172536;color:var(--cream);font-size:.9rem;font-weight:850;background-position:center;background-size:cover}.friend-avatar.has-photo{color:transparent}.friend-copy{min-width:0}.friend-row b,.friend-row small{display:block}.friend-row small{margin-top:4px;color:var(--muted);font-size:.7rem}.friend-actions{display:flex;gap:6px}.friend-action{padding:6px 10px}.friend-action.secondary{border:1px solid var(--line);background:var(--panel-2);color:#dce5ef}.friends-empty{margin:0;padding:12px;border:1px dashed var(--line);color:var(--muted);font-size:.75rem}
#welcome-tour { width: min(480px, calc(100% - 28px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 0; border-radius: 0; padding: 26px; background: var(--panel); color: #f5ead8; box-shadow: 0 24px 100px #000a; }
#welcome-tour::backdrop { background: #03060cce; backdrop-filter: blur(7px); }
.tour-close { display:grid; place-items:center; width:34px; height:34px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); font-size:1.55rem; line-height:1; cursor:pointer; }
.tour-close:hover,.tour-close:focus-visible { background:#ffffff0d; color:#fff8ec; }
.tour-top, .tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#tour-count { color: var(--muted); font-size: 13px; }
.tour-art { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 125px; margin: 18px 0; border-radius: 18px; background: radial-gradient(ellipse at center, #294638, #19222d); color: var(--accent); font-size: 48px; font-weight: 900; }
.tour-art span { padding: 12px; border: 1px solid color-mix(in srgb, var(--anno-blue) 55%, transparent); border-radius: 14px; font-size: 25px; }
.tour-art button { min-width: 132px; padding: 18px 16px; border: 1px solid #52677d; background: #0d1723; color: #fff8ec; text-align: left; cursor: pointer; }
.tour-art button b,.tour-art button small { display: block; }.tour-art button small { margin-top: 5px; color: var(--muted); }.tour-art button.selected { border: 3px solid var(--anno-gold); background: #172a3d; }
.tour-art .tour-logo { border: 0; color: var(--anno-gold); font-size: 31px; line-height: .78; letter-spacing: .12em; }.tour-art .tour-logo.compact { padding: 8px; font-size: 20px; }
.tour-art>b { color: #fff8ec; font-size: 21px; line-height: 1.3; }.tour-art .tour-hand { padding: 9px; font-size: 13px; }.tour-art .tour-neck { font-size: 18px; line-height: 1.7; }.tour-art .tour-mic { background: var(--anno-red); color: white; }
#tour-title { font-size: clamp(25px, 6vw, 34px); line-height: 1.12; margin: 12px 0; }
#tour-copy { line-height: 1.65; color: #d9e1ed; }
.tour-interaction:empty { display: none; }.tour-interaction { display: grid; gap: 10px; margin: 18px 0; }.tour-instrument-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.tour-instrument-choices button,.tour-mic-start { min-height: 58px; padding: 12px; border: 1px solid #52677d; background: #0d1723; color: #fff8ec; font-weight: 850; cursor: pointer; }.tour-instrument-choices button.selected { border: 3px solid var(--anno-gold); background: #172a3d; }.tour-orientation-status { margin: 0; color: var(--muted); font-size: .84rem; }.tour-orientation-status.success { color: #8ebc68; font-weight: 850; }
.tour-piano-setup { position: relative; padding-top: 46px; }.tour-middle-logo { position: absolute; top: 0; left: 64.3%; translate: -50% 0; color: var(--anno-gold); font-weight: 950; font-size: 14px; line-height: .78; letter-spacing: .08em; text-align: center; }.tour-keyboard { position:relative; display: grid; grid-template-columns: repeat(7,1fr); height: 108px; border: 1px solid #738399; background: #fff8ec; }.tour-key { position: relative; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 9px; border-right: 1px solid #738399; color: #111923; font-size: .7rem; font-weight: 900; }.tour-key.middle { background: #eaf3de; box-shadow: inset 0 0 0 3px var(--anno-gold); }.tour-key.heard { background: #8ebc68; color: #07130a; }.tour-key small { position: absolute; top: 68px; font-size: .62rem; color: #5c6671; }.tour-black-key { position:absolute; z-index:3; top:0; width:8%; height:62%; translate:-50% 0; background:linear-gradient(90deg,#080d14,#202a35 72%,#060a0f); border:1px solid #030507; box-shadow:0 4px 4px #0007; pointer-events:none; }.tour-black-key.k1{left:14.285%}.tour-black-key.k2{left:28.57%}.tour-black-key.k3{left:42.855%}.tour-black-key.k4{left:71.425%}.tour-black-key.k5{left:85.71%}
.tour-tip { font-size: 14px; line-height: 1.6; color: var(--muted); min-height: 45px; }
.tour-dots { display: flex; gap: 7px; justify-content: center; margin: 24px 0; }
.tour-dots i { width: 7px; height: 7px; border-radius: 9px; background: var(--line); }
.tour-dots i.current { width: 25px; background: var(--accent); }
.tour-actions button { flex: 1; min-height: 48px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; font-weight: 800; cursor: pointer; }
.tour-actions .primary-button { background: var(--accent); color: #092417; }
.tour-actions .secondary-button { background: var(--panel-2); color: #f1f4f8; }
.tour-actions button:disabled { opacity: .4; cursor: default; }

.instrument-panel-toolbar { position: absolute; z-index: 11; top: 12px; left: 12px; right: 72px; display: flex; align-items: center; gap: 8px; }
.instrument-picker, .guitar-mode-picker { display: flex; gap: 3px; padding: 3px; background: #111f2e; border: 1px solid #46627e; }
.instrument-picker button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.instrument-picker button svg { width: 23px; height: 23px; fill: currentColor; }
.instrument-picker button[aria-pressed="true"] { background: var(--anno-blue); color: #fff8ec; }
.instrument-picker button:focus-visible, .guitar-mode-picker button:focus-visible { outline: 3px solid white; outline-offset: 1px; }
.guitar-mode-picker[hidden] { display: none; }
.guitar-mode-picker button { min-height: 36px; padding: 6px 10px; border: 0; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 850; cursor: pointer; }
.guitar-mode-picker button[aria-pressed="true"] { background: var(--anno-gold); color: #09111c; }
.piano-tuning-control { display: grid; gap: 7px; margin-top: 18px; color: var(--muted); font-size: .8rem; }
.piano-tuning-control[hidden] { display: none; }
.piano-tuning-control select { width: 100%; min-height: 44px; padding: 9px; border: 1px solid var(--line); border-radius: 0; background: var(--panel); color: #f5ead8; font: inherit; }
.piano-tuning-control small { line-height: 1.4; }
.fretboard.piano-keyboard { display: block; position: relative; height: 190px; margin: 12px 0; overflow: visible; }
.piano-key { position: absolute; top: 0; border: 1px solid #667080; border-radius: 0 0 6px 6px; }
.piano-key span { position: absolute; bottom: 12px; width: 100%; text-align: center; font-size: clamp(8px, 2vw, 12px); font-weight: 800; }
.white-key { height: 100%; background: #eef1f6; color: #17212d; }
.black-key { height: 62%; z-index: 2; background: #171c27; color: #e4eaf1; border-color: #05080e; box-shadow: 0 3px 4px #0008; }
.piano-key.active { background: var(--target-color, var(--accent)); color: #101820; box-shadow: inset 0 0 0 3px #fff8; }
.piano-finger { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 20px; height: 23px; border-radius: 12px; background: #263647; color: white; font-size: 13px; }
.piano-key.active .piano-finger { background: #092417; color: white; }
.piano-finger { width: 25px; font-size: 11px; }
.piano-finger.hovering { background: #eef1f6; color: #263647; border: 1px dashed #526780; }
.fretboard.chord-board { display: block; min-height: 250px; padding: 10px 4px; }
.web-chord-diagram { display: grid; gap: 4px; max-width: 410px; margin: 0 auto; }
.web-chord-row { display: grid; grid-template-columns: 24px 13px repeat(4, 1fr) 24px; align-items: center; min-height: 36px; }
.web-chord-row strong { color: var(--muted); }
.web-chord-row i { height: 2px; background: #d9e1ed; }
.web-chord-cell { position: relative; height: 36px; border-left: 2px solid #59677a; }
.web-chord-cell:last-of-type { border-right: 2px solid #59677a; }
.web-chord-cell::before { content: ""; position: absolute; z-index: 0; top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); background: #d9e1ed; }
.web-chord-cell b { position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; place-items: center; width: 27px; height: 27px; transform: translate(-50%, -50%); border: 3px solid #263b34; border-radius: 50%; background: var(--target-color, var(--accent)); color: #08150e; font-size: 12px; }
.web-chord-row em { color: #eef3fa; text-align: center; font-size: 19px; font-style: normal; }
.web-chord-fingers { color: var(--muted); font-size: .78rem; line-height: 1.6; text-align: center; }
.strum-pattern { margin: 16px 0 4px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #111722; }
.chord-flow { display: flex !important; align-items: center; justify-content: center !important; gap: 7px !important; margin: 0 0 13px; overflow: visible !important; }
.chord-flow span { min-width: 43px; padding: 8px 7px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: .78rem; font-weight: 900; text-align: center; }
.chord-flow span.active { border-color: var(--target-color, var(--accent)); background: var(--target-color, var(--accent)); color: #fff8ec; box-shadow: none; }
.chord-flow b { color: #59677a; font-size: .72rem; }
.strum-pattern > p { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.strum-pattern > p strong { font-size: .83rem; }
.strum-pattern > p span { color: var(--muted); font-size: .7rem; text-align: right; }
.pattern-note { display: block; margin: -3px 0 10px; color: var(--target-color, var(--accent)); font-size: .7rem; font-weight: 700; }
.strum-pattern > div { display: flex; justify-content: flex-start; gap: 9px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.strum-step { position: relative; display: grid; grid-template-rows: auto 1fr auto; place-items: center; width: 67px; min-height: 82px; padding: 8px 5px 5px; border-radius: 11px; background: var(--panel-2); }
.strum-step.quick { margin-left: -5px; border: 1px solid color-mix(in srgb, var(--anno-gold) 55%, transparent); }
.strum-step small { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.strum-step b { color: var(--target-color, var(--accent)); font-size: 31px; line-height: 1; }
.strum-step em { color: #647186; font-size: .62rem; font-style: normal; }
.strum-step.active { outline: 3px solid var(--target-color, var(--accent)); background: color-mix(in srgb, var(--target-color, var(--accent)) 22%, var(--panel-2)); transform: translateY(-2px); }
.strum-step.active small { color: #f5ead8; }
.strum-step.active em { color: var(--target-color, var(--accent)); font-weight: 900; letter-spacing: .08em; }
@media (max-width: 400px) {
  .strum-step { flex: 0 0 53px; width: 53px; min-height: 78px; }
  .strum-pattern > div { gap: 6px; }
}
.piano-hand[hidden] { display: none; }
.piano-hand { text-align: center; }
.hands-row { display: flex; gap: 12px; }
.hand-panel { flex: 1; min-width: 0; }
.hand-caption { color: var(--muted); font-size: .75rem; font-weight: 800; margin: 0 0 5px; }
.piano-hand svg { width: 100%; height: auto; max-height: 220px; overflow: visible; }
.hand-palm, .hand-wrist { fill: #29374b; stroke: #46627e; stroke-width: 2; }
.hand-wrist { stroke-linejoin: round; }
.hand-digit { fill: #17283a; stroke: #657991; stroke-width: 2; transition: fill 120ms ease, filter 120ms ease; }
.hand-digit.playing { fill: var(--target-color, var(--anno-green)); stroke: #f7f0e4; stroke-width: 3; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--target-color, var(--anno-green)) 48%, transparent)); }
.hand-eye { fill: #f7f0e4; }
.hand-smile { fill: none; stroke: var(--anno-gold); stroke-width: 4; stroke-linecap: round; }
.hand-tip circle { fill: #09111c; stroke: #657991; stroke-width: 1.5; }
.hand-tip.finger-1 circle { fill: var(--anno-red); }
.hand-tip.finger-2 circle { fill: var(--anno-gold); }
.hand-tip.finger-3 circle { fill: var(--anno-green); }
.hand-tip.finger-4 circle { fill: var(--anno-blue); }
.hand-tip.finger-5 circle { fill: var(--anno-red); }
.hand-tip.playing circle { fill: var(--target-color, var(--anno-green)); stroke: #f7f0e4; stroke-width: 3; }
.hand-number, .hand-key { text-anchor: middle; fill: #fff; font-family: inherit; font-weight: 800; }
.hand-number { font-size: 17px; }
.hand-tip.playing .hand-number { fill: #09111c; }
.hand-key { font-size: 14px; paint-order: stroke; stroke: #131b28; stroke-width: 4; stroke-linejoin: round; }
.piano-key .rhythm-cue-marker, .piano-key .rhythm-timing-ring { position: absolute; left: 50%; top: 58%; margin-left: -12px; width: 24px; height: 24px; z-index: 4; }

.app-shell {
  width: min(calc(100% - 32px), 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

/* Experienced piano scores use a fixed, full-range desktop keyboard. Keeping
   every key visible prevents the target from feeling as if the keyboard moved. */
.app-shell.advanced-piano {
  width: min(calc(100% - 32px), 1600px);
  padding-inline: clamp(16px, 3vw, 48px);
}

.advanced-piano .fretboard-card { padding: 24px 22px 20px; }
.advanced-piano .piano-hand { width: min(100%, 1080px); margin-inline: auto; }
.advanced-piano .fretboard.piano-keyboard { height: 240px; }
.advanced-piano .piano-key { transition: none; }
.advanced-piano .piano-key span { font-size: clamp(8px, .72vw, 12px); }
.advanced-piano .piano-finger { width: 27px; }

@media (max-width: 850px) {
  .app-shell.advanced-piano { width: calc(100% - 32px); padding-inline: 10px; }
  .advanced-piano .fretboard-card { padding-inline: 8px; }
  .advanced-piano .fretboard.piano-keyboard { height: 180px; }
}

.topbar, .target-row, .heard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow, .section-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.song-select {
  width: min(255px, 68vw);
  margin: 0;
  padding: 2px 28px 2px 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: #f5ead8;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 850;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  cursor: pointer;
}
.song-select option { background: var(--panel); color: #f5ead8; }
.song-select:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.song-heading-row { display: flex; align-items: center; gap: 9px; }
.song-stats-disclosure { position: relative; flex: 0 0 auto; }
.song-stats-disclosure summary { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #46627e; border-radius: 50%; background: #111f2e; color: #c8d6e5; cursor: pointer; list-style: none; }
.song-stats-disclosure summary::-webkit-details-marker { display: none; }
.song-stats-disclosure summary:hover { border-color: var(--anno-blue); background: #172a3d; color: #fff8ec; }
.song-stats-disclosure summary:focus-visible { outline: 3px solid #fff8ec; outline-offset: 3px; }
.song-stats-disclosure summary svg { width: 18px; height: 18px; fill: currentColor; }
.song-stats-disclosure[open] summary { border-color: var(--anno-gold); color: var(--anno-gold); }
.song-stats {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: min(310px, 78vw);
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #46627e;
  background: #111f2e;
  box-shadow: 0 12px 32px #0008;
  color: #dce7f1;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.45;
}

.progress {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dce2ed;
  font-weight: 750;
}

.target-card, .fretboard-card, .listening-card {
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 20px;
  background: rgba(21,25,35,.94);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}

.target-card { padding: 18px 20px 20px; }

.target-note {
  margin: 0;
  color: var(--target-color, var(--accent));
  font-size: clamp(3.8rem, 20vw, 6.2rem);
  font-weight: 850;
  line-height: .95;
  letter-spacing: -.065em;
}

.target-position { margin: 8px 0 0; color: #d9e0eb; font-size: 1.08rem; font-weight: 700; }

.finger-guide {
  display: grid;
  justify-items: center;
  max-width: 110px;
  color: #dce2eb;
  font-size: .84rem;
  font-weight: 700;
  text-align: center;
}

.finger-icon { color: var(--target-color, var(--accent)); font-size: 2rem; }

.fretboard-card { padding: 18px 14px 14px; overflow: hidden; }
.fretboard-card.rhythm-mode { border-color: #597da9; box-shadow: 0 0 0 1px rgba(89,125,169,.25), 0 12px 40px rgba(0,0,0,.25); }

.fretboard {
  position: relative;
  display: grid;
  grid-template-columns: 22px 10px repeat(12, 1fr);
  grid-template-rows: repeat(6, 17px) 20px;
  width: 100%;
  user-select: none;
}
.fretboard.guitar-strings {
  grid-template-columns: 24px 10px repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(6, 45px) 22px;
  padding: 8px 28px 8px 8px;
}
.guitar-strings .string-label { font-size: .72rem; }
.guitar-strings .string-line { background: #30465a; opacity: 1; }
.guitar-strings .string-line.active { background: #fff8ec; box-shadow: 0 0 10px rgba(255,248,236,.24); }

.string-label { align-self: center; color: var(--muted); font-size: .62rem; font-weight: 800; text-align: center; }
.string-line { align-self: center; height: var(--thickness); background: #9ea7b6; opacity: .68; }
.string-line.active { background: var(--target-color, var(--accent)); opacity: 1; box-shadow: 0 0 8px color-mix(in srgb, var(--target-color, var(--accent)) 45%, transparent); }
.nut { grid-column: 2; width: 7px; height: 100%; justify-self: center; background: #e6e9ed; border-radius: 2px; }
.nut.capo-nut { width: 11px; background: var(--anno-red); box-shadow: 0 0 12px rgba(184,45,49,.45); }
.nut.capo-nut::after {
  content: attr(data-capo);
  position: absolute;
  translate: -22px -25px;
  width: 54px;
  color: #f3ecdf;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}
.fret-wire { border-right: 2px solid #687184; border-top: 1px solid transparent; }
.fret-number { align-self: end; color: var(--muted); font-size: .62rem; text-align: center; }
.fret-marker {
  z-index: 3;
  place-self: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--target-color, var(--anno-red));
  color: #fff8ec;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 48px;
  text-align: center;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--target-color, var(--anno-red)) 18%, transparent), 0 0 18px color-mix(in srgb, var(--target-color, var(--anno-red)) 72%, transparent);
}
.fret-marker.open {
  width: 48px;
  height: 48px;
  border: 2px solid var(--target-color, var(--anno-red));
  background: #101c29;
  line-height: 42px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--target-color, var(--anno-red)) 16%, transparent);
}
.chord-shape-marker {
  z-index: 2;
  place-self: center;
  width: 28px;
  height: 28px;
  border: 2px solid #8094aa;
  border-radius: 50%;
  background: #152435;
  color: #d9e3ed;
  font-size: .76rem;
  font-weight: 900;
  line-height: 24px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.28);
}
.chord-shape-marker.open { background: #0d1722; color: #aebdcb; }
.chord-shape-marker.muted { border-color: transparent; background: transparent; color: #73869a; font-size: 1rem; box-shadow: none; }
.guitar-strings[data-picking-chord]::before {
  content: attr(data-picking-chord) " chord shape";
  position: absolute;
  z-index: 6;
  top: -3px;
  left: 42px;
  padding: 4px 8px;
  border: 1px solid #344b61;
  border-radius: 999px;
  background: #101c29;
  color: #dbe5ef;
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.rhythm-cue-marker {
  z-index: 4;
  place-self: center;
  width: 19px;
  height: 19px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 14px rgba(255,197,104,.7);
}
.rhythm-cue-marker.open { background: var(--panel); border-color: var(--warning); }
.rhythm-timing-ring {
  z-index: 5;
  place-self: center;
  width: 25px;
  height: 25px;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255,255,255,.55);
  pointer-events: none;
  animation: rhythm-ring-land var(--cue-duration, 1s) linear forwards;
}
@keyframes rhythm-ring-land {
  from { opacity: .35; transform: scale(3.1); }
  72% { opacity: .85; }
  to { opacity: 1; transform: scale(1); }
}

.fretboard-hint { margin: 8px 2px 0; color: var(--muted); font-size: .78rem; text-align: center; }

.listening-card { padding: 17px 20px 18px; }
.heard-note { margin: 0; font-size: 2.5rem; font-weight: 850; letter-spacing: -.04em; }
.tuning-status { margin: 0; border-radius: 999px; padding: 8px 12px; font-weight: 800; }
.tuning-status.idle { background: #272d3a; color: var(--muted); }
.tuning-status.good { background: var(--accent-dark); color: var(--accent); }
.tuning-status.off { background: #392c1c; color: var(--warning); }

.meter { margin-top: 14px; }
.meter-track { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--anno-red), var(--anno-gold) 34%, var(--anno-green) 50%, var(--anno-gold) 66%, var(--anno-red)); }
.meter-center { position: absolute; left: 50%; top: -4px; width: 2px; height: 20px; background: #fff; opacity: .8; }
.meter-needle { position: absolute; left: 50%; top: -6px; width: 4px; height: 24px; border-radius: 2px; background: #fff; box-shadow: 0 1px 6px #000; transform: translateX(-50%); transition: left 90ms linear; }
.meter-labels { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: .67rem; font-weight: 700; }
.mic-detail { min-height: 1.2em; margin: 13px 0 0; color: var(--muted); font-size: .83rem; text-align: center; }

.challenge-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #3f526d;
  border-radius: 14px;
  background: #121d2d;
}
.challenge-panel[hidden] { display: none; }
.rhythm-highway {
  position: relative;
  height: 152px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #344966;
  border-radius: 12px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--anno-blue) 12%, transparent), transparent 28%),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(255,255,255,.055) 25%);
}
.highway-lane {
  position: absolute;
  right: 0;
  left: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, #57708f, #293b53);
}
.highway-hit-line {
  position: absolute;
  z-index: 3;
  left: 18%;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: none;
}
.highway-hit-line span {
  position: absolute;
  bottom: 3px;
  left: 7px;
  color: var(--accent);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.highway-notes { position: absolute; inset: 0; }
.highway-note {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 4px 7px;
  border: 3px solid #c8d8ed;
  border-radius: 13px;
  background: #233650;
  box-shadow: 0 7px 14px rgba(0,0,0,.32);
  color: #fff;
  font-weight: 900;
  line-height: 1;
  will-change: transform;
}
.highway-note small { color: #afc0d6; font-size: .52rem; font-weight: 800; white-space: nowrap; }
.highway-note.active { border-color: var(--warning); background: #4a351c; box-shadow: 0 0 18px rgba(255,197,104,.55); }
.highway-note.hit { border-color: var(--accent); background: #17422e; color: var(--accent); }
.highway-note.missed { border-color: var(--danger); background: #48232a; color: #ffb1b9; opacity: .8; }
.highway-countdown {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(9,13,20,.58);
  color: #fff;
  font-size: 4rem;
  font-weight: 950;
  text-shadow: 0 6px 24px #000;
}
.highway-countdown[hidden] { display: none; }
.challenge-status { margin: 0 0 9px; color: #bcd5ff; font-size: .82rem; font-weight: 850; text-align: center; }
.challenge-results { display: flex; justify-content: space-around; gap: 8px; color: var(--muted); font-size: .7rem; text-align: center; }
.challenge-results span { display: grid; gap: 2px; }
.challenge-results span[hidden] { display: none; }
.challenge-results strong { color: #f5ead8; font-size: 1rem; }

.success-banner {
  position: fixed;
  z-index: 10;
  top: max(22px, env(safe-area-inset-top));
  left: 50%;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #082719;
  box-shadow: 0 12px 35px rgba(0,0,0,.45);
  font-size: 1.15rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -20px) scale(.92);
  transition: opacity .18s, transform .18s;
}
.success-banner.visible { opacity: 1; transform: translate(-50%, 0) scale(1); }

.guided-session-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; padding:11px 13px; border:1px solid var(--line); border-left:7px solid var(--anno-gold); background:#111d2a; }
.guided-session-bar[hidden] { display:none; }
.guided-session-copy { display:grid; gap:3px; min-width:0; }
.guided-session-bar span { color:var(--anno-gold); font-size:.68rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.guided-session-bar strong { color:#fff8ec; font-size:.9rem; }
.guided-session-bar a { color:#aebdcb; font-size:.75rem; font-weight:800; }
.guided-session-clock { display:grid; gap:1px; justify-items:end; margin-left:auto; padding-left:14px; border-left:1px solid var(--line); }
.guided-session-clock small { color:var(--muted); font-size:.58rem; font-weight:850; letter-spacing:.09em; text-transform:uppercase; }
.guided-session-clock time { min-width:5ch; color:var(--anno-gold); font-variant-numeric:tabular-nums; font-size:1.15rem; font-weight:950; letter-spacing:.04em; }
.guided-last-score { width:max-content; margin-top:3px; padding:3px 7px; border-left:4px solid var(--anno-blue); background:#16283b; color:#d9e9fa; font-size:.7rem; font-weight:850; }
.guided-last-score[hidden] { display:none; }
.guided-piano-picker { width:min(96vw,760px); }
.guided-piano-picker-choices { display:flex; align-items:stretch; min-height:220px; margin:22px 0 12px; padding:0 4px 4px; background:#0b121c; overflow-x:auto; }
.guided-piano-choice { position:relative; display:flex; flex:1 0 88px; flex-direction:column; justify-content:flex-end; align-items:center; gap:8px; min-height:210px; padding:72px 7px 14px; border:1px solid #778493; border-right:0; background:#f6f1e7; color:#101823; text-align:center; }
.guided-piano-choice:last-child { border-right:1px solid #778493; }
.guided-piano-choice b { font-size:1.15rem; }
.guided-piano-song-title { min-height:3.6em; font-size:.68rem; font-weight:900; line-height:1.2; }
.guided-piano-landmark { position:absolute; z-index:4; top:20px; left:50%; transform:translateX(-50%); display:grid; grid-template-columns:repeat(2,14px); grid-template-rows:repeat(2,14px); width:30px; height:30px; padding:1px; background:#09111c; box-shadow:0 0 0 2px #f5ead8,0 4px 13px #0006; font:950 12px/14px "Arial Black",sans-serif; letter-spacing:-2px; pointer-events:none; }
.guided-piano-landmark i { font-style:normal; text-align:center; }
.guided-piano-landmark i:nth-child(1){color:var(--anno-green)}.guided-piano-landmark i:nth-child(2){color:var(--anno-blue)}.guided-piano-landmark i:nth-child(3){color:var(--anno-gold)}.guided-piano-landmark i:nth-child(4){color:var(--anno-red)}
.guided-piano-choice:hover,.guided-piano-choice:focus-visible { z-index:2; outline:4px solid var(--anno-gold); outline-offset:-4px; background:#fff; }
.guided-piano-choice::after { content:""; position:absolute; z-index:3; top:0; right:-18px; width:36px; height:116px; border:1px solid #05080d; border-top:0; border-radius:0 0 6px 6px; background:#101722; pointer-events:none; }
.guided-piano-choice:nth-child(3)::after,.guided-piano-choice:nth-child(7)::after { display:none; }
.guided-piano-choice:last-child::after { display:none; }
.guided-piano-picker .guided-completion-stats { margin:18px 0 0; grid-template-columns:repeat(4,1fr); }
@media(max-width:620px){.guided-piano-picker .guided-completion-stats{grid-template-columns:1fr 1fr}.guided-piano-choice{flex-basis:76px}}
@media(max-width:560px){.guided-session-bar{align-items:flex-start;flex-wrap:wrap}.guided-session-copy{flex:1 1 calc(100% - 100px)}.guided-session-bar>a{width:100%;text-align:right}.guided-session-clock{flex:0 0 auto}}
.guided-overlay { width:min(92vw,560px); padding:clamp(24px,6vw,48px); border:1px solid var(--line); border-top:9px solid var(--anno-gold); border-radius:0; background:#09111c; color:#fff8ec; box-shadow:18px 18px 0 #0008; }
.guided-overlay::backdrop { background:rgba(2,6,11,.82); backdrop-filter:blur(5px); }
.guided-overlay h2 { margin:8px 0 12px; font-size:clamp(2.2rem,8vw,4rem); line-height:.98; letter-spacing:-.045em; }
.guided-overlay-copy { color:#aebdcb; line-height:1.55; }
.guided-overlay-plan { display:grid; gap:8px; margin:22px 0; }
.guided-overlay-plan div { display:flex; justify-content:space-between; gap:16px; padding:11px 0; border-bottom:1px solid var(--line); }
.guided-overlay-plan span { color:var(--muted); font-size:.78rem; }
.guided-overlay-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:24px; }
.guided-overlay-actions[hidden] { display:none; }
.guided-overlay-actions button,.guided-overlay-actions a { min-height:50px; display:grid; place-items:center; padding:10px; border-radius:0; text-align:center; text-decoration:none; font-weight:900; }
.guided-overlay-actions a { border:1px solid var(--line); color:#d6e0ea; }
.guided-completion-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:22px 0; }
.guided-completion-stats[hidden] { display:none; }
.guided-completion-stats div { padding:15px 8px; border:1px solid var(--line); background:var(--panel); text-align:center; }
.guided-completion-stats strong { display:block; color:var(--anno-gold); font-size:1.45rem; }
.guided-completion-stats span { color:var(--muted); font-size:.67rem; }
.guided-share-message { min-height:1.2em; color:var(--anno-green); font-size:.78rem; }
@media(max-width:520px){.guided-overlay-actions{grid-template-columns:1fr}.guided-completion-stats{grid-template-columns:1fr 1fr}}

/* Clear practice entry and piano orientation landmarks. */
.freeplay-start { position:absolute; z-index:12; top:12px; right:12px; display:grid; place-items:center; width:48px; height:48px; margin:0; padding:0; border:1px solid #46627e; border-radius:50%; background:#111f2e; color:#dce7f1; box-shadow:0 8px 24px #0005,inset 0 -3px 0 var(--anno-blue); cursor:pointer; transition:transform 120ms ease,background 120ms ease,border-color 120ms ease; }
.freeplay-start:hover { transform:translateY(-1px); background:#172a3d; }
.freeplay-start:focus-visible { outline:3px solid #fff8ec; outline-offset:3px; }
.freeplay-start:disabled { opacity:.6; cursor:wait; transform:none; }
.freeplay-start svg { width:23px; height:23px; fill:currentColor; }
.freeplay-start:not(.active)::after { content:""; position:absolute; width:29px; height:2px; border-radius:2px; background:var(--anno-red); transform:rotate(-45deg); box-shadow:0 0 0 2px #111f2e; }
.freeplay-start.active { border-color:var(--anno-green); background:#20291b; color:#d9efc4; box-shadow:0 8px 24px #0005,inset 0 -3px 0 var(--anno-green); }
.freeplay-start.active::before { content:""; position:absolute; top:7px; right:7px; width:7px; height:7px; border-radius:50%; background:var(--anno-red); box-shadow:0 0 8px #cc2d32; }
.practice-choice { width:min(720px,calc(100% - 28px)); padding:clamp(26px,6vw,56px); border:1px solid #43566a; border-top:10px solid var(--anno-gold); background:#09111c; color:#fff8ec; box-shadow:20px 20px 0 #0009; }.practice-choice::backdrop { background:#02060be8; backdrop-filter:blur(8px); }.practice-choice h2 { max-width:590px; margin:8px 0 12px; font-size:clamp(2.35rem,8vw,4.7rem); line-height:.94; letter-spacing:-.05em; }.practice-choice>p:not(.eyebrow) { max-width:540px; color:var(--muted); line-height:1.55; }.practice-choice-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:30px; }.practice-choice-options>a,.practice-choice-options>button { position:relative; display:flex; flex-direction:column; min-height:245px; padding:22px; border:1px solid #43566a; background:#101d2a; color:#fff8ec; text-align:left; text-decoration:none; cursor:pointer; }.practice-choice-options>a { border-left:9px solid var(--anno-blue); }.practice-choice-options>button { border-left:9px solid var(--anno-red); }.practice-choice-options>a:hover,.practice-choice-options>button:hover,.practice-choice-options>a:focus-visible,.practice-choice-options>button:focus-visible { translate:0 -4px; background:#16283b; }.practice-choice-number { color:var(--anno-gold); font-size:.72rem; font-weight:950; letter-spacing:.14em; }.practice-choice-options strong { display:block; margin:26px 0 10px; font-size:clamp(1.35rem,4vw,2rem); line-height:1.05; }.practice-choice-options small { color:#aebdcb; font-size:.82rem; line-height:1.5; }.practice-choice-options b { margin-top:auto; padding-top:22px; color:#fff8ec; font-size:.8rem; }.practice-choice .account-close { top:18px; right:18px; }
@media(max-width:580px){.practice-choice-options{grid-template-columns:1fr}.practice-choice-options>a,.practice-choice-options>button{min-height:185px}.practice-choice{max-height:calc(100dvh - 24px);overflow-y:auto}}
.instrument-entry { width:min(540px,calc(100% - 28px)); padding:clamp(24px,6vw,44px); border:1px solid var(--line); border-top:9px solid var(--anno-blue); background:#09111c; color:#fff8ec; box-shadow:18px 18px 0 #0008; }
.instrument-entry::backdrop { background:#02060bd9; backdrop-filter:blur(6px); }
.instrument-entry h2 { margin:8px 0 10px; font-size:clamp(2rem,7vw,3.5rem); line-height:1; }
.instrument-entry>p:not(.eyebrow) { color:var(--muted); line-height:1.5; }
.instrument-entry-options { display:grid; gap:9px; margin-top:24px; }
.instrument-entry-options button { display:grid; gap:4px; min-height:70px; padding:14px 16px; border:1px solid var(--line); border-left:7px solid var(--anno-gold); background:var(--panel); color:#fff8ec; text-align:left; cursor:pointer; }
.instrument-entry-options button:hover,.instrument-entry-options button:focus-visible { border-color:var(--anno-blue); background:#122943; }
.instrument-entry-options strong { font-size:1rem; }
.instrument-entry-options span { color:var(--muted); font-size:.78rem; }
.middle-c-landmark { position:absolute; z-index:7; top:-46px; left:50%; transform:translateX(-50%); display:grid; grid-template-columns:repeat(2,14px); grid-template-rows:repeat(2,14px); width:30px; height:30px; padding:1px; background:#09111c; box-shadow:0 0 0 2px #f5ead8,0 4px 13px #0009; font:950 12px/14px "Arial Black",sans-serif; letter-spacing:-2px; pointer-events:none; }
.middle-c-landmark i { font-style:normal; text-align:center; }
.middle-c-landmark i:nth-child(1){color:var(--anno-green)}.middle-c-landmark i:nth-child(2){color:var(--anno-blue)}.middle-c-landmark i:nth-child(3){color:var(--anno-gold)}.middle-c-landmark i:nth-child(4){color:var(--anno-red)}
.profile-stats { grid-template-columns:repeat(4,1fr); }
@media(max-width:520px){.profile-stats{grid-template-columns:1fr 1fr}}

.controls { display: grid; grid-template-columns: 1fr 2.2fr 1fr; gap: 10px; margin-top: 14px; }
.controls button { min-height: 52px; border-radius: 15px; border: 0; font-weight: 850; cursor: pointer; }
.primary-button { background: var(--accent); color: #092719; }
.primary-button.active { background: #27362f; color: var(--accent); border: 1px solid #3e5d4c; }
.secondary-button { background: var(--panel-2); color: #f1f4f8; border: 1px solid var(--line) !important; }
.play-button, .rhythm-button, .speed-button {
  grid-column: 1 / -1;
  min-height: 46px !important;
  border: 1px solid #3e5d4c !important;
  background: #17271f;
  color: var(--accent);
}
.play-button.playing { background: #392c1c; border-color: #745b31 !important; color: var(--warning); }
.rhythm-button.active { background: #172b46; border-color: #597da9 !important; color: #bcd5ff; }
.speed-button.active { background: #352b4c; border-color: #8065ad !important; color: #dbc8ff; }

/* Anno Night Score: deep ink surfaces with restrained cues from the logo. */
.app-shell {
  min-height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
  margin: 16px auto;
  border: 1px solid #31465b;
  border-radius: 16px;
  background: rgba(9,17,28,.9);
  box-shadow: 0 24px 80px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.025);
}
.utility-bar { padding: 5px 0 11px; border-bottom: 1px solid var(--line); }
.account-button { border-radius: 0; border-color: var(--line); background: transparent; color: #f5ead8; box-shadow: none; }
.instrument-picker, .guitar-mode-picker { border-radius: 0; background: var(--panel); }
.song-select { background-color: transparent; color: #f5ead8; }
.song-select option { background: var(--panel); color: #f5ead8; }
.progress { border-radius: 0; border-color: var(--line); color: #f5ead8; box-shadow: none; }
.target-card, .fretboard-card, .listening-card { border-radius: 0; background: var(--panel); }
.target-card { position: relative; border-right: 1px solid var(--line); box-shadow: none; overflow: hidden; }
.target-card::after { content: ""; position: absolute; top: 0; right: 0; width: 7px; height: 100%; background: linear-gradient(var(--anno-green) 0 25%, var(--anno-blue) 25% 50%, var(--anno-gold) 50% 75%, var(--anno-red) 75%); }
.fretboard-card { position: relative; padding-top: 68px; border-left: 1px solid var(--line); }
.fretboard-card::after { content: ""; position: absolute; top: 0; right: 0; width: 7px; height: 100%; background: linear-gradient(var(--anno-green) 0 25%, var(--anno-blue) 25% 50%, var(--anno-gold) 50% 75%, var(--anno-red) 75%); }
.piano-mode .fretboard-card::after, .chord-mode .fretboard-card::after { display: none; }
.listening-card { border-top: 1px solid var(--line); }
.target-note { color: #fff8ec; }
.target-position, .piano-key-prompt { color: var(--anno-gold); }
.meter-track { border-radius: 0; background: linear-gradient(90deg, var(--anno-red), var(--anno-gold) 35%, var(--anno-green) 50%, var(--anno-gold) 65%, var(--anno-red)); }
.tuning-status, .success-banner { border-radius: 0; }
.controls { gap: 8px; }
.controls button { border-radius: 0; }
.primary-button { background: var(--anno-green); color: #fffdf6; }
.primary-button.active { background: #20291b; color: #b8d19f; border-color: var(--anno-green); }
.secondary-button { background: var(--panel-2); color: #f5ead8; }
.play-button, .rhythm-button, .speed-button { border-color: var(--line) !important; background: var(--panel); color: #c5d0dc; }
.play-button.playing { background: #3b2d0d; border-color: var(--anno-gold) !important; color: #f6c94e; }
.rhythm-button.active { background: #122943; border-color: var(--anno-blue) !important; color: #c9e3ff; }
.speed-button.active { background: #391718; border-color: var(--anno-red) !important; color: #ffc8c8; }
.strum-pattern, .strum-step, .chord-flow span { border-radius: 0; }
.account-dialog { border-radius: 0; border-top: 8px solid var(--anno-blue); box-shadow: 12px 12px 0 #0008; }
#welcome-tour { border:0; box-shadow:0 24px 100px #000a; }
.account-close, #account-form input, #account-form button, #account-sign-out, .tour-art, .tour-art span, .tour-art button, .tour-interaction button, .tour-actions button { border-radius: 0; }
.tour-art { background: linear-gradient(135deg, #20291b 0 50%, #142940 50%); border-bottom: 7px solid var(--anno-red); }
.tour-dots i.current { background: var(--anno-gold); }
.text-button { grid-column: 1 / -1; min-height: 42px !important; background: transparent; color: var(--muted); }
.tour-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px !important;
  padding: 7px 13px;
  border: 1px solid #46627e;
  background: #111f2e;
  box-shadow: inset 0 -3px 0 var(--anno-gold);
  color: #f5ead8;
  font-size: .78rem;
  font-weight: 850;
  cursor: pointer;
}
.tour-open span { color: var(--anno-gold); font-size: .92rem; font-weight: 950; }
.tour-open:hover { border-color: #6687a8; background: #172a3d; }
button:disabled { opacity: .38; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

@media (max-width: 365px) {
  .app-shell { width: calc(100% - 12px); min-height: calc(100dvh - 12px); margin: 6px; padding-left: 10px; padding-right: 10px; border-radius: 12px; }
  .target-card { padding-left: 15px; padding-right: 15px; }
  .finger-guide { max-width: 86px; }
  .controls { gap: 7px; }
  .controls button { font-size: .85rem; }
  .song-select { width: min(190px, 52vw); font-size: 1.2rem; }
}

@media (min-width: 700px) { .app-shell { padding-top: 32px; } }

@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; } }
.guitar-assist-tools { display:inline-flex; gap:8px; }
.guitar-assist-tools[hidden],.guitar-assist-suggestion[hidden] { display:none; }
.guitar-assist-tools button,.guitar-assist-suggestion button { width:44px;height:44px;display:inline-grid;place-items:center;padding:10px;border-radius:50%;background:#172735;color:#f7f2e9;border:1px solid #40576a;cursor:pointer; }
.guitar-assist-tools svg,.guitar-assist-suggestion svg,.guitar-assist-dialog svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;vertical-align:middle; }
.guitar-assist-suggestion { display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px;background:#152230;border:1px solid #40576a;border-radius:14px;margin:12px 0; }
.guitar-assist-dialog { width:min(440px,calc(100% - 32px));padding:24px;background:#101c28;color:#f7f2e9;border:1px solid #40576a;border-radius:20px; }
.guitar-assist-dialog::backdrop { background:#000a; }
.guitar-assist-dialog [data-reading] { font-size:21px;min-height:64px;color:#e8b32a; }
.guitar-assist-dialog button,.guitar-assist-dialog select { font:inherit;color:#f7f2e9;background:#253a4d;border:1px solid #40576a;border-radius:12px;padding:12px;cursor:pointer; }
.guitar-assist-dialog [data-actions] { display:flex;flex-wrap:wrap;gap:10px; }
.practice-actions { flex-wrap:wrap; }
.practice-actions .guitar-assist-tools button { padding:10px;min-height:44px;border-radius:50%; }
.guitar-assist-visible #play-button { display:none; }
