
:root{
  --desk:#E6EBF2; --paper:#FDFEFF; --rule:#DCE6F3; --margin:#E7A3A3;
  --ink:#1C3F94; --ink-soft:#E8EEFA; --text:#1E2533; --muted:#5A6477;
  --red:#C8202F; --line:#C3CEDD;
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  background:var(--desk);color:var(--text);
  font-family:"Commissioner",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:17px;line-height:1.5;padding:24px 14px 60px;
}
.wrap{max-width:760px;margin:0 auto}
header{margin-bottom:18px}
h1{font-family:"GFS Didot","Noto Serif",Georgia,serif;font-weight:400;font-size:2.1rem;line-height:1.15;margin:0 0 4px}
.sub{color:var(--muted);margin:0}

.bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin:18px 0 14px}
.seg{display:inline-flex;background:#fff;border:1px solid var(--line);border-radius:999px;padding:4px;flex-wrap:wrap}
.seg button{border:0;background:transparent;font:inherit;font-weight:600;color:var(--muted);padding:8px 18px;border-radius:999px;cursor:pointer}
.seg button[aria-pressed="true"]{background:var(--ink);color:#fff}
.seg.small button{padding:6px 14px;font-size:.92rem}
.ghost{font:inherit;font-weight:500;background:transparent;border:1px solid var(--line);color:var(--text);padding:8px 14px;border-radius:8px;cursor:pointer}
.ghost:hover{border-color:var(--ink)}

#settings{background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px 18px;margin-bottom:16px}
#settings h3{font-size:1rem;margin:0 0 8px}
#settings .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:4px 14px;margin-bottom:14px}
#settings label{display:flex;gap:8px;align-items:center;cursor:pointer}
#settings .row{display:flex;flex-wrap:wrap;gap:16px;margin-bottom:6px}
#settings .small{font-size:.9rem;color:var(--muted);margin:6px 0 0}
#settings .links{display:flex;gap:12px;margin-bottom:10px}
.linkbtn{background:none;border:0;padding:0;color:var(--ink);font:inherit;font-size:.92rem;text-decoration:underline;cursor:pointer}

.sheet{
  position:relative;background-color:var(--paper);
  background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 33px,var(--rule) 33px,var(--rule) 34px);
  background-position:0 20px;border-radius:4px;
  box-shadow:0 1px 0 #cfd7e3,0 12px 30px -18px rgba(28,63,148,.35);
  padding:26px 28px 30px 64px;min-height:420px;
}
.sheet::before{content:"";position:absolute;top:0;bottom:0;left:44px;width:2px;background:var(--margin);opacity:.8}
.sheet h2{font-family:"GFS Didot","Noto Serif",Georgia,serif;font-weight:400;font-size:1.5rem;margin:0 0 4px}
.instr{color:var(--muted);margin:0 0 18px;max-width:62ch}
.partnote{font-weight:600;margin:22px 0 4px;max-width:62ch}

.q{padding:10px 0 18px}
.q + .q{border-top:1px dashed var(--line);padding-top:20px}
.qhead{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;margin-bottom:10px}
.qhead strong{font-size:1.1rem}
.marks{color:var(--muted);font-size:.92rem;margin-left:auto}
.q.active .qhead strong{color:var(--ink)}

.hear{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:.92rem}
.dots{display:inline-flex;gap:5px}
.dots i{width:12px;height:12px;border-radius:50%;border:2px solid var(--ink);opacity:.35;display:block}
.dots i.done{background:var(--ink);opacity:1}
.dots i.now{opacity:1;animation:pulse 1s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.35)}}
@media (prefers-reduced-motion:reduce){.dots i.now{animation:none;background:var(--ink-soft)}}

.opts{list-style:none;margin:0;padding:0}
.opt{display:flex;align-items:center;gap:16px;width:100%;background:none;border:0;font:inherit;color:var(--text);text-align:left;padding:4px 8px;min-height:34px;cursor:pointer;border-radius:6px;position:relative}
.opt:hover:not(:disabled){background:var(--ink-soft)}
.opt:disabled{cursor:default}
.letter{font-weight:700;width:34px;height:30px;display:inline-grid;place-items:center;position:relative;flex:none}
.opt.sel .letter::after{content:"";position:absolute;inset:-2px -4px;border:2.5px solid var(--ink);border-radius:50% 46% 52% 48%;transform:rotate(-8deg)}
.opt.sel{color:var(--ink);font-weight:600}
.opt.right .letter::before{content:"";position:absolute;inset:-5px -8px;border:2.5px solid var(--red);border-radius:48% 52% 45% 55%;transform:rotate(6deg)}
.opt.wrong .txt{text-decoration:line-through;text-decoration-color:var(--red);text-decoration-thickness:2px}
.verdict{font-family:"GFS Didot",Georgia,serif;color:var(--red);font-size:1.6rem;line-height:1;margin-left:6px}

