/* MR Theory Board · Theory 3 · Template 4 · Σύνοψη όλων των Modes · v1.0.0 */

.mrtb-app.mrtb-t3-modes-summary-active .mrtb-mini-piano,
.mrtb-app.mrtb-t3-modes-summary-active .mrtb-values-section,
.mrtb-app.mrtb-t3-modes-summary-active [data-action="toggle-value-labels"],
.mrtb-app.mrtb-t3-modes-summary-active [data-action="toggle-note-labels"],
.mrtb-app.mrtb-t3-modes-summary-active [data-action="template-game"]{
  display:none !important;
}

.mrtb-t3-modes-summary-scene,
.mrtb-t3-modes-summary-scene *{
  box-sizing:border-box;
}

.mrtb-t3-modes-summary-scene{
  position:absolute;
  inset:8px 10px auto;
  z-index:100000;
  min-height:720px;
  padding:12px;
  border:1px solid rgba(42,83,136,.14);
  border-radius:22px;
  color:#18243a;
  background:
    radial-gradient(circle at 5% 0%,rgba(93,194,255,.21),transparent 29%),
    radial-gradient(circle at 96% 5%,rgba(137,105,255,.16),transparent 27%),
    linear-gradient(155deg,rgba(255,255,255,.99),rgba(239,247,255,.97));
  box-shadow:0 14px 34px rgba(35,70,116,.14);
  overflow:hidden;
  isolation:isolate;
}

.t3ms-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(250px,340px);
  gap:12px;
  align-items:center;
  margin-bottom:8px;
}

