/* ===== Fretboard Trainer (loaded by index.html) ===== */
.fbpage { max-width: 1240px; }
.fbstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; max-width: 640px; }
.fbtile { padding: 12px 16px; }
.fbtile b { display: block; font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.fbtile span { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.fbtabs { flex-wrap: wrap; }
.fbwork { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; align-items: start; }
.fbmain { padding: 22px 24px 24px; min-width: 0; }
.fbside { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.fbside h3 { font-size: 16px; }
.fbfield { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.fbfield select { background: var(--surface2); border: 1px solid var(--border2); border-radius: 9px; padding: 8px 10px; color: var(--text); }
.fbcheck { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); cursor: pointer; }
.fbtip { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.fbtip b { display: block; color: var(--text); margin-bottom: 4px; }
.fbprompt { min-height: 74px; }
.fbquestion { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin-top: 4px; }
.fbquestion em { font-style: normal; color: var(--accent); }
.fbsub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.fbscroll { overflow-x: auto; margin: 18px -6px 6px; padding: 6px 6px 14px; }
.fbboard { min-width: 660px; display: grid; position: relative; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 9px), linear-gradient(180deg, #6b3e24, #4a2918 50%, #3a2012); border-radius: 12px; border: 1px solid rgba(224, 177, 90, .25); padding: 0 8px 8px 0; box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.fbfretnum { text-align: center; font-size: 11.5px; color: #cdbba0; padding: 7px 0 5px; background: rgba(0, 0, 0, .35); }
.fbfretnum:first-child { border-radius: 12px 0 0 0; }
.fbcell { position: relative; height: 40px; border: 0; border-right: 2px solid #c8cdd3; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; color: #f3eadb; }
.fbcell.open { border-right: 6px solid #f4f0e8; background: rgba(0, 0, 0, .18); }
.fbcell::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: var(--thick, 1px); transform: translateY(-50%); background: linear-gradient(180deg, #f4f6f8, #9aa3ad 50%, #5d666e); pointer-events: none; }
.fbcell.dim { opacity: .35; }
.fbcell.dot::after { content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%; bottom: -5px; left: 50%; margin-left: -4.5px; background: rgba(247, 243, 234, .85); z-index: 3; pointer-events: none; }
.fbcell:hover .fbm:empty { background: rgba(224, 177, 90, .35); }
.fbcell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 4; }
.fbn { position: absolute; left: 3px; top: 2px; font-size: 9.5px; color: rgba(243, 234, 219, .85); pointer-events: none; z-index: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .6); }
.fbm { position: relative; z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #1c1612; transition: transform .15s; }
.fbm.target { background: #e0b15a; box-shadow: 0 0 0 4px rgba(224, 177, 90, .3); animation: fbpulse 1.1s ease-in-out infinite; }
.fbm.go { background: #3cba7c; color: #062216; box-shadow: 0 0 0 4px rgba(60, 186, 124, .28); }
.fbm.no { background: #e15b4c; color: #fff; box-shadow: 0 0 0 4px rgba(225, 91, 76, .28); }
.fbm.found { background: rgba(247, 243, 234, .9); }
.fbm.hear { background: #8fb7ff; color: #0b1a33; box-shadow: 0 0 0 4px rgba(143, 183, 255, .28); }
@keyframes fbpulse { 50% { transform: scale(1.1); } }
.fblegend { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 8px; min-width: 660px; }
.fbanswers { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 8px; margin-top: 14px; }
.fbanswers button { min-height: 48px; border-radius: 11px; background: var(--surface2); border: 1px solid var(--border2); font-size: 17px; font-weight: 700; transition: background .12s, border-color .12s; }
.fbanswers button:hover { border-color: var(--accent); }
.fbanswers button.good { background: var(--green); border-color: var(--green); color: #07140d; }
.fbanswers button.bad { background: #e15b4c; border-color: #e15b4c; color: #fff; }
.fbfeedback { min-height: 46px; padding: 12px 2px 4px; color: #cfcfdc; font-size: 14px; line-height: 1.5; }
.fbactions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fbbar { height: 5px; border-radius: 5px; background: var(--surface3); overflow: hidden; margin-top: 10px; }
.fbbar > i { display: block; height: 100%; width: 100%; background: var(--grad); transition: width .25s linear; }
.fbbar > i.warn { background: #e15b4c; }
.fbstages { display: flex; flex-direction: column; gap: 10px; }
.fbstage { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; text-align: left; padding: 13px 16px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--border); transition: border-color .15s; width: 100%; }
.fbstage:hover:not(.locked) { border-color: var(--border2); }
.fbstage.current { border-color: var(--accent); }
.fbstage.locked { opacity: .45; cursor: default; }
.fbstage .sn { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface3); font-weight: 800; }
.fbstage.passed .sn { background: var(--green-soft); color: var(--green); }
.fbstage b { font-size: 15px; display: block; }
.fbstage small { color: var(--muted); display: block; margin-top: 2px; line-height: 1.45; font-size: 12.5px; }
.fbstage .pill { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.fbsheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 90; padding: 20px; }
.fbsheet .panel { background: var(--surface); border: 1px solid var(--border2); border-radius: 18px; padding: 24px 28px; max-width: 520px; width: 100%; box-shadow: var(--shadow); }
.fbsum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.fbsum div { background: var(--surface2); border-radius: 12px; padding: 12px 8px; text-align: center; }
.fbsum b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.fbsum span { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; }
@media (max-width: 900px) { .fbwork { grid-template-columns: 1fr; } .fbstats { grid-template-columns: repeat(2, 1fr); } .fbquestion { font-size: 22px; } }
