/* =========================================================
   MR Theory Board · Θεωρία 2 · Triad συγχορδίες
   Πλήρες καθαρό layout · v0.7.9
   Αντικαθιστά ΟΛΟ το assets/css/theory2-triads.css
   ========================================================= */

.mrtb-app[data-scene="t2-triads"]{
  --t2c-panel-width:342px;
  --t2c-panel-gap:14px;
  --t2c-left-edge:14px;
  --t2c-right-space:370px;
  --t2c-staff-top:12px;
  --t2c-staff-height:425px;
  --t2c-lines-top:70px;
  --t2c-lines-height:240px;
  --t2c-line-gap:60px;
  --t2c-piano-top:450px;
  --t2c-piano-height:154px;
  --t2c-stage-height:635px;
}

/* ---------- Toolbar ---------- */

.mrtb-app[data-scene="t2-triads"] .mrtb-values-section,
.mrtb-app[data-scene="t2-triads"] [data-action="add-staff"],
.mrtb-app[data-scene="t2-triads"] [data-action="toggle-value-labels"]{
  display:none !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-sidebar{
  grid-template-columns:1fr !important;
  height:auto !important;
  min-height:48px !important;
  max-height:none !important;
  overflow:visible !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-tools-section,
.mrtb-app[data-scene="t2-triads"] .mrtb-tools-one-line{
  overflow:visible !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-tools-one-line{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:4px !important;
}

.mrtb-t2c-toolbar-accidentals{
  display:flex;
  align-items:center;
  gap:4px;
  min-width:0;
  margin-left:4px;
  padding-left:7px;
  border-left:2px solid rgba(38,48,68,.12);
}

.mrtb-t2c-toolbar-title{
  margin-right:1px;
  color:#536178;
  font-size:10px;
  line-height:1;
  font-weight:1000;
  white-space:nowrap;
  text-transform:uppercase;
}

.mrtb-t2c-toolbar-accidentals button{
  min-width:34px !important;
  min-height:28px !important;
  padding:2px 7px !important;
  border:0 !important;
  border-radius:9px !important;
  color:#263044 !important;
  background:linear-gradient(180deg,#fff,#eaf2ff) !important;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.10),0 3px 7px rgba(35,72,92,.10) !important;
  font-family:"Times New Roman",serif !important;
  font-size:19px !important;
  line-height:1 !important;
  font-weight:900 !important;
  cursor:pointer !important;
}

.mrtb-t2c-toolbar-accidentals button[data-t2c-acc=""]{
  min-width:48px !important;
  font-family:inherit !important;
  font-size:9px !important;
}

.mrtb-t2c-toolbar-accidentals button.active{
  background:linear-gradient(180deg,#ffe88c,#ffbd3e) !important;
  outline:3px solid rgba(255,184,46,.28) !important;
}

.mrtb-t2c-toolbar-selected{
  max-width:135px;
  overflow:hidden;
  padding:5px 8px;
  border-radius:999px;
  color:#40506a;
  background:rgba(255,255,255,.92);
  font-size:9px;
  line-height:1;
  font-weight:950;
  white-space:nowrap;
  text-overflow:ellipsis;
}

/* ---------- Board ---------- */

.mrtb-app[data-scene="t2-triads"] .mrtb-board{
  overflow:auto !important;
  position:relative !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-scroll-spacer{
  width:100% !important;
  height:var(--t2c-stage-height) !important;
  min-height:var(--t2c-stage-height) !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-board-wrap{
  background:
    radial-gradient(circle at 10% 8%,rgba(255,255,255,.82) 0 40px,transparent 42px),
    radial-gradient(circle at 88% 10%,rgba(255,255,255,.58) 0 52px,transparent 54px),
    linear-gradient(90deg,rgba(255,255,255,.20) 1px,transparent 1px) 0 0/42px 42px,
    linear-gradient(0deg,rgba(255,255,255,.20) 1px,transparent 1px) 0 0/42px 42px,
    linear-gradient(180deg,#9ee6ff 0%,#d7f5ff 53%,#d8f4ac 100%) !important;
}

/* ---------- Μεγάλο αλλά σωστά χωρισμένο πεντάγραμμο ---------- */

.mrtb-app[data-scene="t2-triads"] .mrtb-staff{
  left:var(--t2c-left-edge) !important;
  right:var(--t2c-right-space) !important;
  top:var(--t2c-staff-top) !important;
  height:var(--t2c-staff-height) !important;
  min-height:var(--t2c-staff-height) !important;
  border-radius:28px !important;
  overflow:visible !important;
  background:rgba(255,255,255,.76) !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-staff-lines{
  left:112px !important;
  right:28px !important;
  top:var(--t2c-lines-top) !important;
  height:var(--t2c-lines-height) !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-line:nth-child(1){top:0 !important;}
.mrtb-app[data-scene="t2-triads"] .mrtb-line:nth-child(2){top:var(--t2c-line-gap) !important;}
.mrtb-app[data-scene="t2-triads"] .mrtb-line:nth-child(3){top:calc(var(--t2c-line-gap) * 2) !important;}
.mrtb-app[data-scene="t2-triads"] .mrtb-line:nth-child(4){top:calc(var(--t2c-line-gap) * 3) !important;}
.mrtb-app[data-scene="t2-triads"] .mrtb-line:nth-child(5){top:calc(var(--t2c-line-gap) * 4) !important;}

.mrtb-app[data-scene="t2-triads"] .mrtb-clef{
  left:8px !important;
  top:42px !important;
  width:94px !important;
  font-size:140px !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-time-sig,
.mrtb-app[data-scene="t2-triads"] .mrtb-barline,
.mrtb-app[data-scene="t2-triads"] .mrtb-staff-label,
.mrtb-app[data-scene="t2-triads"] .mrtb-staff-hint{
  display:none !important;
}

/* Οι native νότες μεγαλώνουν χωρίς να αλλάζει η εισαγωγή τους. */
.mrtb-app[data-scene="t2-triads"] .mrtb-board-note{
  display:block !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-board-note .mrtb-note-glyph{
  transform:scale(1.48) !important;
  transform-origin:50% 50% !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-board-note .mrtb-note-caption{
  font-size:12px !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-board-note.mrtb-chord-note .mrtb-note-caption{
  left:92px !important;
}

/* ---------- Χειριστήρια συγχορδίας ---------- */

.mrtb-t2c-staff-actions{
  position:absolute;
  left:205px !important;
  right:390px !important;
  top:22px !important;
  z-index:40;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:7px;
  pointer-events:none;
}

.mrtb-t2c-staff-actions > *{pointer-events:auto;}

.mrtb-t2c-staff-actions button{
  min-height:34px;
  padding:6px 12px;
  border:0;
  border-radius:12px;
  color:#263044;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.10),0 6px 13px rgba(35,72,92,.13);
  font:inherit;
  font-size:12px;
  font-weight:1000;
  cursor:pointer;
}

.mrtb-t2c-staff-actions .play{background:linear-gradient(180deg,#d8ffc9,#64dc88);}
.mrtb-t2c-staff-actions .clear{background:linear-gradient(180deg,#fff,#e8eff8);}

.mrtb-t2c-staff-live{
  min-width:190px;
  max-width:330px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  overflow:hidden;
  padding:7px 12px;
  border-radius:999px;
  color:#243044;
  background:linear-gradient(180deg,#fff7bd,#ffd563);
  border:2px solid rgba(255,184,46,.22);
  box-shadow:0 5px 12px rgba(35,72,92,.10),inset 0 -3px 0 rgba(0,0,0,.06);
  white-space:nowrap;
}

.mrtb-t2c-staff-live b{font-size:19px;line-height:1;}
.mrtb-t2c-staff-live span{overflow:hidden;font-size:12px;font-weight:950;text-overflow:ellipsis;}

/* ---------- Πιάνο 2 οκτάβες: ακριβώς κάτω από staff ---------- */

.mrtb-app[data-scene="t2-triads"] .mrtb-mini-piano{
  display:block !important;
  left:18px !important;
  right:var(--t2c-right-space) !important;
  top:var(--t2c-piano-top) !important;
  bottom:auto !important;
  width:auto !important;
  max-width:none !important;
  height:var(--t2c-piano-height) !important;
  min-height:var(--t2c-piano-height) !important;
  margin:0 !important;
  padding:7px 10px 10px !important;
  box-sizing:border-box !important;
  transform:none !important;
  z-index:24 !important;
  overflow:visible !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-piano-label{
  min-height:24px !important;
  margin-bottom:3px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:2px 8px !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.75) !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-t2c-two-octave-piano .mrtb-piano-inner{
  width:100% !important;
  max-width:none !important;
  height:108px !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-t2c-two-octave-piano .mrtb-white-keys{
  grid-template-columns:repeat(15,minmax(0,1fr)) !important;
  gap:2px !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-t2c-two-octave-piano .mrtb-key.white{
  height:108px !important;
  padding:50px 1px 0 !important;
  border-radius:0 0 9px 9px !important;
  font-size:10px !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-t2c-two-octave-piano .mrtb-key.black{
  left:calc((100% / 15) * var(--x)) !important;
  width:calc((100% / 15) * .72) !important;
  height:68px !important;
  border-radius:0 0 8px 8px !important;
  font-size:9px !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-t2c-two-octave-piano .mrtb-key small{
  font-size:7px !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-key.white.mrtb-t2c-key-active{
  color:#1f3b30 !important;
  background:linear-gradient(180deg,#f6ffd9,#8de7ad) !important;
  box-shadow:inset 0 -3px 0 rgba(18,117,74,.24),0 0 0 3px rgba(50,185,123,.30),0 5px 12px rgba(35,72,92,.12) !important;
  transform:translateY(4px) !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-key.black.mrtb-t2c-key-active{
  color:#fff !important;
  background:linear-gradient(180deg,#6f8df0,#304da8) !important;
  box-shadow:inset 0 -3px 0 rgba(255,255,255,.13),0 0 0 3px rgba(81,116,223,.28),0 5px 12px rgba(0,0,0,.22) !important;
  transform:translateX(-50%) translateY(4px) !important;
}

/* ---------- Δεξί panel θεωρίας ---------- */

.mrtb-t2-triads-scene{
  position:absolute;
  left:auto !important;
  right:14px !important;
  top:10px !important;
  bottom:auto !important;
  width:var(--t2c-panel-width) !important;
  min-width:var(--t2c-panel-width) !important;
  max-width:var(--t2c-panel-width) !important;
  max-height:594px !important;
  overflow:auto !important;
  box-sizing:border-box !important;
  z-index:45 !important;
  padding:9px !important;
  border-radius:22px !important;
  color:#263044;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(241,249,255,.94));
  border:2px solid rgba(255,255,255,.96);
  box-shadow:0 16px 34px rgba(35,72,92,.15),inset 0 0 0 3px rgba(255,255,255,.34);
}

.mrtb-t2c-head{
  display:grid;
  grid-template-columns:1fr !important;
  gap:7px !important;
}

.mrtb-t2c-title{
  padding:9px 10px !important;
  border-radius:14px !important;
  background:linear-gradient(135deg,#fff,#f5faff);
  border:1px solid #e0e8f1;
}

.mrtb-t2c-title > span{
  display:block;
  color:#5c6c84;
  font-size:9px;
  font-weight:1000;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.mrtb-t2c-title h2{
  margin:2px 0 0 !important;
  font-size:20px !important;
  line-height:1 !important;
}

.mrtb-t2c-title p{
  margin:5px 0 0 !important;
  color:#627088;
  font-size:9.5px !important;
  line-height:1.3 !important;
}

.mrtb-t2c-live{
  min-height:64px !important;
  display:grid;
  align-content:center;
  padding:8px 10px !important;
  border-radius:14px !important;
  color:#fff;
  background:linear-gradient(145deg,#647184,#919bab);
}

.mrtb-t2c-live.recognized{background:linear-gradient(145deg,#294171,#4f6db5);}
.mrtb-t2c-live.unknown{background:linear-gradient(145deg,#7a5961,#ad737c);}
.mrtb-t2c-live small,.mrtb-t2c-live strong,.mrtb-t2c-live span{display:block;}
.mrtb-t2c-live small{opacity:.72;font-size:8px;font-weight:1000;text-transform:uppercase;letter-spacing:.12em;}
.mrtb-t2c-live strong{margin-top:2px;font-size:28px;line-height:1;}
.mrtb-t2c-live span{margin-top:3px;font-size:10px;font-weight:800;}

.mrtb-t2c-quality-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:6px !important;
  margin-top:7px !important;
}

.mrtb-t2c-quality-row article{
  position:relative;
  min-height:46px !important;
  padding:6px 6px 5px 12px !important;
  border:2px solid #e3e9f1;
  border-radius:12px !important;
  background:#fff;
  opacity:.78;
}

.mrtb-t2c-quality-row article::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;width:5px;
  border-radius:12px 0 0 12px;
  background:#8190a7;
}

.mrtb-t2c-quality-row article.major::before{background:#42b97d;}
.mrtb-t2c-quality-row article.minor::before{background:#5d78d9;}
.mrtb-t2c-quality-row article.diminished::before{background:#e16a73;}
.mrtb-t2c-quality-row article.augmented::before{background:#db9c2d;}
.mrtb-t2c-quality-row article.active{opacity:1;border-color:#263b6f;box-shadow:0 6px 14px rgba(35,57,105,.12);}
.mrtb-t2c-quality-row b,.mrtb-t2c-quality-row span,.mrtb-t2c-quality-row small{display:block;}
.mrtb-t2c-quality-row b{font-size:10.5px !important;}
.mrtb-t2c-quality-row span{color:#5d6c83;font-size:8px !important;font-weight:850;}
.mrtb-t2c-quality-row small{margin-top:2px;color:#6b778b;font-size:7.5px !important;font-weight:760;line-height:1.15 !important;}

.mrtb-t2c-analysis{
  display:grid;
  grid-template-columns:1fr !important;
  gap:5px !important;
  margin-top:7px !important;
}

.mrtb-t2c-analysis article{
  position:relative;
  min-height:49px !important;
  padding:7px 7px 6px 47px !important;
  border:1px solid #dfe6ef;
  border-radius:12px !important;
  background:#fbfcff;
}

.mrtb-t2c-analysis article > span{
  position:absolute;
  left:8px !important;
  top:7px !important;
  min-width:31px !important;
  padding:5px 3px !important;
  border-radius:9px;
  color:#536179;
  background:#e9eef6;
  font-size:7.5px;
  font-weight:1000;
  text-align:center;
}

.mrtb-t2c-analysis article.root > span{color:#a82f39;background:#ffe8ea;}
.mrtb-t2c-analysis article.bass > span{color:#8d6219;background:#fff0c9;}
.mrtb-t2c-analysis article.third > span{color:#3555b3;background:#e7edff;}
.mrtb-t2c-analysis article.fifth > span{color:#16794f;background:#dff7ea;}
.mrtb-t2c-analysis article.result > span{color:#8d6219;background:#fff0c9;}
.mrtb-t2c-analysis strong,.mrtb-t2c-analysis small{display:block;}
.mrtb-t2c-analysis strong{font-size:10.5px !important;line-height:1.12;}
.mrtb-t2c-analysis small{margin-top:2px !important;color:#68758a;font-size:8px !important;line-height:1.18 !important;}

/* ---------- Role badges / labels ---------- */

.mrtb-t2c-role-badge{
  position:absolute;
  left:79px;
  top:5px;
  z-index:8;
  min-width:42px;
  padding:4px 7px;
  border-radius:999px;
  border:2px solid rgba(38,48,68,.10);
  background:#fff;
  box-shadow:0 4px 9px rgba(35,72,92,.13);
  color:#263044;
  font-size:9px;
  line-height:1;
  font-weight:1000;
  text-align:center;
  pointer-events:none;
}

.mrtb-t2c-role-badge.root{color:#a82f39;background:#ffe8ea;}
.mrtb-t2c-role-badge.bass{color:#8d6219;background:#fff0c9;}
.mrtb-t2c-role-badge.third{color:#3555b3;background:#e8edff;}
.mrtb-t2c-role-badge.fifth{color:#16794f;background:#dff7ea;}

.mrtb-app[data-scene="t2-triads"] .mrtb-board-note.mrtb-t2c-root-note .mrtb-note-caption{border-color:#ef5a62 !important;}
.mrtb-app[data-scene="t2-triads"] .mrtb-board-note.mrtb-t2c-bass-note .mrtb-note-caption{border-color:#d59f2c !important;}
.mrtb-app[data-scene="t2-triads"] .mrtb-board-note.mrtb-t2c-third-note .mrtb-note-caption{border-color:#5174df !important;}
.mrtb-app[data-scene="t2-triads"] .mrtb-board-note.mrtb-t2c-fifth-note .mrtb-note-caption{border-color:#34b97e !important;}

.mrtb-app[data-scene="t2-triads"] .mrtb-accidental.mrtb-accidental-double-flat{
  left:-49px !important;
  top:8px !important;
  width:50px !important;
  min-width:50px !important;
  height:46px !important;
  display:inline-flex !important;
  align-items:flex-start !important;
  justify-content:flex-end !important;
  overflow:visible !important;
  white-space:nowrap !important;
  font-family:"Times New Roman",serif !important;
  font-size:38px !important;
  line-height:1 !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-accidental.mrtb-accidental-double-flat i{
  display:block !important;
  flex:0 0 auto !important;
  margin:0 !important;
  padding:0 !important;
  font:inherit !important;
  font-style:normal !important;
}

.mrtb-app[data-scene="t2-triads"] .mrtb-accidental.mrtb-accidental-double-flat i + i{margin-left:-8px !important;}

/* ---------- Διαστήματα 3ης / 5ης ---------- */

.mrtb-t2c-interval-overlay{
  position:absolute !important;
  inset:0 !important;
  z-index:34 !important;
  pointer-events:none !important;
  overflow:visible !important;
}

.mrtb-t2c-interval-overlay svg{display:block;overflow:visible !important;}

.mrtb-t2c-interval-guides path{
  fill:none;
  stroke-width:4;
  stroke-linecap:round;
  stroke-dasharray:9 8;
  filter:url(#mrtbT2cShadow);
}

.mrtb-t2c-interval-guides path.third{stroke:#5174df;}
.mrtb-t2c-interval-guides path.fifth{stroke:#34b97e;}
.mrtb-t2c-interval-guides .root-dot{fill:#ef5a62;stroke:#fff;stroke-width:3;}
.mrtb-t2c-interval-guides .third-dot{fill:#5174df;stroke:#fff;stroke-width:3;}
.mrtb-t2c-interval-guides .fifth-dot{fill:#34b97e;stroke:#fff;stroke-width:3;}

.mrtb-t2c-interval-label rect{
  fill:rgba(255,255,255,.97);
  stroke:#d8e1ed;
  stroke-width:2;
  filter:url(#mrtbT2cShadow);
}

.mrtb-t2c-interval-label text{fill:#263044;font-family:inherit;}
.mrtb-t2c-interval-label text.main{font-size:12px;font-weight:1000;}
.mrtb-t2c-interval-label text.sub{fill:#65738a;font-size:9px;font-weight:800;}

.mrtb-app[data-scene="t2-triads"].mrtb-draw-on .mrtb-draw-canvas{z-index:80 !important;}

/* ---------- Μικρότερες οθόνες: κρατάμε σωστό layout με οριζόντιο scroll ---------- */

@media (max-width:1180px){
  .mrtb-app[data-scene="t2-triads"] .mrtb-scroll-spacer{
    width:1120px !important;
    min-width:1120px !important;
  }

  .mrtb-app[data-scene="t2-triads"] .mrtb-staff{
    right:360px !important;
    min-width:730px !important;
  }

  .mrtb-app[data-scene="t2-triads"] .mrtb-mini-piano{
    right:360px !important;
    min-width:730px !important;
  }

  .mrtb-t2-triads-scene{
    width:330px !important;
    min-width:330px !important;
    max-width:330px !important;
  }
}

/* =========================================================
   Παιχνίδι Triad συγχορδιών · 1-9 παίκτες
   ========================================================= */

.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active{
  --t2c-stage-height:820px;
}

.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-sidebar,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-t2-triads-scene,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-t2c-staff-actions,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-t2c-interval-overlay,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-mini-piano,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-t2c-toolbar-accidentals,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-staff,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-board-note,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-note-beam,
.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-chord-stem-link{
  display:none !important;
}

.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-board{
  overflow:hidden !important;
}

.mrtb-app[data-scene="t2-triads"].mrtb-t2c-game-active .mrtb-scroll-spacer{
  height:820px !important;
  min-height:820px !important;
}

.mrtb-t2g-scene{
  position:absolute;
  inset:0;
  z-index:95;
  box-sizing:border-box;
  color:#263044;
  font-family:inherit;
}

.mrtb-t2g-scene button,
.mrtb-t2g-scene input{
  font:inherit;
}

/* ---------- Menu ---------- */

.mrtb-t2g-scene.menu{
  overflow:auto;
  padding:18px;
  background:
    radial-gradient(circle at 10% 10%,rgba(255,255,255,.86) 0 48px,transparent 50px),
    radial-gradient(circle at 88% 14%,rgba(255,255,255,.62) 0 62px,transparent 64px),
    linear-gradient(135deg,rgba(157,231,255,.98),rgba(225,249,255,.98) 48%,rgba(218,246,174,.98));
}

.mrtb-t2g-menu-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  max-width:1180px;
  margin:0 auto 14px;
  padding:18px 20px;
  border:2px solid rgba(255,255,255,.92);
  border-radius:24px;
  background:rgba(255,255,255,.88);
  box-shadow:0 14px 32px rgba(35,72,92,.12);
}

.mrtb-t2g-menu-head span{
  color:#5c6c84;
  font-size:11px;
  font-weight:1000;
  letter-spacing:.11em;
  text-transform:uppercase;
}

.mrtb-t2g-menu-head h2{
  margin:3px 0 5px;
  font-size:34px;
  line-height:1;
}

.mrtb-t2g-menu-head p{
  margin:0;
  color:#607089;
  font-size:13px;
  font-weight:750;
}

.mrtb-t2g-close{
  width:42px;
  height:42px;
  border:0;
  border-radius:14px;
  background:#fff;
  color:#263044;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.08),0 7px 16px rgba(35,72,92,.12);
  font-size:25px !important;
  font-weight:1000;
  cursor:pointer;
}

.mrtb-t2g-setup{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr);
  gap:14px;
}

.mrtb-t2g-setup-card{
  padding:15px;
  border:2px solid rgba(255,255,255,.9);
  border-radius:22px;
  background:rgba(255,255,255,.90);
  box-shadow:0 14px 30px rgba(35,72,92,.11);
}

.mrtb-t2g-setup-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}

.mrtb-t2g-setup-title b{font-size:18px;}
.mrtb-t2g-setup-title span{color:#68778d;font-size:11px;font-weight:900;}

.mrtb-t2g-counts{
  display:grid;
  grid-template-columns:repeat(9,1fr);
  gap:5px;
  margin-bottom:10px;
}

.mrtb-t2g-counts button{
  height:36px;
  border:1px solid #d7e0eb;
  border-radius:11px;
  background:#f6f9fd;
  color:#263044;
  font-weight:1000;
  cursor:pointer;
}

.mrtb-t2g-counts button.active{
  color:#fff;
  border-color:#3559ad;
  background:linear-gradient(180deg,#6285df,#3459b4);
  box-shadow:0 6px 13px rgba(52,89,180,.24);
}

.mrtb-t2g-name-inputs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.mrtb-t2g-name-inputs.count-1,
.mrtb-t2g-name-inputs.count-2{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.mrtb-t2g-name-inputs label{
  display:flex;
  align-items:center;
  gap:7px;
  padding:5px 7px;
  border:1px solid #dce4ee;
  border-radius:12px;
  background:#f8fbff;
}

.mrtb-t2g-name-inputs label span{
  flex:0 0 26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:#e8eef9;
  color:#52627a;
  font-size:11px;
  font-weight:1000;
}

.mrtb-t2g-name-inputs input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:#263044;
  font-size:13px;
  font-weight:900;
}

.mrtb-t2g-levels{
  display:grid;
  gap:8px;
}

.mrtb-t2g-levels button{
  display:grid;
  grid-template-columns:48px 1fr;
  grid-template-areas:"level title" "level small";
  align-items:center;
  gap:1px 9px;
  min-height:72px;
  padding:9px;
  border:2px solid #e0e7f0;
  border-radius:15px;
  background:#fbfdff;
  color:#263044;
  text-align:left;
  cursor:pointer;
}

.mrtb-t2g-levels button > b{
  grid-area:level;
  width:45px;
  height:45px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:#e9eef7;
  color:#40506a;
  font-size:15px;
}

.mrtb-t2g-levels button strong{grid-area:title;font-size:14px;}
.mrtb-t2g-levels button small{grid-area:small;color:#6b788d;font-size:10px;font-weight:800;}

.mrtb-t2g-levels button.active{
  border-color:#3459b4;
  background:#eef3ff;
  box-shadow:0 8px 18px rgba(52,89,180,.14);
}

.mrtb-t2g-levels button.active > b{
  color:#fff;
  background:#3459b4;
}

.mrtb-t2g-start{
  width:min(420px,calc(100% - 36px));
  min-height:54px;
  display:block;
  margin:15px auto 0;
  border:0;
  border-radius:18px;
  color:#fff;
  background:linear-gradient(180deg,#55d492,#1b9d6f);
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.12),0 12px 24px rgba(27,157,111,.25);
  font-size:17px !important;
  font-weight:1000;
  cursor:pointer;
}

/* ---------- Γύρος: ξεχωριστή συγχορδία ανά παίκτη ---------- */

.mrtb-t2g-scene.playing{
  pointer-events:none;
  overflow:hidden;
  background:
    radial-gradient(circle at 9% 11%,rgba(255,255,255,.78) 0 42px,transparent 44px),
    radial-gradient(circle at 90% 13%,rgba(255,255,255,.58) 0 54px,transparent 56px),
    linear-gradient(135deg,rgba(154,231,255,.98),rgba(229,249,255,.98) 50%,rgba(216,246,174,.98));
}

.mrtb-t2g-hud,
.mrtb-t2g-round-banner,
.mrtb-t2g-player-grid{
  pointer-events:auto;
}

.mrtb-t2g-hud{
  position:absolute;
  left:10px;
  right:10px;
  top:8px;
  min-height:48px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto 38px;
  align-items:center;
  gap:8px;
  padding:6px 8px 6px 12px;
  border:2px solid rgba(255,255,255,.94);
  border-radius:16px;
  background:rgba(255,255,255,.94);
  box-shadow:0 8px 18px rgba(35,72,92,.12);
}

.mrtb-t2g-hud-title b,
.mrtb-t2g-hud-title span{display:block;}
.mrtb-t2g-hud-title b{font-size:15px;}
.mrtb-t2g-hud-title span{color:#66758b;font-size:9px;font-weight:900;}
.mrtb-t2g-hud-help{color:#526078;font-size:11px;font-weight:850;}

.mrtb-t2g-hud button{
  min-height:34px;
  padding:5px 11px;
  border:0;
  border-radius:11px;
  background:linear-gradient(180deg,#d7ffc8,#65dc8a);
  color:#263044;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.09);
  font-size:11px !important;
  font-weight:1000;
  cursor:pointer;
}

.mrtb-t2g-hud button.close{
  width:34px;
  padding:0;
  background:#f0f4f9;
  font-size:20px !important;
}

.mrtb-t2g-round-banner{
  position:absolute;
  left:10px;
  right:10px;
  top:64px;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:5px 10px;
  border:2px solid rgba(255,255,255,.94);
  border-radius:14px;
  background:rgba(255,255,255,.94);
  box-shadow:0 7px 16px rgba(35,72,92,.11);
  text-align:center;
}

.mrtb-t2g-round-banner strong,
.mrtb-t2g-round-banner span{display:block;}
.mrtb-t2g-round-banner strong{font-size:14px;}
.mrtb-t2g-round-banner span{color:#637189;font-size:9px;font-weight:850;}

.mrtb-t2g-round-banner.result{
  justify-content:space-between;
  text-align:left;
  background:linear-gradient(180deg,#fff8c8,#ffe174);
}

.mrtb-t2g-round-banner.result strong{font-size:15px;}
.mrtb-t2g-round-banner.result span{
  max-width:900px;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.mrtb-t2g-round-banner.result button{
  flex:0 0 auto;
  min-height:34px;
  padding:5px 11px;
  border:0;
  border-radius:11px;
  color:#fff;
  background:#3459b4;
  font-size:10px !important;
  font-weight:1000;
  cursor:pointer;
}

.mrtb-t2g-player-grid{
  position:absolute;
  left:10px;
  right:10px;
  top:112px;
  bottom:10px;
  display:grid;
  gap:7px;
}

.mrtb-t2g-player-grid.count-1{grid-template-columns:1fr;grid-template-rows:1fr;}
.mrtb-t2g-player-grid.count-2{grid-template-columns:repeat(2,1fr);grid-template-rows:1fr;}
.mrtb-t2g-player-grid.count-3{grid-template-columns:repeat(3,1fr);grid-template-rows:1fr;}
.mrtb-t2g-player-grid.count-4{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);}
.mrtb-t2g-player-grid.count-5,
.mrtb-t2g-player-grid.count-6{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);}
.mrtb-t2g-player-grid.count-7,
.mrtb-t2g-player-grid.count-8,
.mrtb-t2g-player-grid.count-9{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);}

.mrtb-t2g-player-card{
  min-width:0;
  min-height:0;
  overflow:hidden;
  padding:7px;
  display:grid;
  grid-template-rows:auto minmax(58px,1fr) auto auto auto;
  gap:4px;
  border:2px solid rgba(255,255,255,.95);
  border-radius:16px;
  background:rgba(255,255,255,.93);
  box-shadow:0 7px 15px rgba(35,72,92,.10);
  transition:.18s ease;
}

.mrtb-t2g-player-card > header{
  min-width:0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:7px;
}

.mrtb-t2g-player-card > header strong{
  overflow:hidden;
  font-size:12px;
  line-height:1;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mrtb-t2g-player-card > header span{
  flex:0 0 auto;
  padding:3px 6px;
  border-radius:999px;
  background:#fff1b6;
  color:#8b641a;
  font-size:9px;
  font-weight:1000;
}

.mrtb-t2g-question-box{
  position:relative;
  min-width:0;
  min-height:0;
  overflow:hidden;
  border:1px solid #dce5ef;
  border-radius:12px;
  background:
    linear-gradient(90deg,rgba(57,83,119,.035) 1px,transparent 1px) 0 0/22px 22px,
    linear-gradient(0deg,rgba(57,83,119,.035) 1px,transparent 1px) 0 0/22px 22px,
    #fbfdff;
}

.mrtb-t2g-mini-svg{
  display:block;
  width:100%;
  height:100%;
  min-height:58px;
}

.mrtb-t2g-mini-svg .staff-lines line,
.mrtb-t2g-mini-svg .ledger{
  stroke:#263044;
  stroke-width:1.8;
  stroke-linecap:round;
}

.mrtb-t2g-mini-svg .clef{
  fill:#1e293d;
  font-family:serif;
  font-size:68px;
}

.mrtb-t2g-mini-svg .head{
  fill:#1f293d;
}

.mrtb-t2g-mini-svg .stem{
  stroke:#1f293d;
  stroke-width:3;
  stroke-linecap:round;
}

.mrtb-t2g-mini-svg .accidental{
  fill:#1f293d;
  font-family:"Times New Roman",serif;
  font-size:22px;
  font-weight:800;
}

.mrtb-t2g-player-listen{
  position:absolute;
  right:5px;
  top:5px;
  width:28px;
  height:28px;
  padding:0 !important;
  border:0 !important;
  border-radius:9px !important;
  color:#263044 !important;
  background:linear-gradient(180deg,#fff7bd,#ffd563) !important;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.08),0 4px 8px rgba(35,72,92,.12) !important;
  font-size:13px !important;
  font-weight:1000 !important;
  cursor:pointer !important;
}

.mrtb-t2g-answer-row{
  display:grid;
  gap:3px;
}

.mrtb-t2g-answer-row.roots{grid-template-columns:repeat(7,1fr);}
.mrtb-t2g-answer-row.qualities{grid-template-columns:repeat(4,1fr);}
.mrtb-t2g-player-grid.count-1 .mrtb-t2g-answer-row.roots,
.mrtb-t2g-player-grid.count-2 .mrtb-t2g-answer-row.roots{gap:6px;}

.mrtb-t2g-answer-row button{
  min-width:0;
  min-height:28px;
  padding:2px 1px;
  border:1px solid #d9e2ed;
  border-radius:8px;
  background:#f7faff;
  color:#263044;
  cursor:pointer;
}

.mrtb-t2g-answer-row button b,
.mrtb-t2g-answer-row button small{display:block;}
.mrtb-t2g-answer-row button b{font-size:11px;line-height:1;}
.mrtb-t2g-answer-row button small{margin-top:2px;color:#738095;font-size:6.5px;font-weight:800;white-space:nowrap;}

.mrtb-t2g-answer-row button.active{
  color:#fff;
  border-color:#3459b4;
  background:linear-gradient(180deg,#6687df,#3459b4);
  box-shadow:0 4px 9px rgba(52,89,180,.22);
}

.mrtb-t2g-answer-row button.active small{color:#eaf0ff;}
.mrtb-t2g-answer-row button:disabled{cursor:default;}

.mrtb-t2g-feedback{
  min-height:14px;
  overflow:hidden;
  color:#68768c;
  font-size:8px;
  line-height:1.15;
  font-weight:850;
  text-align:center;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.mrtb-t2g-player-card.locked{
  border-color:#7590d7;
  background:#f4f7ff;
  box-shadow:0 0 0 3px rgba(117,144,215,.16),0 7px 15px rgba(35,72,92,.10);
}

.mrtb-t2g-player-card.locked .mrtb-t2g-question-box{
  opacity:.82;
}

.mrtb-t2g-player-card.correct{
  border-color:#42bd7d;
  background:#edfff5;
  box-shadow:0 0 0 3px rgba(66,189,125,.18),0 8px 18px rgba(35,72,92,.10);
}

.mrtb-t2g-player-card.wrong{
  border-color:#ea747a;
  background:#fff1f2;
  box-shadow:0 0 0 3px rgba(234,116,122,.16),0 8px 18px rgba(35,72,92,.10);
}

.mrtb-t2g-player-card.correct .mrtb-t2g-feedback{color:#187f50;}
.mrtb-t2g-player-card.wrong .mrtb-t2g-feedback{color:#b33a43;}

.mrtb-t2g-player-grid.count-1 .mrtb-t2g-question-box{min-height:300px;}
.mrtb-t2g-player-grid.count-2 .mrtb-t2g-question-box{min-height:250px;}
.mrtb-t2g-player-grid.count-3 .mrtb-t2g-question-box{min-height:210px;}
.mrtb-t2g-player-grid.count-4 .mrtb-t2g-question-box{min-height:130px;}
.mrtb-t2g-player-grid.count-5 .mrtb-t2g-question-box,
.mrtb-t2g-player-grid.count-6 .mrtb-t2g-question-box{min-height:94px;}
.mrtb-t2g-player-grid.count-7 .mrtb-t2g-question-box,
.mrtb-t2g-player-grid.count-8 .mrtb-t2g-question-box,
.mrtb-t2g-player-grid.count-9 .mrtb-t2g-question-box{min-height:58px;}

/* ---------- Final ---------- */

.mrtb-t2g-scene.final{
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(216,244,231,.92);
  backdrop-filter:blur(6px);
}

.mrtb-t2g-final-card{
  width:min(720px,100%);
  max-height:100%;
  overflow:auto;
  padding:22px;
  border:3px solid rgba(255,255,255,.96);
  border-radius:26px;
  background:#fff;
  box-shadow:0 24px 55px rgba(35,72,92,.20);
  text-align:center;
}

.mrtb-t2g-trophy{font-size:58px;line-height:1;}
.mrtb-t2g-final-card h2{margin:8px 0 4px;font-size:30px;}
.mrtb-t2g-final-card > p{margin:0 0 13px;color:#65748b;font-size:12px;font-weight:850;}

.mrtb-t2g-ranking{
  display:grid;
  gap:6px;
}

.mrtb-t2g-ranking article{
  min-height:42px;
  display:grid;
  grid-template-columns:36px 1fr auto;
  align-items:center;
  gap:9px;
  padding:6px 10px;
  border:1px solid #dce4ed;
  border-radius:12px;
  background:#f8fbff;
  text-align:left;
}

.mrtb-t2g-ranking article > span{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#e8eef7;
  font-size:11px;
  font-weight:1000;
}

.mrtb-t2g-ranking article.winner{
  border-color:#e0b83d;
  background:#fff8d8;
}

.mrtb-t2g-ranking article.winner > span{background:#ffd95f;}
.mrtb-t2g-ranking article strong{font-size:13px;}
.mrtb-t2g-ranking article b{font-size:14px;}

.mrtb-t2g-final-actions{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.mrtb-t2g-final-actions button{
  min-height:40px;
  padding:7px 14px;
  border:0;
  border-radius:12px;
  background:#edf2f8;
  color:#263044;
  font-weight:1000;
  cursor:pointer;
}

.mrtb-t2g-final-actions button.again{
  color:#fff;
  background:#3459b4;
}

@media (max-width:1050px){
  .mrtb-t2g-setup{grid-template-columns:1fr;}
  .mrtb-t2g-scene.menu{padding:12px;}
  .mrtb-t2g-name-inputs{grid-template-columns:repeat(3,minmax(0,1fr));}
  .mrtb-t2g-player-card{padding:6px;gap:4px;}
  .mrtb-t2g-answer-row button{min-height:27px;}
  .mrtb-t2g-answer-row button small{display:none;}
}

@media (max-width:760px){
  .mrtb-t2g-counts{grid-template-columns:repeat(5,1fr);}
  .mrtb-t2g-name-inputs{grid-template-columns:repeat(2,minmax(0,1fr));}
  .mrtb-t2g-hud-help{display:none;}
  .mrtb-t2g-hud{grid-template-columns:minmax(0,1fr) auto 38px;}
  .mrtb-t2g-hud [data-t2g-action="listen-all"]{display:none;}
  .mrtb-t2g-scene.playing{overflow:auto;}
  .mrtb-t2g-player-grid{
    position:relative;
    left:auto;
    right:auto;
    top:auto;
    bottom:auto;
    margin:112px 8px 10px;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-template-rows:none !important;
  }
  .mrtb-t2g-question-box{min-height:82px !important;}
}