.t3ms-heading{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.t3ms-kicker{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:5px 9px;
  border-radius:999px;
  color:#2368b9;
  background:#e6f2ff;
  font-size:9px;
  font-weight:950;
  letter-spacing:.55px;
  text-transform:uppercase;
  white-space:nowrap;
}

.t3ms-heading h2{
  margin:0;
  font-size:clamp(22px,2.2vw,31px);
  line-height:1;
}

.t3ms-heading p{
  margin:4px 0 0;
  color:#60708a;
  font-size:11px;
  font-weight:800;
}

.t3ms-example-rule{
  display:grid;
  grid-template-columns:1fr;
  gap:2px;
  padding:8px 10px;
  border:1px solid rgba(46,88,143,.12);
  border-radius:15px;
  background:rgba(255,255,255,.86);
  box-shadow:0 6px 15px rgba(42,76,118,.07);
}

.t3ms-example-rule span{
  color:#61708a;
  font-size:8px;
  font-weight:950;
  letter-spacing:.55px;
  text-transform:uppercase;
}

.t3ms-example-rule strong{
  font-size:10px;
  line-height:1.22;
}

.t3ms-family-legend{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  margin-bottom:9px;
  padding:6px 8px;
  border-radius:13px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(42,78,126,.09);
  overflow:auto hidden;
}

.t3ms-family-legend > span{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:4px 7px;
  border-radius:999px;
  color:#35445d;
  background:#eef3f8;
  font-size:8px;
  font-weight:900;
  white-space:nowrap;
}

.t3ms-family-legend i{
  width:8px;
  height:8px;
  border-radius:50%;
}

.t3ms-family-legend .ionian i{background:#3b87d9}
.t3ms-family-legend .harmonic i{background:#d2508b}
.t3ms-family-legend .melodic i{background:#2eae88}

.t3ms-family-legend small{
  margin-left:auto;
  color:#68778e;
  font-size:8px;
  font-weight:850;
  white-space:nowrap;
}

.t3ms-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  align-items:start;
}

.t3ms-category{
  --category:#3677d5;
  --category-dark:#245eaa;
  --category-soft:#e7f2ff;
  min-width:0;
  padding:8px;
  border:1px solid rgba(39,74,120,.1);
  border-radius:18px;
  background:rgba(255,255,255,.91);
  box-shadow:0 7px 17px rgba(35,66,106,.08);
}

.t3ms-category.minor{
  --category:#7057d7;
  --category-dark:#5b43be;
  --category-soft:#eee9ff;
}

.t3ms-category.diminished{
  --category:#d64e68;
  --category-dark:#b73751;
  --category-soft:#ffe9ee;
}

.t3ms-category.augmented{
  --category:#e69a16;
  --category-dark:#b87500;
  --category-soft:#fff0c7;
}

.t3ms-category-head{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 25px;
  gap:7px;
  align-items:center;
  min-height:62px;
  margin-bottom:6px;
  padding:7px;
  border-radius:14px;
  color:var(--category-dark);
  background:var(--category-soft);
  border-left:5px solid var(--category);
}

.t3ms-category-symbol{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:11px;
  color:#fff;
  background:var(--category);
  font-size:10px;
  font-weight:950;
  white-space:nowrap;
}

.t3ms-category-head span{
  display:block;
  font-size:7px;
  font-weight:950;
  letter-spacing:.48px;
  text-transform:uppercase;
}

.t3ms-category-head h3{
  margin:2px 0 1px;
  color:#26334b;
  font-size:14px;
  line-height:1;
}

.t3ms-category-head p{
  margin:0;
  color:#6c778b;
  font-size:7px;
  font-weight:800;
  line-height:1.15;
}

.t3ms-category-head > strong{
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  border-radius:50%;
  color:#fff;
  background:var(--category);
  font-size:10px;
}

.t3ms-column-labels{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px;
  padding:0 6px 4px;
  color:#7a8597;
  font-size:6px;
  font-weight:950;
  letter-spacing:.35px;
  text-transform:uppercase;
}

.t3ms-mode-list{
  display:grid;
  gap:5px;
}

.t3ms-mode-row{
  position:relative;
  width:100%;
  min-height:54px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 13px;
  gap:6px;
  align-items:center;
  padding:6px 7px;
  border:1px solid rgba(43,78,124,.08);
  border-radius:12px;
  color:#26354f;
  background:linear-gradient(180deg,#fff,#f3f7fb);
  box-shadow:inset 0 -2px 0 rgba(24,50,84,.05),0 3px 8px rgba(40,74,118,.05);
  font:inherit;
  text-align:left;
  cursor:pointer;
  touch-action:manipulation;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}

.t3ms-mode-row:hover,
.t3ms-mode-row:focus-visible{
  transform:translateY(-2px);
  border-color:var(--category);
  box-shadow:0 7px 15px rgba(35,66,106,.12);
  outline:none;
}

.t3ms-mode-copy{
  min-width:0;
}

.t3ms-mode-copy b,
.t3ms-mode-copy small{
  display:block;
}

.t3ms-mode-copy b{
  overflow:hidden;
  color:#26334b;
  font-size:9px;
  line-height:1.05;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.t3ms-mode-copy small{
  margin-top:3px;
  overflow:hidden;
  color:#738095;
  font-size:6px;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.t3ms-origin{
  display:grid;
  grid-template-columns:auto 22px;
  gap:4px;
  align-items:center;
}

.t3ms-origin i{
  display:inline-flex;
  align-items:center;
  min-height:21px;
  padding:3px 5px;
  border-radius:999px;
  color:#fff;
  font-size:6px;
  font-style:normal;
  font-weight:950;
  white-space:nowrap;
}

.t3ms-origin .family-ionian{background:#3b87d9}
.t3ms-origin .family-harmonic{background:#d2508b}
.t3ms-origin .family-melodic{background:#2eae88}

.t3ms-origin strong{
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  border-radius:7px;
  color:var(--category-dark);
  background:var(--category-soft);
  font-size:8px;
}

.t3ms-open-mark{
  color:var(--category);
  font-size:18px;
  font-weight:950;
  line-height:1;
}

/* ===== popup ===== */
body.t3ms-modal-open{
  overflow:hidden;
}

.t3ms-modal,
.t3ms-modal *{
  box-sizing:border-box;
}

.t3ms-modal{
  --modal-accent:#3677d5;
  --modal-dark:#245eaa;
  --modal-soft:#e7f2ff;
  position:fixed;
  inset:0;
  z-index:2147483200;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(13,24,42,.62);
  backdrop-filter:blur(8px);
  opacity:0;
  transition:opacity .16s ease;
}

.t3ms-modal.category-minor{
  --modal-accent:#7057d7;
  --modal-dark:#5b43be;
  --modal-soft:#eee9ff;
}

.t3ms-modal.category-diminished{
  --modal-accent:#d64e68;
  --modal-dark:#b73751;
  --modal-soft:#ffe9ee;
}

.t3ms-modal.category-augmented{
  --modal-accent:#e69a16;
  --modal-dark:#b87500;
  --modal-soft:#fff0c7;
}

.t3ms-modal.is-open{
  opacity:1;
}

.t3ms-dialog{
  position:relative;
  width:min(960px,96vw);
  max-height:min(780px,92vh);
  overflow:auto;
  padding:15px;
  border:1px solid rgba(255,255,255,.7);
  border-radius:24px;
  color:#18243a;
  background:
    radial-gradient(circle at 4% 0%,rgba(93,194,255,.18),transparent 30%),
    radial-gradient(circle at 96% 4%,rgba(137,105,255,.13),transparent 28%),
    linear-gradient(155deg,#fff,#eef6ff);
  box-shadow:0 28px 80px rgba(3,12,28,.34);
  transform:translateY(10px) scale(.985);
  transition:transform .16s ease;
}

.t3ms-modal.is-open .t3ms-dialog{
  transform:translateY(0) scale(1);
}

.t3ms-dialog-close{
  position:absolute;
  right:12px;
  top:12px;
  z-index:4;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  color:#31415a;
  background:#eaf0f7;
  font:inherit;
  font-size:23px;
  font-weight:900;
  cursor:pointer;
}

.t3ms-dialog-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(210px,300px);
  gap:12px;
  align-items:center;
  padding-right:42px;
  margin-bottom:9px;
}

.t3ms-dialog-kicker{
  display:block;
  margin-bottom:3px;
  color:var(--modal-dark);
  font-size:9px;
  font-weight:950;
  letter-spacing:.48px;
  text-transform:uppercase;
}

.t3ms-dialog-head h2{
  margin:0;
  font-size:clamp(28px,4vw,45px);
  line-height:.98;
}

.t3ms-dialog-head p{
  margin:4px 0 0;
  color:#68768b;
  font-size:11px;
  font-weight:850;
}

.t3ms-dialog-quality{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:2px 8px;
  align-items:center;
  min-height:66px;
  padding:9px 10px;
  border-radius:15px;
  color:var(--modal-dark);
  background:var(--modal-soft);
  border-left:5px solid var(--modal-accent);
}

.t3ms-dialog-quality small{
  grid-column:1/3;
  font-size:7px;
  font-weight:950;
  letter-spacing:.4px;
  text-transform:uppercase;
}

.t3ms-dialog-quality strong{
  min-width:70px;
  padding:8px;
  border-radius:11px;
  color:#fff;
  background:var(--modal-accent);
  text-align:center;
  font-size:12px;
}

.t3ms-dialog-quality span{
  color:#637087;
  font-size:9px;
  font-weight:850;
  line-height:1.2;
}

.t3ms-comparison-strip{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  min-height:58px;
  margin-bottom:8px;
  padding:8px 10px;
  border-radius:15px;
  background:linear-gradient(135deg,var(--modal-soft),#fff);
  border:1px solid rgba(43,78,124,.09);
}

.t3ms-comparison-strip > div:first-child span,
.t3ms-comparison-strip > div:first-child strong{
  display:block;
}

.t3ms-comparison-strip > div:first-child span{
  color:var(--modal-dark);
  font-size:8px;
  font-weight:950;
  text-transform:uppercase;
}

.t3ms-comparison-strip > div:first-child strong{
  margin-top:3px;
  font-size:13px;
}

.t3ms-comparison-strip.base{
  display:grid;
  justify-content:start;
  gap:2px;
}

.t3ms-comparison-strip.base > span{
  color:var(--modal-dark);
  font-size:8px;
  font-weight:950;
  text-transform:uppercase;
}

.t3ms-comparison-strip.base > strong{
  font-size:15px;
}

.t3ms-comparison-strip.base > small{
  color:#6d798c;
  font-size:8px;
  font-weight:850;
}

.t3ms-comparison-changes{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:5px;
}

.t3ms-comparison-changes > span{
  display:grid;
  grid-template-columns:auto auto auto;
  grid-template-rows:auto auto;
  gap:1px 5px;
  align-items:center;
  min-width:92px;
  padding:5px 7px;
  border-radius:11px;
  color:#805400;
  background:#fff1bd;
  border:1px solid rgba(220,151,0,.2);
}

.t3ms-comparison-changes small{
  grid-column:1/4;
  font-size:7px;
  font-weight:950;
}

.t3ms-comparison-changes b,
.t3ms-comparison-changes strong{
  font-size:12px;
}

.t3ms-comparison-changes i{
  font-style:normal;
  font-weight:950;
}

.t3ms-staff-shell{
  width:100%;
  margin-bottom:8px;
  padding:5px;
  border:1px solid rgba(36,72,119,.1);
  border-radius:18px;
  background:linear-gradient(180deg,#f9fcff,#edf5fc);
  overflow:auto hidden;
}

.t3ms-staff{
  display:block;
  width:100%;
  min-width:720px;
  height:220px;
}

.t3ms-staff-paper{
  fill:rgba(255,255,255,.92);
  stroke:rgba(43,82,130,.08);
  stroke-width:2;
}

.t3ms-staff-line,
.t3ms-ledger{
  stroke:#202a3c;
  stroke-width:2.2;
  stroke-linecap:round;
}

.t3ms-clef{
  fill:#202a3c;
  font-family:"Times New Roman",serif;
  font-size:78px;
  font-weight:400;
  pointer-events:none;
}

.t3ms-staff-note{
  cursor:pointer;
  outline:none;
}

.t3ms-note-hit{
  fill:transparent;
}

.t3ms-notehead{
  fill:#202a3c;
  transition:transform .14s ease,fill .14s ease,filter .14s ease;
}

.t3ms-stem{
  stroke:#202a3c;
  stroke-width:3.2;
  stroke-linecap:round;
  transition:stroke .14s ease;
}

.t3ms-accidental{
  fill:#202a3c;
  font-family:"Times New Roman",serif;
  font-size:28px;
  font-weight:900;
}

.t3ms-degree{
  fill:#65748a;
  font-size:12px;
  font-weight:950;
}

.t3ms-note-name{
  fill:#25344d;
  font-size:14px;
  font-weight:950;
}

.t3ms-staff-note.is-root .t3ms-notehead{
  fill:var(--modal-accent);
  filter:drop-shadow(0 0 7px color-mix(in srgb,var(--modal-accent) 55%,transparent));
}

.t3ms-staff-note.is-root .t3ms-stem{
  stroke:var(--modal-accent);
}

.t3ms-staff-note.is-changed .t3ms-notehead{
  fill:#f0a400;
  filter:drop-shadow(0 0 8px rgba(240,164,0,.55));
}

.t3ms-staff-note.is-changed .t3ms-stem{
  stroke:#f0a400;
}

.t3ms-staff-note.is-changed .t3ms-degree,
.t3ms-staff-note.is-changed .t3ms-note-name{
  fill:#a46600;
}

.t3ms-staff-note.is-playing .t3ms-notehead,
.t3ms-scale-row button.is-playing{
  transform:translateY(-3px) scale(1.12);
  outline:3px solid rgba(255,91,115,.42);
}

.t3ms-staff-note.is-playing .t3ms-notehead{
  fill:#ff6577;
  transform:scale(1.18);
  transform-origin:center;
}

.t3ms-scale-row{
  display:grid;
  grid-template-columns:repeat(7,minmax(72px,1fr));
  gap:6px;
  overflow:auto hidden;
  padding-bottom:3px;
}

.t3ms-scale-row button{
  min-width:72px;
  min-height:58px;
  display:grid;
  grid-template-columns:26px 1fr;
  grid-template-rows:auto auto;
  gap:1px 6px;
  align-items:center;
  padding:6px 8px;
  border:0;
  border-radius:12px;
  color:#20304a;
  background:linear-gradient(180deg,#fff,#edf4fb);
  box-shadow:inset 0 -3px 0 rgba(27,53,89,.08),0 4px 10px rgba(34,63,104,.07);
  font:inherit;
  cursor:pointer;
  transition:transform .14s ease;
}

.t3ms-scale-row button small{
  grid-row:1/3;
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:50%;
  color:var(--modal-dark);
  background:var(--modal-soft);
  font-size:9px;
  font-weight:950;
}

.t3ms-scale-row button strong{
  align-self:end;
  font-size:17px;
  line-height:1;
}

.t3ms-scale-row button span{
  align-self:start;
  color:#748197;
  font-size:8px;
  font-weight:900;
}

.t3ms-scale-row button.is-root{
  color:#fff;
  background:linear-gradient(145deg,var(--modal-accent),#7058dc);
}

.t3ms-scale-row button.is-root small{
  color:#fff;
  background:rgba(255,255,255,.18);
}

.t3ms-scale-row button.is-root span{
  color:rgba(255,255,255,.8);
}

.t3ms-scale-row button.is-changed{
  outline:3px solid rgba(240,164,0,.33);
  background:linear-gradient(180deg,#fff9df,#ffecaa);
}

.t3ms-dialog-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:9px;
}

.t3ms-dialog-actions button{
  min-height:34px;
  border:0;
  border-radius:11px;
  padding:7px 12px;
  color:#fff;
  background:linear-gradient(145deg,var(--modal-accent),#7058dc);
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.13),0 5px 11px rgba(50,75,146,.17);
  font:inherit;
  font-size:9px;
  font-weight:950;
  cursor:pointer;
}

.t3ms-dialog-actions span{
  color:#657289;
  font-size:9px;
  font-weight:850;
}

@media (max-width:1280px){
  .t3ms-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:900px){
  .mrtb-t3-modes-summary-scene{
    inset:6px 6px auto;
    min-height:980px;
    padding:9px;
    border-radius:17px;
    overflow:auto;
  }

  .t3ms-header{
    grid-template-columns:1fr;
    gap:7px;
  }

  .t3ms-kicker{
    display:none;
  }

  .t3ms-family-legend small{
    display:none;
  }

  .t3ms-dialog-head{
    grid-template-columns:1fr;
  }

  .t3ms-comparison-strip{
    align-items:flex-start;
    flex-direction:column;
  }

  .t3ms-comparison-changes{
    justify-content:flex-start;
  }
}

@media (max-width:620px){
  .t3ms-heading{
    align-items:flex-start;
  }

  .t3ms-heading h2{
    font-size:23px;
  }

  .t3ms-heading p{
    font-size:9px;
  }

  .t3ms-summary-grid{
    grid-template-columns:1fr;
  }

  .t3ms-category-head{
    min-height:58px;
  }

  .t3ms-mode-row{
    min-height:58px;
  }

  .t3ms-modal{
    align-items:end;
    padding:8px;
  }

  .t3ms-dialog{
    width:100%;
    max-height:92vh;
    padding:12px;
    border-radius:21px 21px 14px 14px;
  }

  .t3ms-dialog-head{
    padding-right:38px;
  }

  .t3ms-dialog-head h2{
    font-size:31px;
  }

  .t3ms-dialog-quality{
    grid-template-columns:1fr;
  }

  .t3ms-dialog-quality small{
    grid-column:auto;
  }

  .t3ms-dialog-actions{
    align-items:stretch;
    flex-direction:column;
  }

  .t3ms-dialog-actions button{
    width:100%;
    min-height:42px;
  }
}