/* Πεντάγραμμο */
.staffbox{display:flex;flex-wrap:wrap;gap:14px 28px;align-items:flex-start}
.staff{width:370px;max-width:100%;height:auto;background:#fff;border:1px solid var(--line);border-radius:6px;touch-action:manipulation;user-select:none}
.staff.live{cursor:default}
.mus{font-family:"Noto Music","Segoe UI Symbol","Apple Symbols",serif}
.staff:focus-visible{outline:3px solid #7FA2E8;outline-offset:2px}
.staff.live:focus{border-color:var(--ink)}
.ctrlrow{display:flex;gap:18px;flex-wrap:wrap}
kbd{font-family:inherit;font-size:.8rem;border:1px solid var(--line);border-bottom-width:2px;border-radius:4px;padding:0 5px;background:#fff;color:var(--text)}
.side{display:flex;flex-direction:column;gap:12px;min-width:220px}
.side .lbl{font-size:.9rem;color:var(--muted);margin-bottom:4px}
.acc{display:inline-flex;gap:6px}
.acc button{display:inline-grid;place-items:center;font-size:1rem;width:46px;height:40px;border:1.5px solid var(--line);background:#fff;border-radius:8px;cursor:pointer;color:var(--text)}
.acc button[aria-pressed="true"]{border-color:var(--ink);background:var(--ink-soft);color:var(--ink)}
.acc button:disabled{cursor:default;opacity:.6}
.names{display:flex;gap:8px;flex-wrap:wrap}
select{font:inherit;padding:8px 10px;border:1.5px solid var(--line);border-radius:8px;background:#fff;color:var(--text)}
select:focus-visible{outline:3px solid #7FA2E8;outline-offset:1px}
.hint{font-size:.85rem;color:var(--muted);margin:0}

.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px;align-items:center}
.btn{font:inherit;font-weight:600;border:0;border-radius:8px;cursor:pointer;padding:11px 20px;background:var(--ink);color:#fff}
.btn:hover{filter:brightness(1.12)}
.btn:disabled{opacity:.45;cursor:not-allowed;filter:none}
.btn.alt{background:#fff;color:var(--ink);border:1.5px solid var(--ink)}
.status{color:var(--muted);font-size:.92rem}
button:focus-visible{outline:3px solid #7FA2E8;outline-offset:2px}

.score{display:flex;align-items:baseline;gap:14px;margin:6px 0 10px;color:var(--red)}
.score .num{font-family:"GFS Didot",Georgia,serif;font-size:3.2rem;line-height:1}
.reveal{font-size:.95rem;color:var(--muted);margin:10px 0 0 8px}
.reveal b{color:var(--text)}
.reveal .r{color:var(--red);font-weight:600}
.mini{font:inherit;font-size:.9rem;background:none;border:0;color:var(--ink);text-decoration:underline;cursor:pointer;padding:0;margin-left:8px}

.tally{color:var(--muted);font-size:.95rem}
.tally b{color:var(--text)}
.feedback{min-height:28px;margin-top:10px;font-weight:600}
.feedback.ok{color:#1F7A3E}
.feedback.no{color:var(--red)}
.audio{margin-top:18px;font-size:.85rem;color:var(--muted)}
[hidden]{display:none!important}

@media (max-width:560px){
  body{padding:16px 8px 40px;font-size:16px}
  h1{font-size:1.7rem}
  .sheet{padding:20px 14px 24px 40px}
  .sheet::before{left:26px}
  .marks{margin-left:0;width:100%}
}

/* Πλοήγηση και επίπεδο */
.crumbs{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;font-size:.92rem}
.crumbs a{color:var(--ink);text-decoration:none;font-weight:600}
.crumbs a:hover{text-decoration:underline}
.crumbs label{color:var(--muted);display:inline-flex;gap:6px;align-items:center}
.crumbs select{font:inherit;font-size:.9rem;padding:4px 8px;border:1.5px solid var(--line);border-radius:8px;background:#fff}
/* Ενσωμάτωση στην πλήρη προσομοίωση */
html.embed body{padding:0;background:transparent}
html.embed .wrap{max-width:none}
html.embed header, html.embed .bar, html.embed #settings, html.embed #eStart, html.embed #eSubmit, html.embed #eNew, html.embed #ePlayAll, html.embed .audio, html.embed .crumbs{display:none!important}
html.embed .sheet{box-shadow:none;border-radius:0}

/* Εστίαση στο ερώτημα που ακούγεται */
#examQs .q{padding:14px 14px 18px;margin:4px -14px;border-radius:12px;transform-origin:center top;
  transition:opacity .35s ease,transform .35s ease,box-shadow .35s ease,background-color .35s ease}
#examQs.focusing .q:not(.active){opacity:.38}
#examQs.focusing .q:not(.active):hover,#examQs.focusing .q:not(.active):focus-within{opacity:.85}
#examQs.focusing .q.active{transform:scale(1.025);background:#fff;position:relative;z-index:1;
  box-shadow:0 0 0 3px #1F7A3E,0 18px 36px -14px rgba(31,122,62,.55)}
#examQs.focusing .q.active + .q{border-top-color:transparent}
.nowbadge{display:inline-flex;align-items:center;gap:3px;font-size:.78rem;font-weight:700;color:#fff;background:#1F7A3E;border-radius:999px;padding:3px 11px 3px 9px}
.nowbadge i{display:inline-block;width:3px;height:11px;background:#fff;border-radius:2px;animation:akeq .9s ease-in-out infinite}
.nowbadge i:nth-child(2){animation-delay:.15s}
.nowbadge i:nth-child(3){animation-delay:.3s;margin-right:5px}
@keyframes akeq{0%,100%{transform:scaleY(.35)}50%{transform:scaleY(1)}}
@media (max-width:560px){#examQs.focusing .q.active{transform:scale(1.01)}}
html.embed #examQs.focusing .q.active{transform:scale(1.015)}
@media (prefers-reduced-motion:reduce){#examQs .q{transition:opacity .2s}#examQs.focusing .q.active{transform:none}.nowbadge i{animation:none}}

/* Τα κλικ στο πεντάγραμμο πηγαίνουν πάντα στο ίδιο το πεντάγραμμο
   (οι νότες και ο «οδηγός» ξανασχεδιάζονται και δεν πρέπει να «τρώνε» το κλικ) */
.staff *, .score-svg *{pointer-events:none}

/* Παύση */
.akpause{position:fixed;left:50%;top:16px;transform:translateX(-50%);z-index:50;display:flex;align-items:center;gap:16px;
  background:#1E2533;color:#fff;border-radius:999px;padding:8px 8px 8px 22px;box-shadow:0 12px 30px -10px rgba(0,0,0,.45);font-weight:600}
.akpause[hidden]{display:none}
.akpause .btn{background:#1F7A3E}

/* Μεγαλύτερη εμφάνιση σε οθόνες υπολογιστή */
@media (min-width:1100px){
  body{font-size:19px}
  html body .wrap{max-width:1000px}
  .staff{width:460px}
  .sheet{padding:32px 36px 36px 76px}
  .sheet::before{left:52px}
  .pb,.acc button{min-width:50px;height:48px}
  .rn{font-size:1.5rem}
}
@media (min-width:1500px){
  body{font-size:20px}
  html body .wrap{max-width:1180px}
  .staff{width:520px}
}

/* Χωρίς γραμμές κύλισης (η κύλιση με ροδέλα, πλήκτρα ή αφή συνεχίζει να δουλεύει) */
html,body,*{scrollbar-width:none;-ms-overflow-style:none}
html::-webkit-scrollbar,body::-webkit-scrollbar,*::-webkit-scrollbar{display:none;width:0;height:0}
html.embed,html.embed body{overflow:hidden}

/* Συμπαγής προβολή κατά την άσκηση */
html.compact header, html.compact .bar, html.compact #settings, html.compact .sheet > .instr, html.compact #intro{display:none!important}
html.compact body{padding-top:10px}
.akmenu{position:sticky;top:8px;z-index:40;display:flex;gap:8px;margin:0 0 10px}
.akmenu.inline{position:static;margin:0}
.akmenu button{font:inherit;font-size:.9rem;font-weight:600;background:#fff;color:var(--ink);border:1.5px solid var(--line);border-radius:999px;
  padding:9px 18px;cursor:pointer;box-shadow:0 8px 20px -10px rgba(0,0,0,.35)}
.akmenu button:hover{border-color:var(--ink)}
.akmenu .back{background:var(--ink);color:#fff;border-color:var(--ink)}
.akmenu[hidden]{display:none}

/* Αναδυόμενο παράθυρο οδηγιών */
.akdlg{border:0;border-radius:14px;padding:0;max-width:min(620px,92vw);width:100%;box-shadow:0 24px 60px -20px rgba(0,0,0,.5);color:var(--text);font:inherit}
.akdlg::backdrop{background:rgba(20,28,45,.45)}
.akdlg .dh{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px 10px;border-bottom:1px solid var(--line)}
.akdlg h3{font-family:"GFS Didot",Georgia,serif;font-weight:400;font-size:1.4rem;margin:0}
.akdlg .x{border:0;background:none;font-size:1.2rem;cursor:pointer;color:var(--muted);padding:4px 8px;border-radius:6px}
.akdlg .x:hover{background:var(--ink-soft)}
.akdlg .db{padding:14px 22px;max-height:60vh;overflow:auto;line-height:1.6}
.akdlg .db h4{margin:14px 0 4px;font-size:1rem}
.akdlg .db p{margin:0 0 10px}
.akdlg .db .note{background:#EAF5EE;border-left:3px solid #1F7A3E;padding:8px 12px;border-radius:6px}
.akdlg .df{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding:12px 22px 18px;border-top:1px solid var(--line)}
