@font-face { font-family: 'NotoMusic'; src: url('../fonts/NotoMusic-Regular.ttf') format('truetype'); font-display: block; unicode-range: U+1D100-1D1FF, U+266D-266F; }
:root {
  --bg: #1b1640; --bg2: #251e55; --card: #2f2768; --card2: #3a3180; --tx: #f4f1ff; --mut: #b9b0e6;
  --acc: #ffc43d; --acc2: #ff5d8f; --ok: #3ddc97; --bad: #ff6b6b; --blue: #5ab8ff;
  --r: 18px; --safe-t: env(safe-area-inset-top); --safe-b: env(safe-area-inset-bottom);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'NotoMusic', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font-family: var(--font); font-size: 17px; }
body { min-height: 100vh; padding-bottom: calc(24px + var(--safe-b)); overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
small { color: var(--mut); }
h2 { margin: 6px 0; font-size: 1.35rem; } h3 { margin: 6px 0; }
h2 small, h3 small { font-weight: 500; font-size: .8rem; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 12px 8px; background: rgba(27, 22, 64, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top h1 { flex: 1; margin: 0; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--card); }
#back { font-size: 2rem; line-height: 1; padding-bottom: 4px; }
.instbar { display: flex; gap: 8px; padding: 4px 12px 8px; position: sticky; top: calc(60px + var(--safe-t)); z-index: 19; background: rgba(27, 22, 64, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.instbar[hidden] { display: none; }
.ib { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; border-radius: 14px; background: var(--card); opacity: .7; border: 2px solid transparent; }
.ib.on { opacity: 1; border-color: var(--acc); background: var(--card2); }
.ib small { color: var(--tx); font-weight: 600; }
.ii { width: 30px; height: 30px; flex: none; }
.view { padding: 8px 12px 30px; max-width: 980px; margin: 0 auto; }

/* Inicio */
.hero { background: linear-gradient(135deg, #5b3cc4, #c2408f); border-radius: 24px; padding: 16px; margin: 6px 0 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hello { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.hi { font-size: 1.4rem; font-weight: 800; }
.pills { display: flex; gap: 6px; }
.pill { display: inline-block; background: rgba(255,255,255,.18); padding: 5px 11px; border-radius: 99px; font-weight: 700; font-size: .9rem; }
.next { margin-top: 12px; display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,.22); border-radius: 18px; padding: 12px; }
.nicon { font-size: 2.2rem; } .ntext { flex: 1; display: flex; flex-direction: column; } .ntext small { color: #ffe9f3; }
.go { width: 46px; height: 46px; border-radius: 50%; background: var(--acc); color: #2a1d00; display: grid; place-items: center; font-size: 1.2rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { aspect-ratio: 1 / 1; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--card); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); transition: transform .12s; }
.tile:active { transform: scale(.95); }
.ti { font-size: 2.6rem; line-height: 1; } .tt { font-weight: 700; font-size: .95rem; }
.t-notas { background: #3d3a9e; } .t-escalas { background: #1f7a8c; } .t-acordes { background: #b0417b; } .t-tonos { background: #9a6b12; }
.t-circulo { background: #6a3fb5; } .t-lecciones { background: #2e8b57; } .t-oido { background: #c25b2e; } .t-lectura { background: #2c5ea8; }
.t-metronomo { background: #7b3b3b; } .t-rutina { background: #4b6b1f; } .t-progreso { background: #3a4a8f; } .t-afinador { background: #8a2f6a; }
.install { display: flex; gap: 10px; align-items: center; background: var(--card2); padding: 10px 12px; border-radius: 16px; margin-bottom: 12px; font-size: .92rem; }
.install span { flex: 1; } .x { font-size: 1.1rem; padding: 6px; }

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: flex; align-items: center; gap: 6px; padding: 10px 14px; min-height: 44px; border-radius: 99px; background: var(--card); font-weight: 600; white-space: nowrap; border: 2px solid transparent; }
.chip.on { background: var(--acc); color: #241a00; }
.chip.on small { color: #4a3a00; }
.chip .ci { font-size: 1.15rem; }
.chips.roots .chip { flex-direction: column; gap: 0; min-width: 54px; padding: 6px 10px; border-radius: 16px; justify-content: center; line-height: 1.1; }
.chips.roots .chip span { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.chips.roots .chip small { font-size: .68rem; }
.chips.tabs .chip { flex: 1; justify-content: center; border-radius: 14px; }
.chips.small .chip { min-height: 38px; padding: 6px 12px; font-size: .9rem; }
.music, .chips.music .chip { font-family: var(--font); }
.typesel .grp { margin-top: 2px; } .typesel .grp > small { margin-left: 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; min-height: 46px; border-radius: 16px; background: var(--card2); font-weight: 700; }
.btn.primary { background: var(--acc); color: #241a00; }
.btn.ghost { background: transparent; border: 2px solid var(--card2); }
.btn.round { width: 52px; height: 52px; padding: 0; border-radius: 50%; font-size: 1.3rem; flex: none; }
.btn.round.sm { width: 42px; height: 42px; min-height: 42px; font-size: 1rem; }
.btn.round.big { width: 76px; height: 76px; flex-direction: column; font-size: 1.6rem; gap: 0; }
.btn.round.big small { font-size: .65rem; color: var(--tx); }
.btn:active, .chip:active, .opt:active { transform: scale(.96); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 14px 0; }
.bigplay { width: 96px; height: 96px; border-radius: 50%; background: var(--acc); color: #241a00; font-size: 2.4rem; box-shadow: 0 8px 24px rgba(255,196,61,.35); display: grid; place-items: center; }
.bigplay.stop { background: var(--acc2); color: #fff; box-shadow: 0 8px 24px rgba(255,93,143,.35); }

.titlebar { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.titlebar h2, .titlebar h3 { flex: 1; }
h2 small { display: inline-block; }
.tip { color: var(--mut); font-size: .9rem; text-align: center; margin: 8px 0; }
.empty { text-align: center; padding: 20px; }
.err { color: var(--bad); text-align: center; }
.sec { margin-top: 18px; font-size: 1.1rem; }

.notesrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.nchip { display: flex; flex-direction: column; align-items: center; min-width: 48px; padding: 6px 8px; border-radius: 14px; background: var(--card); }
.nchip.root { background: var(--acc2); }
.nchip small { font-size: .72rem; color: #e6defd; }
.nchip.playing { outline: 3px solid var(--acc); }
.formula { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0; }
.formula i { font-style: normal; font-weight: 800; font-size: .8rem; padding: 4px 9px; border-radius: 8px; background: var(--card); }
.formula i.t { background: #1f7a8c; } .formula i.s { background: #b0417b; } .formula i.x { background: #6a3fb5; }
.fing { text-align: center; margin: 8px 0; font-size: 1.05rem; }
.tempo { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 10px 0; font-size: 1.2rem; }
input[type=range] { flex: 1; max-width: 360px; accent-color: var(--acc); height: 32px; }
input[type=range].wide { width: 100%; max-width: 420px; display: block; margin: 10px auto; }
.legend { text-align: center; font-size: .85rem; color: var(--mut); margin: 6px 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); vertical-align: middle; }
.sw.root { background: var(--acc2); }

/* Instrumentos */
.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px -12px; padding: 0 12px; scrollbar-width: thin; }
svg.kb { display: block; min-width: 100%; height: 170px; width: auto; touch-action: manipulation; }
.key.w rect { fill: #fdfcff; stroke: #1b1640; stroke-width: 1.5; }
.key.b rect { fill: #1d1a2b; stroke: #000; }
.key.w.tap rect, .key.w.playing rect { fill: #ffe7a6; }
.key.b.tap rect, .key.b.playing rect { fill: #6b5a2a; }
.key.mk circle { fill: var(--blue); }
.key.mk.root circle { fill: var(--acc2); }
.key.mk.tone circle { fill: #7c5cff; }
.key.mk.playing circle { fill: var(--acc); }
.kl { font-size: 12px; font-weight: 800; fill: #fff; text-anchor: middle; pointer-events: none; }
.kl.sm { font-size: 9.5px; }
.ks { font-size: 15px; font-weight: 800; fill: #3a3180; text-anchor: middle; pointer-events: none; }
.ks.w { fill: #fff; font-size: 12px; }
.kc { font-size: 10px; fill: #8a84a8; text-anchor: middle; pointer-events: none; }
svg.fb { display: block; height: auto; min-width: 860px; width: 100%; }
svg.fb.bass { min-width: 820px; }
.wood { fill: #5a3a22; }
.fb.bass .wood { fill: #3b2a1e; }
.win { fill: rgba(255,196,61,.15); stroke: var(--acc); stroke-width: 2; stroke-dasharray: 6 4; }
.fret { stroke: #c9c2b3; stroke-width: 2.5; }
.nut { fill: #efe7d4; }
.str { stroke: #e3d7b8; }
.inlay { fill: rgba(255,255,255,.35); }
.fn { font-size: 11px; fill: var(--mut); text-anchor: middle; }
.sl { font-size: 12px; font-weight: 800; fill: var(--tx); text-anchor: middle; }
.hit { fill: transparent; cursor: pointer; }
.hit.tap { fill: rgba(255,196,61,.35); }
.dot circle { fill: var(--blue); stroke: #fff; stroke-width: 1.5; }
.dot.root circle { fill: var(--acc2); }
.dot.tone circle { fill: #7c5cff; }
.dot.playing circle, .dot.tap circle { fill: var(--acc); }
.dot text { font-size: 11px; font-weight: 800; fill: #fff; text-anchor: middle; pointer-events: none; }
.dot { cursor: pointer; }
.boxes { display: flex; gap: 10px; padding-bottom: 6px; }
.boxbtn { background: #fbf8ff; border-radius: 16px; padding: 6px; flex: none; }
svg.cbox { width: 150px; height: auto; display: block; }
.ct { font-size: 13px; font-weight: 800; text-anchor: middle; fill: #3a3180; }
.nutc { fill: #2b2440; } .cf { stroke: #8b86a0; stroke-width: 1.5; } .cs { stroke: #4a4560; stroke-width: 1.5; }
.bf { font-size: 13px; font-weight: 800; fill: #3a3180; text-anchor: end; }
.xo { font-size: 13px; fill: #c0392b; text-anchor: middle; font-weight: 800; }
.open { fill: none; stroke: #2b2440; stroke-width: 2; }
.fd { fill: #3a3180; } .fd.root { fill: #e0457b; }
.fdt { font-size: 12px; font-weight: 800; fill: #fff; text-anchor: middle; }
.barre { fill: #3a3180; opacity: .85; }
.cnn { font-size: 10px; fill: #5a5578; text-anchor: middle; }
.staffwrap { background: #fbf8ff; border-radius: 16px; padding: 6px; margin: 10px 0; overflow-x: auto; }
.staffwrap.sm { display: inline-flex; gap: 4px; padding: 2px 6px; margin: 0; }
svg.staff { display: block; height: 130px; width: auto; max-width: 100%; margin: 0 auto; }
.staffwrap.sm svg.staff { height: 92px; }
.sline { stroke: #2b2440; stroke-width: 1.3; }
.clef { font-family: 'NotoMusic', serif; fill: #2b2440; }
.clef.g { font-size: 66px; } .clef.f { font-size: 50px; }
.acc { font-family: 'NotoMusic', serif; font-size: 22px; fill: #2b2440; text-anchor: middle; }
.nh { fill: #2b2440; } .nhh { fill: #fbf8ff; }
.nh.shown { fill: #2e8b57; }

/* Notas */
.names, .enh { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.nc { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 8px; border-radius: 14px; background: var(--card); }
.cards3.two { grid-template-columns: 1fr 1fr; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.mini { background: var(--card); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.mini .big { font-size: 2.2rem; font-family: var(--font); color: var(--acc); }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stp { background: var(--card); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; }
.stp span { font-size: 1.8rem; font-weight: 800; color: var(--acc); }
.ivgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin: 8px 0; }
.iv { background: var(--card); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; }
.iv small { font-size: .7rem; }
.iv.on { background: var(--acc); color: #241a00; } .iv.on small { color: #4a3a00; }
.ivcard { background: var(--card2); border-radius: 18px; padding: 12px; text-align: center; }
.ivt { font-weight: 800; font-size: 1.2rem; } .ivn { font-size: 1.1rem; margin: 4px 0; }
.semis { display: flex; gap: 4px; justify-content: center; } .semis i { width: 14px; height: 14px; border-radius: 50%; background: var(--acc); }

/* Tonos */
.keyhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.degcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 8px 0; }
.deg { background: var(--card); border-radius: 16px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid transparent; }
.deg .rn { font-family: Georgia, 'Times New Roman', serif; font-size: 1.25rem; font-weight: 700; color: var(--acc); }
.deg small { font-size: .65rem; }
.deg.on { border-color: var(--acc); background: var(--card2); }
.deg.q-maj, .deg.q-maj7, .deg.q-dom7 { box-shadow: inset 0 -4px 0 #1f7a8c; }
.deg.q-min, .deg.q-min7 { box-shadow: inset 0 -4px 0 #b0417b; }
.deg.q-dim, .deg.q-m7b5, .deg.q-dim7, .deg.q-aug { box-shadow: inset 0 -4px 0 #9a6b12; }
.selchord { background: var(--bg2); border-radius: 18px; padding: 8px 12px; }
.progs { display: grid; gap: 10px; }
@media (min-width: 700px) { .progs { grid-template-columns: 1fr 1fr; } }
.prog { background: var(--card); border-radius: 18px; padding: 10px 12px; border: 2px solid transparent; }
.prog.on { border-color: var(--acc); }
.ph { display: flex; align-items: center; gap: 8px; }
.ph b { flex: 1; } .pi { font-size: 1.5rem; } .lv { color: var(--acc); font-size: .75rem; letter-spacing: 2px; }
.pc { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pcc { background: var(--bg2); border-radius: 12px; padding: 4px 9px; display: flex; flex-direction: column; align-items: center; font-weight: 700; transition: transform .1s; }
.pcc small { font-family: Georgia, serif; font-size: .75rem; }
.pcc.now { background: var(--acc); color: #241a00; transform: scale(1.08); } .pcc.now small { color: #4a3a00; }

/* Círculo */
.circlewrap { max-width: 420px; margin: 0 auto; }
svg.circle { width: 100%; height: auto; display: block; }
.seg { stroke: var(--bg); stroke-width: 2; cursor: pointer; transition: fill .15s; }
.seg.maj { fill: #4a3aa8; } .seg.min { fill: #2f2768; }
.seg.near.maj { fill: #6b54d6; } .seg.near.min { fill: #4a3aa8; }
.seg.sel { fill: var(--acc) !important; }
.cl { text-anchor: middle; pointer-events: none; font-weight: 800; fill: #fff; }
.cl.M { font-size: 15px; } .cl.m { font-size: 11.5px; } .cl.alt { font-size: 9px; fill: #d8d0ff; font-weight: 600; } .cl.s { font-size: 10px; fill: var(--mut); }
.ctr { fill: var(--bg2); stroke: var(--acc); stroke-width: 3; cursor: pointer; }
.cn { text-anchor: middle; font-size: 22px; font-weight: 800; fill: #fff; pointer-events: none; }
.cs2 { text-anchor: middle; font-size: 13px; fill: var(--mut); pointer-events: none; }
.keypanel { background: var(--bg2); border-radius: 20px; padding: 10px 12px; margin-top: 8px; }
.related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .related { grid-template-columns: repeat(4, 1fr); } }
.rel { background: var(--card); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.rel span { font-size: 1.4rem; } .rel b { font-size: 1.1rem; }

/* Lecciones */
.insthead { display: flex; align-items: center; gap: 12px; background: var(--card); padding: 12px; border-radius: 18px; }
.insthead .ii { width: 54px; height: 54px; } .insthead > div { flex: 1; }
.bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 6px 0 2px; flex: 1; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--acc)); border-radius: 99px; }
.lessons { display: grid; gap: 8px; }
@media (min-width: 700px) { .lessons { grid-template-columns: 1fr 1fr; } }
.lesson { display: flex; align-items: center; gap: 12px; background: var(--card); padding: 12px; border-radius: 18px; }
.lesson.done { background: #24553f; }
.li { font-size: 2rem; width: 44px; text-align: center; } .lt { flex: 1; display: flex; flex-direction: column; } .ck { font-size: 1.2rem; }
.lhead { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, #2e8b57, #1f7a8c); border-radius: 20px; padding: 14px; }
.lhead p { margin: 2px 0 0; } .lhead small { color: #e0fff0; } .lbig { font-size: 3rem; }
.lsteps { counter-reset: s; list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.lsteps li { counter-increment: s; display: flex; gap: 10px; align-items: center; background: var(--card); padding: 10px 12px; border-radius: 14px; }
.lsteps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--acc); color: #241a00; font-weight: 800; display: grid; place-items: center; }
.quiz { background: var(--card); border-radius: 18px; padding: 12px; text-align: center; }
.qq { font-size: 1.1rem; margin: 4px 0 10px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts.grid2 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.opt { background: var(--card2); border-radius: 16px; padding: 12px 8px; min-height: 54px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 3px solid transparent; }
.opt small { font-weight: 500; font-size: .75rem; }
.opt.right { background: #1f6f4b; border-color: var(--ok); } .opt.wrong { background: #7a2a35; border-color: var(--bad); }
.result { text-align: center; background: var(--card); border-radius: 18px; padding: 16px; }
.result.ok { background: #24553f; } .rbig { font-size: 3.5rem; }

/* Oído y lectura */
.earbox { text-align: center; background: var(--card); border-radius: 22px; padding: 18px 10px; margin: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.score { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.score span { background: var(--bg2); padding: 5px 10px; border-radius: 99px; font-weight: 700; font-size: .9rem; }
.fb { font-size: 1.15rem; text-align: center; min-height: 1.6em; margin: 6px 0; }
.readbox { background: #fbf8ff; border-radius: 20px; padding: 10px; margin: 8px 0; }
.readbox svg.staff { height: 170px; }
.opts.notes7 { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 600px) { .opts.notes7 { grid-template-columns: repeat(7, 1fr); } }
.chips.accs { justify-content: center; } .chips.accs .chip { font-family: var(--font); font-size: 1.3rem; min-width: 64px; justify-content: center; }

/* Metrónomo */
.metro { display: flex; flex-direction: column; align-items: center; }
.bpmring { width: 210px; height: 210px; border-radius: 50%; border: 8px solid var(--card2); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 10px; transition: transform .08s, border-color .08s; }
.bpmring.run { border-color: var(--acc); }
.bpmring.pulse { transform: scale(1.03); }
.bpm { font-size: 4.2rem; font-weight: 800; line-height: 1; }
.dots { display: flex; gap: 12px; margin: 6px 0 12px; }
.dots i { width: 22px; height: 22px; border-radius: 50%; background: var(--card2); transition: background .05s, transform .05s; }
.dots i.acc { box-shadow: 0 0 0 3px var(--acc2) inset; }
.dots i.on { background: var(--acc); transform: scale(1.25); }
.pm { display: flex; gap: 10px; }

/* Rutina */
.rlist { list-style: none; padding: 0; display: grid; gap: 6px; }
.rlist li { background: var(--card); padding: 10px 12px; border-radius: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rlist li small { margin-left: auto; }
.rlist.big li { flex-direction: column; align-items: flex-start; } .rlist.big li small { margin-left: 0; }
.rlist li.done { opacity: .55; text-decoration: line-through; } .rlist li.now { border: 2px solid var(--acc); }
.rstep { text-align: center; background: var(--card); border-radius: 22px; padding: 16px; margin: 10px 0; }
.ring { --p: 0; width: 180px; height: 180px; border-radius: 50%; margin: 0 auto; background: conic-gradient(var(--acc) calc(var(--p) * 360deg), var(--bg2) 0); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.ring::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--card); }
.ring > * { position: relative; } .ri { font-size: 2.4rem; } .ring b { font-size: 2rem; }
.mini { }
#mini { position: fixed; bottom: calc(14px + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 30; }
#mini a { display: block; background: var(--acc); color: #241a00; padding: 10px 18px; border-radius: 99px; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
#mini small { color: #4a3a00; }

/* Progreso */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; align-items: center; }
.stat span { font-size: 1.8rem; } .stat b { font-size: 1.6rem; }
svg.week { width: 100%; max-width: 500px; display: block; margin: 0 auto; }
svg.week rect { fill: #6a5ad8; } svg.week rect.today { fill: var(--acc); }
.wd { font-size: 12px; fill: var(--mut); text-anchor: middle; } .wm { font-size: 11px; fill: var(--tx); text-anchor: middle; font-weight: 700; }
.prow { display: flex; align-items: center; gap: 10px; background: var(--card); padding: 8px 12px; border-radius: 14px; margin: 6px 0; }
.prow b { width: 80px; }

/* Afinador */
.tuner { background: var(--card); border-radius: 22px; padding: 10px; text-align: center; margin: 8px 0; transition: background .2s; }
.tuner.ok { background: #1f5f45; }
svg.gauge { width: 100%; max-width: 360px; display: block; margin: 0 auto; }
.arc { fill: none; stroke: var(--bg2); stroke-width: 16; stroke-linecap: round; }
.arcok { fill: none; stroke: var(--ok); stroke-width: 16; }
.tick { stroke: var(--mut); stroke-width: 2; } .tl { font-size: 11px; fill: var(--mut); text-anchor: middle; }
.needle { stroke: var(--acc); stroke-width: 5; stroke-linecap: round; transition: transform .12s; }
.hub { fill: var(--acc); }
.tnote { font-size: 4rem; font-weight: 800; line-height: 1; margin-top: -10px; }
.tinfo { color: var(--mut); min-height: 1.4em; }
.strings { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.sbtn { background: var(--card); border-radius: 16px; padding: 8px 10px; min-width: 64px; display: flex; flex-direction: column; align-items: center; border: 3px solid transparent; }
.sbtn span { font-size: 1.3rem; font-weight: 800; } .sbtn small { font-size: .68rem; }
.sbtn.on { border-color: var(--acc); } .sbtn.hit { background: var(--card2); }

/* Aviso */
.toast { position: fixed; left: 50%; top: calc(80px + var(--safe-t)); transform: translate(-50%, -20px); opacity: 0; background: var(--card2); padding: 12px 20px; border-radius: 99px; font-weight: 800; z-index: 50; transition: all .3s; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.ok { background: #1f6f4b; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
