/* MR Theory Board · Θεωρία 3 · Template 7
   Σημεία επανάληψης και παράλειψης + ενσωματωμένο παιχνίδι · v1.0.15 */

.mrtb-t3-repeat-signs-scene,
.mrtb-t3-repeat-signs-scene *{
  box-sizing:border-box;
}

.mrtb-t3-repeat-signs-scene{
  --t3rs-ink:#17263d;
  --t3rs-muted:#68768c;
  --t3rs-blue:#347bd7;
  --t3rs-purple:#7659df;
  --t3rs-cyan:#1ba7b9;
  --t3rs-gold:#d69a2f;
  --t3rs-green:#2baa72;
  --t3rs-red:#e15d6b;
  position:absolute;
  inset:8px 10px auto;
  z-index:28;
  min-height:760px;
  padding:14px;
  border:1px solid rgba(43,82,132,.14);
  border-radius:26px;
  color:var(--t3rs-ink);
  background:
    radial-gradient(circle at 2% 0%,rgba(74,184,255,.22),transparent 29%),
    radial-gradient(circle at 98% 1%,rgba(129,91,235,.18),transparent 28%),
    linear-gradient(154deg,rgba(255,255,255,.99),rgba(238,247,255,.97));
  box-shadow:0 17px 42px rgba(30,67,112,.15);
  overflow:hidden;
  isolation:isolate;
  font-family:inherit;
}

.mrtb-t3-repeat-signs-scene::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(70,101,145,.028) 1px,transparent 1px),
    linear-gradient(90deg,rgba(70,101,145,.028) 1px,transparent 1px);
  background-size:24px 24px;
}

.mrtb-t3-repeat-signs-scene button{
  font:inherit;
  -webkit-tap-highlight-color:transparent;
}

/* Header */
.t3rs-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(330px,.72fr);
  gap:14px;
  align-items:stretch;
  margin-bottom:12px;
}

.t3rs-heading,
.t3rs-header-rule{
  min-width:0;
  border:1px solid rgba(46,84,132,.13);
  border-radius:22px;
  background:rgba(255,255,255,.83);
  box-shadow:0 10px 25px rgba(39,75,118,.09);
}

.t3rs-heading{
  display:flex;
  gap:14px;
  align-items:center;
  padding:14px 17px;
}

.t3rs-template-number{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:58px;
  height:58px;
  border-radius:18px;
  color:#fff;
  background:linear-gradient(145deg,var(--t3rs-blue),var(--t3rs-purple));
  box-shadow:0 12px 22px rgba(85,86,207,.25);
  font-size:25px;
  font-weight:950;
}

.t3rs-kicker,
.t3rs-header-rule > span,
.t3rs-example-head > div:first-child > span{
  display:block;
  margin-bottom:4px;
  color:#2d75bf;
  font-size:9px;
  font-weight:950;
  letter-spacing:.72px;
  text-transform:uppercase;
}

.t3rs-heading h2{
  margin:0;
  color:var(--t3rs-ink);
  font-size:clamp(27px,3.2vw,42px);
  line-height:1;
  letter-spacing:-.8px;
}

.t3rs-heading p{
  margin:6px 0 0;
  color:var(--t3rs-muted);
  font-size:12px;
  font-weight:820;
}

.t3rs-header-rule{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:13px 16px;
  background:
    linear-gradient(135deg,rgba(239,247,255,.94),rgba(247,243,255,.96));
}

.t3rs-header-rule strong{
  color:#243a5a;
  font-size:13px;
  font-weight:950;
  line-height:1.25;
}

.t3rs-header-rule small{
  display:block;
  margin-top:4px;
  color:#75839a;
  font-size:10px;
  font-weight:780;
  line-height:1.35;
}

/* Main scene tabs */
.t3rs-scene-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}

.t3rs-scene-tabs button{
  position:relative;
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:10px;
  align-items:center;
  min-width:0;
  min-height:62px;
  padding:9px 13px;
  border:1px solid rgba(48,82,128,.14);
  border-radius:18px;
  color:#31445f;
  background:rgba(255,255,255,.78);
  box-shadow:0 8px 18px rgba(37,72,113,.07);
  cursor:pointer;
  text-align:left;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}

.t3rs-scene-tabs button:hover{
  transform:translateY(-1px);
  border-color:rgba(52,123,215,.34);
}

.t3rs-scene-tabs button > span{
  grid-row:1 / 3;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:12px;
  color:#527094;
  background:#edf4fc;
  font-size:14px;
  font-weight:950;
}

.t3rs-scene-tabs button b{
  align-self:end;
  font-size:12px;
  font-weight:950;
  line-height:1.1;
}

.t3rs-scene-tabs button small{
  align-self:start;
  margin:2px 0 0;
  color:#7a879b;
  font-size:9px;
  font-weight:780;
}

.t3rs-scene-tabs button.active{
  border-color:rgba(71,92,211,.35);
  color:#fff;
  background:linear-gradient(135deg,#347bd7,#7659df);
  box-shadow:0 12px 24px rgba(77,91,210,.23);
}

.t3rs-scene-tabs button.active > span{
  color:#fff;
  background:rgba(255,255,255,.18);
}

.t3rs-scene-tabs button.active small{
  color:rgba(255,255,255,.78);
}

.t3rs-stage{
  min-width:0;
}

/* Scene 1: symbols */
.t3rs-symbols-view{
  display:grid;
  grid-template-columns:minmax(280px,340px) minmax(0,1fr);
  gap:12px;
  align-items:start;
}

.t3rs-symbol-browser,
.t3rs-explanation-card,
.t3rs-example-view{
  border:1px solid rgba(47,82,128,.13);
  border-radius:24px;
  background:rgba(255,255,255,.87);
  box-shadow:0 13px 30px rgba(39,75,118,.10);
}

.t3rs-symbol-browser{
  position:sticky;
  top:8px;
  padding:10px;
}

.t3rs-filter-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-bottom:9px;
  padding:5px;
  border-radius:14px;
  background:#eff5fb;
}

.t3rs-filter-row button{
  min-height:34px;
  padding:5px 7px;
  border:0;
  border-radius:10px;
  color:#60718a;
  background:transparent;
  font-size:9px;
  font-weight:900;
  cursor:pointer;
}

.t3rs-filter-row button.active{
  color:#fff;
  background:linear-gradient(135deg,#347bd7,#7659df);
  box-shadow:0 6px 12px rgba(69,91,204,.20);
}

.t3rs-symbol-list{
  display:grid;
  gap:7px;
}

.t3rs-symbol-card{
  display:grid;
  grid-template-columns:58px minmax(0,1fr) 20px;
  gap:9px;
  align-items:center;
  min-width:0;
  min-height:68px;
  padding:8px;
  border:1px solid rgba(55,88,132,.12);
  border-radius:16px;
  color:#31445f;
  background:rgba(248,251,255,.90);
  cursor:pointer;
  text-align:left;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}

.t3rs-symbol-card:hover{
  transform:translateX(2px);
  border-color:rgba(52,123,215,.32);
}

.t3rs-symbol-card.active{
  border-color:rgba(81,93,213,.38);
  background:linear-gradient(135deg,rgba(234,245,255,.98),rgba(242,237,255,.98));
  box-shadow:0 9px 18px rgba(63,91,151,.14);
}

.t3rs-symbol-card-icon{
  display:grid;
  place-items:center;
  width:58px;
  height:50px;
  border-radius:14px;
  color:#263b5d;
  background:#fff;
  border:1px solid rgba(45,80,126,.12);
}

.t3rs-symbol-card.active .t3rs-symbol-card-icon{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(145deg,#347bd7,#7659df);
}

.t3rs-symbol-card-copy{
  min-width:0;
}

.t3rs-symbol-card-copy b{
  display:block;
  overflow:hidden;
  color:inherit;
  font-size:11px;
  font-weight:950;
  line-height:1.18;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.t3rs-symbol-card-copy small{
  display:block;
  margin-top:4px;
  overflow:hidden;
  color:#77849a;
  font-size:8.5px;
  font-weight:780;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.t3rs-symbol-card.active .t3rs-symbol-card-copy small{
  color:#62728e;
}

.t3rs-symbol-card > i{
  color:#9aa7b8;
  font-size:17px;
  font-style:normal;
  font-weight:950;
}

/* Symbol graphics */
.t3rs-music-glyph{
  display:inline-block;
  font-family:"Apple Symbols","Noto Music","Segoe UI Symbol",serif;
  font-size:37px;
  font-weight:400;
  line-height:1;
}

.t3rs-coda-glyph{
  font-size:35px;
}

.t3rs-double-segno{
  display:flex;
  gap:1px;
  align-items:center;
  justify-content:center;
}

.t3rs-double-segno i{
  font-family:"Apple Symbols","Noto Music","Segoe UI Symbol",serif;
  font-size:25px;
  font-style:normal;
  line-height:1;
}

.t3rs-letter-symbol{
  display:inline-block;
  font-size:17px;
  font-weight:1000;
  letter-spacing:-.7px;
}

.t3rs-repeat-icon{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:47px;
  height:36px;
}

.t3rs-repeat-icon::before,
.t3rs-repeat-icon::after{
  content:"";
  position:absolute;
  top:5px;
  bottom:5px;
  width:3px;
  border-radius:3px;
  background:currentColor;
}

.t3rs-repeat-icon::before{left:8px}
.t3rs-repeat-icon::after{right:8px}

.t3rs-repeat-icon .left,
.t3rs-repeat-icon .right{
  position:absolute;
  top:9px;
  bottom:9px;
  width:1.5px;
  background:currentColor;
}

.t3rs-repeat-icon .left{left:14px}
.t3rs-repeat-icon .right{right:14px}

.t3rs-repeat-icon b::before,
.t3rs-repeat-icon b::after{
  content:"";
  position:absolute;
  left:21px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:currentColor;
}

.t3rs-repeat-icon b::before{top:10px}
.t3rs-repeat-icon b::after{bottom:10px}

.t3rs-ending-icon{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:3px;
  width:46px;
}

.t3rs-ending-icon i{
  position:relative;
  display:block;
  height:27px;
  border-top:3px solid currentColor;
  border-left:3px solid currentColor;
  font-style:normal;
}

.t3rs-ending-icon b{
  position:absolute;
  top:4px;
  left:5px;
  font-size:10px;
  font-weight:950;
}

/* Explanation card */
.t3rs-explanation-card{
  min-width:0;
  padding:13px;
}

.t3rs-explanation-head{
  display:grid;
  grid-template-columns:86px minmax(0,1fr);
  gap:13px;
  align-items:center;
  margin-bottom:10px;
}

.t3rs-large-symbol{
  display:grid;
  place-items:center;
  width:86px;
  height:78px;
  border-radius:20px;
  color:#fff;
  background:linear-gradient(145deg,#347bd7,#7659df);
  box-shadow:0 12px 24px rgba(77,91,210,.22);
}

.t3rs-large-symbol .t3rs-music-glyph{font-size:53px}
.t3rs-large-symbol .t3rs-coda-glyph{font-size:49px}
.t3rs-large-symbol .t3rs-double-segno i{font-size:34px}
.t3rs-large-symbol .t3rs-letter-symbol{font-size:25px}
.t3rs-large-symbol .t3rs-repeat-icon{transform:scale(1.25)}
.t3rs-large-symbol .t3rs-ending-icon{transform:scale(1.25)}

.t3rs-explanation-head small{
  display:block;
  margin-bottom:4px;
  color:#2b75bf;
  font-size:8.5px;
  font-weight:950;
  letter-spacing:.65px;
  text-transform:uppercase;
}

.t3rs-explanation-head h3{
  margin:0;
  color:#1c2f4a;
  font-size:clamp(20px,2.4vw,31px);
  line-height:1.05;
  letter-spacing:-.45px;
}

.t3rs-explanation-head p{
  margin:6px 0 0;
  color:#65758c;
  font-size:11px;
  font-weight:780;
  line-height:1.42;
}

.t3rs-demo-scroll{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  border-radius:20px;
  background:linear-gradient(145deg,#eff7ff,#f5f1ff);
  scrollbar-width:thin;
}

.t3rs-demo-svg{
  display:block;
  width:100%;
  min-width:690px;
  height:auto;
}

.t3rs-paper{
  fill:#fffefb;
  stroke:rgba(43,77,120,.13);
  stroke-width:1.4;
}

.t3rs-staff-line,
.t3rs-bar{
  stroke:#27384f;
  stroke-linecap:round;
}

.t3rs-staff-line{stroke-width:1.55}
.t3rs-bar{stroke-width:2}

.t3rs-clef,
.t3rs-big-segno,
.t3rs-big-coda{
  fill:#22344c;
  font-family:"Apple Symbols","Noto Music","Segoe UI Symbol",serif;
}

.t3rs-clef{font-size:72px}
.t3rs-big-segno{font-size:48px}
.t3rs-big-coda{font-size:48px}
.t3rs-second-segno{fill:#7659df}
.t3rs-destination-coda{fill:#d69a2f}

.t3rs-demo-note ellipse{
  fill:#1d2d43;
}

.t3rs-demo-note line{
  stroke:#1d2d43;
  stroke-width:2.5;
  stroke-linecap:round;
}

.t3rs-repeat-mark line,
.t3rs-score-repeat-start line,
.t3rs-score-repeat-end line{
  stroke:#1e3048;
  stroke-width:4;
  stroke-linecap:round;
}

.t3rs-repeat-mark line:first-of-type,
.t3rs-score-repeat-start line:first-of-type,
.t3rs-score-repeat-end line:last-of-type{
  stroke-width:8;
}

.t3rs-repeat-mark circle,
.t3rs-score-repeat-start circle,
.t3rs-score-repeat-end circle{
  fill:#1e3048;
}

.t3rs-demo-arrows path{
  fill:none;
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.t3rs-demo-arrows marker path{
  fill:var(--t3rs-purple);
}

.t3rs-arrow-repeat,
.t3rs-arrow-command{stroke:var(--t3rs-purple)}
.t3rs-arrow-segno{stroke:var(--t3rs-cyan)}
.t3rs-arrow-coda,
.t3rs-arrow-ending{stroke:var(--t3rs-gold)}

.t3rs-arrow-text{
  fill:#576983;
  font-size:12px;
  font-weight:950;
  letter-spacing:.7px;
  text-anchor:middle;
}

.t3rs-demo-label{
  fill:#607089;
  font-size:13px;
  font-weight:900;
  text-anchor:middle;
}

.t3rs-command-box rect{
  fill:#fff;
  stroke:rgba(52,123,215,.26);
  stroke-width:1.5;
}

.t3rs-command-box text{
  fill:#263a57;
  font-size:18px;
  font-weight:1000;
  text-anchor:middle;
}

.t3rs-start-badge rect{
  fill:#eaf4ff;
  stroke:#84b5e9;
}

.t3rs-start-badge text,
.t3rs-fine,
.t3rs-to-coda{
  fill:#2e6397;
  font-size:12px;
  font-weight:950;
  text-anchor:middle;
}

.t3rs-ending-bracket{
  fill:none;
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.t3rs-ending-bracket.first{stroke:var(--t3rs-purple)}
.t3rs-ending-bracket.second{stroke:var(--t3rs-gold)}

.t3rs-ending-number{
  font-size:18px;
  font-weight:1000;
}

.t3rs-ending-number.first{fill:var(--t3rs-purple)}
.t3rs-ending-number.second{fill:var(--t3rs-gold)}

.t3rs-pass-label{
  font-size:13px;
  font-weight:950;
  text-anchor:middle;
}

.t3rs-pass-label.first{fill:var(--t3rs-purple)}
.t3rs-pass-label.second{fill:var(--t3rs-gold)}

.t3rs-rule-box{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:10px;
  align-items:center;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(52,123,215,.16);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(234,245,255,.95),rgba(245,241,255,.95));
}

.t3rs-rule-box span{
  padding:5px 8px;
  border-radius:9px;
  color:#fff;
  background:linear-gradient(135deg,#347bd7,#7659df);
  font-size:8px;
  font-weight:950;
  letter-spacing:.55px;
  text-transform:uppercase;
}

.t3rs-rule-box strong{
  color:#30445f;
  font-size:10px;
  font-weight:900;
  line-height:1.4;
}

.t3rs-step-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:9px 0 0;
  padding:0;
  list-style:none;
}

.t3rs-step-list li{
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  gap:7px;
  align-items:center;
  min-width:0;
  min-height:54px;
  padding:8px;
  border:1px solid rgba(47,81,127,.11);
  border-radius:14px;
  background:#fbfdff;
}

.t3rs-step-list li span{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:10px;
  color:#fff;
  background:linear-gradient(145deg,#347bd7,#7659df);
  font-size:10px;
  font-weight:950;
}

.t3rs-step-list li b{
  color:#53647d;
  font-size:9px;
  font-weight:850;
  line-height:1.35;
}

/* Scene 2: 16-measure example */
.t3rs-example-view{
  padding:13px;
}

.t3rs-example-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  margin-bottom:10px;
}

.t3rs-example-head h3{
  margin:0;
  color:#1d304b;
  font-size:clamp(20px,2.4vw,31px);
  line-height:1.05;
  letter-spacing:-.45px;
}

.t3rs-example-head p{
  margin:5px 0 0;
  color:#68778e;
  font-size:10.5px;
  font-weight:780;
}

.t3rs-play-controls{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  justify-content:flex-end;
}

.t3rs-play-controls button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:39px;
  padding:8px 11px;
  border:1px solid rgba(49,84,130,.15);
  border-radius:13px;
  color:#4b5e77;
  background:#fff;
  box-shadow:0 7px 15px rgba(39,73,115,.08);
  font-size:9px;
  font-weight:920;
  cursor:pointer;
}

.t3rs-play-controls button span{
  font-size:13px;
  font-weight:1000;
}

.t3rs-play-controls button.primary{
  border-color:transparent;
  color:#fff;
  background:linear-gradient(135deg,#347bd7,#7659df);
  box-shadow:0 9px 18px rgba(74,91,207,.22);
}

.t3rs-route-status{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:10px;
  align-items:center;
  margin-bottom:10px;
  padding:10px 12px;
  border:1px solid rgba(55,90,135,.14);
  border-radius:17px;
  background:linear-gradient(135deg,#f4f9ff,#f8f5ff);
}

.t3rs-route-status > span{
  min-width:105px;
  padding:7px 10px;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(135deg,#347bd7,#7659df);
  font-size:8px;
  font-weight:950;
  letter-spacing:.45px;
  text-align:center;
  text-transform:uppercase;
}

.t3rs-route-status strong{
  display:block;
  color:#2b405e;
  font-size:11px;
  font-weight:950;
}

.t3rs-route-status small{
  display:block;
  margin-top:3px;
  color:#718097;
  font-size:9px;
  font-weight:760;
}

.t3rs-score-scroll{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  border-radius:20px;
  background:#edf5fd;
  scrollbar-width:thin;
}

.t3rs-score-svg{
  display:block;
  width:100%;
  min-width:1040px;
  height:auto;
}

.t3rs-score-paper{
  fill:#fffefa;
  stroke:rgba(42,76,119,.14);
  stroke-width:1.5;
}

.t3rs-score-line,
.t3rs-score-bar{
  stroke:#263850;
  stroke-linecap:round;
}

.t3rs-score-line{stroke-width:1.35}
.t3rs-score-bar{stroke-width:1.9}

.t3rs-score-clef{
  fill:#22344c;
  font-family:"Apple Symbols","Noto Music","Segoe UI Symbol",serif;
  font-size:58px;
}

.t3rs-measure-hit{
  fill:transparent;
  stroke:transparent;
  stroke-width:2;
  transition:fill .18s ease,stroke .18s ease,filter .18s ease;
}

.t3rs-score-measure.is-first-ending .t3rs-measure-hit{
  fill:rgba(118,89,223,.045);
}

.t3rs-score-measure.is-second-ending .t3rs-measure-hit{
  fill:rgba(214,154,47,.055);
}

.t3rs-score-measure.is-active .t3rs-measure-hit{
  fill:rgba(52,123,215,.18);
  stroke:#347bd7;
  filter:drop-shadow(0 7px 7px rgba(52,123,215,.18));
}

.t3rs-score-note ellipse{
  fill:#1d2e45;
}

.t3rs-score-note line{
  stroke:#1d2e45;
  stroke-width:2.2;
  stroke-linecap:round;
}

.t3rs-measure-number{
  fill:#7b8799;
  font-size:11px;
  font-weight:950;
}

.t3rs-score-measure.is-active .t3rs-measure-number{
  fill:#1e65b5;
  font-size:14px;
}

.t3rs-score-ending{
  fill:none;
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.t3rs-score-ending.first{stroke:var(--t3rs-purple)}
.t3rs-score-ending.second{stroke:var(--t3rs-gold)}

.t3rs-score-ending-number{
  font-size:17px;
  font-weight:1000;
}

.t3rs-score-ending-number.first{fill:var(--t3rs-purple)}
.t3rs-score-ending-number.second{fill:var(--t3rs-gold)}

.t3rs-score-segno,
.t3rs-score-coda{
  font-family:"Apple Symbols","Noto Music","Segoe UI Symbol",serif;
  font-size:39px;
}

.t3rs-score-segno{fill:var(--t3rs-cyan)}
.t3rs-score-coda{fill:var(--t3rs-gold)}

.t3rs-score-instruction{
  font-size:12px;
  font-weight:1000;
  text-anchor:middle;
}

.t3rs-score-instruction.to-coda{fill:#b77a12}
.t3rs-score-instruction.ds{fill:#13889a}

.t3rs-score-routes path{
  fill:none;
  stroke-width:4.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.72;
  transition:stroke-width .2s ease,opacity .2s ease,filter .2s ease;
}

.t3rs-score-routes .repeat-route{stroke:var(--t3rs-purple)}
.t3rs-score-routes .ds-route{stroke:var(--t3rs-cyan)}
.t3rs-score-routes .coda-route{stroke:var(--t3rs-gold)}

.t3rs-score-routes text{
  font-size:12px;
  font-weight:950;
  text-anchor:middle;
}

.t3rs-score-routes .repeat-route-label{fill:#6b50c8}
.t3rs-score-routes .ds-route-label{fill:#158899}
.t3rs-score-routes .coda-route-label{fill:#b77a12}

.mrtb-t3-repeat-signs-scene[data-route-action="repeat"] .repeat-route,
.mrtb-t3-repeat-signs-scene[data-route-action="ending"] .repeat-route,
.mrtb-t3-repeat-signs-scene[data-route-action="ds"] .ds-route,
.mrtb-t3-repeat-signs-scene[data-route-action="coda"] .coda-route{
  stroke-width:8;
  opacity:1;
  filter:drop-shadow(0 5px 5px rgba(46,75,125,.25));
}

.t3rs-route-sequence{
  display:flex;
  gap:5px;
  margin-top:9px;
  padding:8px;
  overflow-x:auto;
  border:1px solid rgba(48,82,128,.11);
  border-radius:15px;
  background:#f5f9fd;
  scrollbar-width:thin;
}

.t3rs-route-sequence button{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:34px;
  height:42px;
  padding:3px;
  border:1px solid rgba(47,82,128,.13);
  border-radius:10px;
  color:#65758c;
  background:#fff;
  cursor:pointer;
}

.t3rs-route-sequence button small{
  font-size:6.5px;
  font-weight:850;
  opacity:.65;
}

.t3rs-route-sequence button b{
  font-size:11px;
  font-weight:950;
}

.t3rs-route-sequence button.passed{
  color:#2f6eaf;
  background:#eaf4ff;
}

.t3rs-route-sequence button.active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(145deg,#347bd7,#7659df);
  box-shadow:0 6px 12px rgba(74,91,207,.23);
  transform:translateY(-2px);
}

.t3rs-route-legend{
  display:flex;
  flex-wrap:wrap;
  gap:9px 16px;
  margin-top:8px;
  color:#607088;
  font-size:8.5px;
  font-weight:850;
}

.t3rs-route-legend span{
  display:inline-flex;
  gap:6px;
  align-items:center;
}

.t3rs-route-legend i{
  display:block;
  width:22px;
  height:4px;
  border-radius:4px;
}

.t3rs-route-legend i.purple{background:var(--t3rs-purple)}
.t3rs-route-legend i.cyan{background:var(--t3rs-cyan)}
.t3rs-route-legend i.gold{background:var(--t3rs-gold)}

/* Tablet */
@media (max-width:980px){
  .t3rs-header{
    grid-template-columns:1fr;
  }

  .t3rs-symbols-view{
    grid-template-columns:1fr;
  }

  .t3rs-symbol-browser{
    position:static;
  }

  .t3rs-symbol-list{
    display:flex;
    gap:7px;
    overflow-x:auto;
    padding-bottom:3px;
    scrollbar-width:thin;
  }

  .t3rs-symbol-card{
    flex:0 0 235px;
  }

  .t3rs-example-head{
    grid-template-columns:1fr;
  }

  .t3rs-play-controls{
    justify-content:flex-start;
  }
}

/* Mobile */
@media (max-width:680px){
  .mrtb-t3-repeat-signs-scene{
    inset:5px 5px auto;
    padding:8px;
    border-radius:20px;
  }

  .t3rs-header{
    gap:8px;
    margin-bottom:8px;
  }

  .t3rs-heading{
    gap:9px;
    padding:10px;
    border-radius:17px;
  }

  .t3rs-template-number{
    width:44px;
    height:44px;
    border-radius:14px;
    font-size:19px;
  }

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

  .t3rs-heading p{
    font-size:8.5px;
    line-height:1.25;
  }

  .t3rs-kicker{
    font-size:7px;
  }

  .t3rs-header-rule{
    padding:10px;
    border-radius:17px;
  }

  .t3rs-header-rule strong{
    font-size:10px;
  }

  .t3rs-header-rule small{
    font-size:8px;
  }

  .t3rs-scene-tabs{
    gap:6px;
    margin-bottom:8px;
  }

  .t3rs-scene-tabs button{
    grid-template-columns:29px minmax(0,1fr);
    column-gap:7px;
    min-height:54px;
    padding:7px;
    border-radius:14px;
  }

  .t3rs-scene-tabs button > span{
    width:29px;
    height:29px;
    border-radius:9px;
    font-size:11px;
  }

  .t3rs-scene-tabs button b{
    font-size:9px;
  }

  .t3rs-scene-tabs button small{
    font-size:7px;
  }

  .t3rs-symbol-browser,
  .t3rs-explanation-card,
  .t3rs-example-view{
    border-radius:18px;
  }

  .t3rs-symbol-browser{
    padding:7px;
  }

  .t3rs-filter-row{
    gap:4px;
    padding:4px;
    margin-bottom:6px;
  }

  .t3rs-filter-row button{
    min-height:30px;
    font-size:8px;
  }

  .t3rs-symbol-card{
    flex-basis:205px;
    grid-template-columns:48px minmax(0,1fr) 16px;
    min-height:60px;
    padding:6px;
    border-radius:13px;
  }

  .t3rs-symbol-card-icon{
    width:48px;
    height:44px;
    border-radius:11px;
  }

  .t3rs-symbol-card-copy b{
    font-size:9.5px;
  }

  .t3rs-symbol-card-copy small{
    font-size:7.5px;
  }

  .t3rs-explanation-card{
    padding:8px;
  }

  .t3rs-explanation-head{
    grid-template-columns:62px minmax(0,1fr);
    gap:9px;
    margin-bottom:7px;
  }

  .t3rs-large-symbol{
    width:62px;
    height:58px;
    border-radius:16px;
  }

  .t3rs-large-symbol .t3rs-music-glyph{font-size:39px}
  .t3rs-large-symbol .t3rs-coda-glyph{font-size:36px}
  .t3rs-large-symbol .t3rs-double-segno i{font-size:25px}
  .t3rs-large-symbol .t3rs-letter-symbol{font-size:18px}
  .t3rs-large-symbol .t3rs-repeat-icon{transform:scale(.98)}
  .t3rs-large-symbol .t3rs-ending-icon{transform:scale(.98)}

  .t3rs-explanation-head h3{
    font-size:18px;
  }

  .t3rs-explanation-head p{
    font-size:8.5px;
  }

  .t3rs-demo-svg{
    min-width:650px;
  }

  .t3rs-rule-box{
    grid-template-columns:1fr;
    gap:6px;
    padding:8px;
  }

  .t3rs-rule-box span{
    justify-self:start;
  }

  .t3rs-rule-box strong{
    font-size:8.5px;
  }

  .t3rs-step-list{
    grid-template-columns:1fr;
    gap:5px;
  }

  .t3rs-step-list li{
    min-height:43px;
    padding:6px;
  }

  .t3rs-step-list li b{
    font-size:8.5px;
  }

  .t3rs-example-view{
    padding:8px;
  }

  .t3rs-example-head h3{
    font-size:18px;
  }

  .t3rs-example-head p{
    font-size:8px;
  }

  .t3rs-play-controls{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    width:100%;
    gap:5px;
  }

  .t3rs-play-controls button{
    min-height:37px;
    padding:6px 5px;
    border-radius:11px;
    font-size:7px;
  }

  .t3rs-route-status{
    grid-template-columns:1fr;
    gap:6px;
    padding:8px;
  }

  .t3rs-route-status > span{
    justify-self:start;
    min-width:0;
    font-size:7px;
  }

  .t3rs-route-status strong{
    font-size:9px;
  }

  .t3rs-route-status small{
    font-size:7.5px;
  }

  .t3rs-score-svg{
    min-width:920px;
  }

  .t3rs-route-sequence button{
    width:31px;
    height:39px;
  }

  .t3rs-route-legend{
    gap:7px 10px;
    font-size:7px;
  }
}

@media (prefers-reduced-motion:reduce){
  .mrtb-t3-repeat-signs-scene *,
  .mrtb-t3-repeat-signs-scene *::before,
  .mrtb-t3-repeat-signs-scene *::after{
    scroll-behavior:auto !important;
    transition:none !important;
    animation:none !important;
  }
}

/* Template 7: κρύβεται μόνο το κοινό πιάνο του βασικού board.
   Δεν επηρεάζεται κανένα στοιχείο του ίδιου του template. */
.mrtb-app[data-scene="t3-repeat-signs"] .mrtb-mini-piano[data-piano],
.mrtb-app.mrtb-t3-repeat-signs-active .mrtb-mini-piano[data-piano]{
  display:none !important;
}

/* v1.0.4 · Segno / Coda as vector SVG — no music-font dependency */
.t3rs-symbol-svg{
  display:block;
  width:40px;
  height:40px;
  overflow:visible;
  color:inherit;
}

.t3rs-symbol-svg path,
.t3rs-symbol-svg line{
  fill:none;
  stroke:currentColor;
  stroke-width:5.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}

.t3rs-segno-svg circle{
  fill:currentColor;
  stroke:none;
}

.t3rs-coda-svg circle{
  fill:none;
  stroke:currentColor;
  stroke-width:5.2;
  vector-effect:non-scaling-stroke;
}

.t3rs-double-segno-vector{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
}

.t3rs-double-segno-vector .t3rs-symbol-svg{
  width:28px;
  height:35px;
}

.t3rs-symbol-card-icon .t3rs-symbol-svg{
  width:38px;
  height:38px;
}

.t3rs-symbol-card-icon .t3rs-coda-svg{
  width:36px;
  height:36px;
}

.t3rs-large-symbol .t3rs-symbol-svg{
  width:58px;
  height:58px;
}

.t3rs-large-symbol .t3rs-double-segno-vector .t3rs-symbol-svg{
  width:39px;
  height:50px;
}

.t3rs-vector-mark{
  color:#22344c;
}

.t3rs-vector-mark path,
.t3rs-vector-mark line{
  fill:none;
  stroke:currentColor;
  stroke-width:5.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}

.t3rs-vector-segno circle{
  fill:currentColor;
  stroke:none;
}

.t3rs-vector-coda circle{
  fill:none;
  stroke:currentColor;
  stroke-width:5.2;
  vector-effect:non-scaling-stroke;
}

.t3rs-vector-mark.t3rs-second-segno{
  color:var(--t3rs-purple);
}

.t3rs-vector-mark.t3rs-destination-coda{
  color:var(--t3rs-gold);
}

.t3rs-vector-mark.t3rs-score-segno{
  color:var(--t3rs-cyan);
}

.t3rs-vector-mark.t3rs-score-coda,
.t3rs-vector-mark.t3rs-score-to-coda{
  color:var(--t3rs-gold);
}

@media (max-width:700px){
  .t3rs-symbol-card-icon .t3rs-symbol-svg{
    width:31px;
    height:31px;
  }

  .t3rs-large-symbol .t3rs-symbol-svg{
    width:44px;
    height:44px;
  }

  .t3rs-large-symbol .t3rs-double-segno-vector .t3rs-symbol-svg{
    width:29px;
    height:38px;
  }
}


/* v1.0.5 · Correct Segno proportions and dot placement */
.t3rs-segno-svg path,
.t3rs-segno-svg line,
.t3rs-vector-segno path,
.t3rs-vector-segno line{
  stroke-width:6.4;
}


/* v1.0.6 · Segno and Double Segno closer to the teacher reference */
.t3rs-segno-svg path,
.t3rs-segno-svg line,
.t3rs-vector-segno path,
.t3rs-vector-segno line{
  stroke-width:7;
}

.t3rs-segno-svg circle,
.t3rs-vector-segno circle{
  fill:currentColor;
  stroke:none;
}

.t3rs-double-segno-svg{
  width:34px;
  height:58px;
}

.t3rs-double-segno-svg path,
.t3rs-vector-double-segno path{
  fill:none;
  stroke:currentColor;
  stroke-width:8.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}

.t3rs-symbol-card-icon .t3rs-double-segno-svg{
  width:28px;
  height:46px;
}

.t3rs-large-symbol .t3rs-double-segno-svg{
  width:44px;
  height:72px;
}

.t3rs-vector-double-segno{
  color:#22344c;
}

.t3rs-vector-double-segno.t3rs-second-segno{
  color:var(--t3rs-purple);
}


/* v1.0.7 · Real glyph outlines: Noto Music Segno/Coda + serif Double Segno */
.t3rs-segno-svg path,
.t3rs-coda-svg path,
.t3rs-double-segno-svg path,
.t3rs-vector-segno path,
.t3rs-vector-coda path,
.t3rs-vector-double-segno path{
  fill:currentColor !important;
  stroke:none !important;
}

.t3rs-double-segno-svg{
  width:40px;
  height:48px;
}

.t3rs-symbol-card-icon .t3rs-double-segno-svg{
  width:34px;
  height:42px;
}

.t3rs-large-symbol .t3rs-double-segno-svg{
  width:54px;
  height:62px;
}

.t3rs-vector-double-segno.t3rs-second-segno{
  color:var(--t3rs-purple);
}


/* v1.0.8 · Compact score scene + audio route */
.t3rs-example-view-compact{
  padding:8px;
}

.t3rs-score-panel{
  padding:8px;
  border:1px solid rgba(47,82,128,.13);
  border-radius:20px;
  background:rgba(255,255,255,.82);
  box-shadow:0 10px 22px rgba(39,75,118,.08);
}

.t3rs-example-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.t3rs-example-view-compact .t3rs-play-controls{
  gap:6px;
}

.t3rs-example-view-compact .t3rs-play-controls button{
  min-height:32px;
  padding:6px 10px;
  border-radius:11px;
  font-size:8.2px;
  box-shadow:0 5px 11px rgba(39,73,115,.07);
}

.t3rs-example-view-compact .t3rs-play-controls button span{
  font-size:11px;
}

.t3rs-route-status-compact{
  flex:1 1 320px;
  margin-bottom:0;
  padding:7px 10px;
  border-radius:14px;
  gap:8px;
}

.t3rs-route-status-compact > span{
  min-width:78px;
  padding:6px 8px;
  font-size:7px;
}

.t3rs-route-status-compact strong{
  font-size:9.4px;
  line-height:1.25;
}

.t3rs-route-status-compact small{
  font-size:7.8px;
  line-height:1.3;
}

.t3rs-score-scroll{
  border:1px solid rgba(48,82,128,.10);
  background:#eff6fd;
}

.t3rs-score-svg{
  min-width:860px;
}

.t3rs-route-legend i.sound{
  background:linear-gradient(135deg,#347bd7,#7659df);
  position:relative;
}

.t3rs-route-legend i.sound::after{
  content:'♪';
  position:absolute;
  top:-7px;
  left:6px;
  color:#5f53c7;
  font-size:10px;
  font-style:normal;
}

@media (max-width: 980px){
  .t3rs-route-status-compact{
    flex-basis:100%;
  }

  .t3rs-score-svg{
    min-width:780px;
  }
}

@media (max-width: 640px){
  .t3rs-example-view-compact{
    padding:6px;
  }

  .t3rs-score-panel{
    padding:6px;
    border-radius:16px;
  }

  .t3rs-example-toolbar{
    gap:6px;
  }

  .t3rs-example-view-compact .t3rs-play-controls{
    width:100%;
    justify-content:space-between;
  }

  .t3rs-example-view-compact .t3rs-play-controls button{
    flex:1 1 30%;
    min-height:30px;
    padding:6px 6px;
    font-size:7.5px;
  }

  .t3rs-score-svg{
    min-width:700px;
  }

  .t3rs-route-sequence{
    margin-top:7px;
    padding:6px;
  }
}


/* v1.0.9 · Scene 2 without chapter header */
.mrtb-t3-repeat-signs-scene[data-view="example"]{
  padding-top:10px;
}

.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-scene-tabs{
  margin-bottom:8px;
}

.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-scene-tabs button{
  min-height:48px;
  padding:7px 11px;
}

.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-scene-tabs button > span{
  width:30px;
  height:30px;
}

.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-stage{
  margin-top:0;
}


/* v1.0.10 · Allow page/score scrolling only over the 16-measure staff scene */
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled,
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled [data-board],
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .mrtb-t3-repeat-signs-scene[data-view="example"]{
  touch-action:pan-x pan-y pinch-zoom !important;
  overscroll-behavior:auto !important;
}

.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-scroll,
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-svg{
  touch-action:pan-x pan-y pinch-zoom !important;
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
  -webkit-overflow-scrolling:touch;
}

/* Buttons keep normal tap behaviour; the scroll exception is the staff only. */
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-scene-tabs,
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-play-controls,
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-route-sequence,
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled button{
  touch-action:manipulation !important;
}


/* v1.0.11 · Manual scroll bridge over the 16-measure staff.
   The shared board disables native gestures globally, so the JS routes:
   vertical gestures to the page and horizontal gestures to the score. */
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-scroll,
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-svg{
  touch-action:none !important;
  pointer-events:auto !important;
  user-select:none;
  -webkit-user-select:none;
}

.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-scroll{
  cursor:grab;
}

.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-scroll:active{
  cursor:grabbing;
}


/* v1.0.12 · Scene 2: the complete 16-measure score fits inside the viewport */
.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-score-scroll{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:calc(100vh - 260px);
  min-height:390px;
  max-height:680px;
  overflow:hidden !important;
  padding:4px;
}

.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-score-svg{
  display:block;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  height:100% !important;
  max-height:100% !important;
  margin:0 auto;
}

.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-score-panel{
  overflow:hidden;
}

.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-scroll{
  cursor:default;
}

@media (max-width:980px){
  .mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-score-scroll{
    height:calc(100vh - 235px);
    min-height:340px;
    max-height:590px;
  }
}

@media (max-width:640px){
  .mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-score-scroll{
    height:calc(100vh - 220px);
    min-height:290px;
    max-height:500px;
    padding:2px;
  }
}


/* v1.0.13 · Real melody notation and matching rhythm/audio */
.t3rs-score-note-head.is-filled{
  fill:#1d2e45;
  stroke:#1d2e45;
  stroke-width:1.2;
}

.t3rs-score-note-head.is-open{
  fill:#fffefa;
  stroke:#1d2e45;
  stroke-width:2.7;
}

.t3rs-score-note-stem,
.t3rs-score-ledger{
  stroke:#1d2e45;
  stroke-linecap:round;
}

.t3rs-score-note-stem{
  stroke-width:2.2;
}

.t3rs-score-ledger{
  stroke-width:1.6;
}

.t3rs-time-signature text{
  fill:#22344c;
  font-family:Georgia,"Times New Roman",serif;
  font-size:23px;
  font-weight:900;
  text-anchor:middle;
}

.t3rs-tempo-chip{
  display:inline-flex !important;
  align-items:center;
  gap:3px !important;
  padding:4px 7px;
  border:1px solid rgba(52,123,215,.16);
  border-radius:9px;
  color:#405775;
  background:rgba(238,246,255,.85);
}

.t3rs-tempo-chip b{
  color:#286dbb;
  font-size:8px;
}

.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-score-note{
  transition:filter .15s ease,opacity .15s ease;
}

.mrtb-t3-repeat-signs-scene[data-view="example"] .t3rs-score-measure.is-active .t3rs-score-note{
  filter:drop-shadow(0 2px 3px rgba(52,123,215,.25));
}


/* v1.0.14 · Keep the 16-measure score as the only gesture-scroll area */
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-scroll,
.mrtb-app.mrtb-t3-repeat-signs-score-scroll-enabled .t3rs-score-svg{
  pointer-events:auto !important;
  touch-action:none !important;
  user-select:none;
  -webkit-user-select:none;
}

/* ==========================================================
   ΕΝΣΩΜΑΤΩΜΕΝΟ ΠΑΙΧΝΙΔΙ TEMPLATE 7 · v1.1.0
   Setup · Γύροι · Κοινές διορθώσεις · Τελικά αποτελέσματα
   ========================================================== */

.t3rsg-scene,
.t3rsg-scene *{
  box-sizing:border-box;
}

.t3rsg-scene{
  --g-ink:#17263d;
  --g-muted:#6b7890;
  --g-blue:#347bd7;
  --g-purple:#7659df;
  --g-cyan:#1ba7b9;
  --g-gold:#d69a2f;
  --g-green:#2baa72;
  --g-red:#e15d6b;
  position:absolute;
  inset:7px 9px auto;
  z-index:220000;
  max-height:calc(100vh - 118px);
  min-height:620px;
  padding:12px;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y pinch-zoom;
  color:var(--g-ink);
  border:3px solid rgba(255,255,255,.9);
  border-radius:25px;
  background:
    radial-gradient(circle at 8% 9%,rgba(255,255,255,.88) 0 33px,transparent 35px),
    radial-gradient(circle at 92% 8%,rgba(255,255,255,.72) 0 45px,transparent 47px),
    linear-gradient(135deg,#dff4ff 0%,#edf7ff 45%,#f3efff 100%);
  box-shadow:0 18px 40px rgba(35,72,112,.18);
  font-family:inherit;
  user-select:none;
}

.t3rsg-scene::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  border-radius:22px;
  background:
    linear-gradient(90deg,rgba(255,255,255,.25) 1px,transparent 1px) 0 0/36px 36px,
    linear-gradient(0deg,rgba(255,255,255,.25) 1px,transparent 1px) 0 0/36px 36px;
  pointer-events:none;
}

.mrtb-app.mrtb-t3rsg-game-active .mrtb-t3-repeat-signs-scene,
.mrtb-app.mrtb-t3rsg-game-active .mrtb-mini-piano[data-piano]{
  display:none!important;
}

.mrtb-app.mrtb-t3rsg-game-active,
.mrtb-app.mrtb-t3rsg-game-active [data-board]{
  touch-action:pan-y pinch-zoom!important;
}

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

.t3rsg-scene button{
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

/* ===== Setup header / round header ===== */
.t3rsg-menu-head,
.t3rsg-game-head{
  position:relative;
  display:grid;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  padding:10px 12px;
  border:2px solid rgba(255,255,255,.92);
  border-radius:20px;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(243,249,255,.92));
  box-shadow:0 9px 19px rgba(36,71,111,.10),inset 0 -3px 0 rgba(0,0,0,.035);
}

.t3rsg-menu-head{
  grid-template-columns:minmax(0,1fr) 36px;
}

.t3rsg-menu-title{
  display:flex;
  gap:10px;
  align-items:center;
  min-width:0;
}

.t3rsg-game-icon{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:15px;
  color:#fff;
  background:linear-gradient(145deg,var(--g-blue),var(--g-purple));
  box-shadow:inset 0 -5px 0 rgba(0,0,0,.11),0 7px 15px rgba(74,91,207,.22);
  font-size:23px;
  font-weight:1000;
}

.t3rsg-menu-title small,
.t3rsg-game-head small{
  display:block;
  color:#3478bd;
  font-size:8px;
  font-weight:950;
  letter-spacing:.55px;
  text-transform:uppercase;
}

.t3rsg-menu-title h2,
.t3rsg-game-head h2{
  margin:1px 0 0;
  font-size:clamp(21px,2.45vw,31px);
  line-height:1;
  letter-spacing:-.5px;
}

.t3rsg-menu-title p,
.t3rsg-game-head p{
  margin:4px 0 0;
  color:var(--g-muted);
  font-size:9px;
  font-weight:800;
}

.t3rsg-close{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0;
  border:0;
  border-radius:12px;
  color:#fff;
  background:linear-gradient(145deg,#e76b76,#d84b61);
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.11),0 6px 12px rgba(216,75,97,.18);
  font-size:22px;
  font-weight:900;
}

/* ===== Setup ===== */
.t3rsg-setup{
  display:grid;
  grid-template-columns:.8fr 1.35fr .72fr;
  gap:9px;
}

.t3rsg-setup-card{
  min-width:0;
  padding:11px;
  border:1px solid rgba(47,82,128,.13);
  border-radius:19px;
  background:rgba(255,255,255,.88);
  box-shadow:0 8px 18px rgba(39,75,118,.07);
}

.t3rsg-setup-card h3{
  margin:0 0 8px;
  color:#263c59;
  font-size:11px;
  font-weight:950;
  letter-spacing:.55px;
  text-transform:uppercase;
}

.t3rsg-choice-row{
  display:grid;
  gap:6px;
}

.t3rsg-choice-row.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.t3rsg-choice-row.three{grid-template-columns:repeat(3,minmax(0,1fr))}

.t3rsg-choice-row button{
  min-height:38px;
  padding:6px;
  border:1px solid rgba(48,82,128,.14);
  border-radius:11px;
  color:#53647d;
  background:#f1f6fb;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.035);
  font-size:9px;
  font-weight:950;
}

.t3rsg-choice-row button.active{
  border-color:transparent;
  color:#fff;
  background:linear-gradient(135deg,var(--g-blue),var(--g-purple));
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.08),0 7px 14px rgba(74,91,207,.18);
}

.t3rsg-name-inputs{
  display:grid;
  gap:6px;
  margin-top:8px;
}

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

.t3rsg-name-inputs label{
  display:grid;
  gap:4px;
  color:#68778d;
  font-size:7px;
  font-weight:900;
}

.t3rsg-name-inputs input{
  width:100%;
  min-height:36px;
  padding:7px 9px;
  border:1px solid rgba(47,82,128,.17);
  border-radius:10px;
  outline:none;
  color:#263b57;
  background:#fff;
  font-size:9px;
  font-weight:900;
  user-select:text;
}

.t3rsg-name-inputs input:focus{
  border-color:#4d83d6;
  box-shadow:0 0 0 3px rgba(52,123,215,.12);
}

.t3rsg-levels{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}

.t3rsg-levels button{
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:7px;
  align-items:center;
  min-height:59px;
  padding:7px;
  border:1px solid rgba(47,82,128,.14);
  border-radius:13px;
  color:#40536d;
  background:#f4f8fc;
  text-align:left;
}

.t3rsg-levels button>b{
  grid-row:1/3;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:11px;
  color:#45617f;
  background:#e5eef8;
  font-size:9px;
  font-weight:1000;
}

.t3rsg-levels button strong{
  align-self:end;
  font-size:9px;
  font-weight:950;
}

.t3rsg-levels button small{
  align-self:start;
  color:#7a8799;
  font-size:7px;
  font-weight:780;
}

.t3rsg-levels button.active{
  border-color:transparent;
  color:#fff;
  background:linear-gradient(135deg,#347bd7,#7659df);
  box-shadow:0 8px 16px rgba(74,91,207,.19);
}

.t3rsg-levels button.active>b{
  color:#fff;
  background:rgba(255,255,255,.18);
}

.t3rsg-levels button.active small{
  color:rgba(255,255,255,.78);
}

.t3rsg-howto{
  display:grid;
  gap:5px;
  margin-top:9px;
  padding:8px;
  border-radius:12px;
  background:#eef5fb;
  color:#64748a;
  font-size:7.5px;
  font-weight:800;
}

.t3rsg-howto b{
  color:#2c4564;
  font-size:8px;
  font-weight:950;
}

.t3rsg-howto span::before{
  content:"✓";
  margin-right:5px;
  color:var(--g-green);
  font-weight:1000;
}

.t3rsg-menu-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(47,82,128,.13);
  border-radius:18px;
  background:rgba(255,255,255,.88);
  box-shadow:0 7px 15px rgba(39,75,118,.06);
}

.t3rsg-menu-footer div{
  display:grid;
  gap:2px;
}

.t3rsg-menu-footer b{font-size:10px}
.t3rsg-menu-footer span{color:#738097;font-size:8px;font-weight:800}

.t3rsg-start{
  min-height:42px;
  padding:8px 18px;
  border:0;
  border-radius:13px;
  color:#fff;
  background:linear-gradient(135deg,var(--g-blue),var(--g-purple));
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.09),0 9px 18px rgba(74,91,207,.22);
  font-size:9px;
  font-weight:1000;
}

/* ===== Round HUD ===== */
.t3rsg-game-head{
  grid-template-columns:minmax(170px,1fr) auto auto 36px;
}

.t3rsg-round-title{
  min-width:0;
}

.t3rsg-progress{
  display:flex;
  gap:5px;
  align-items:center;
}

.t3rsg-progress span{
  position:relative;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:1px solid rgba(47,82,128,.14);
  border-radius:10px;
  color:#718097;
  background:#edf4fa;
  font-size:8px;
  font-weight:1000;
}

.t3rsg-progress span.current{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(145deg,var(--g-blue),var(--g-purple));
  box-shadow:0 6px 12px rgba(74,91,207,.21);
  transform:translateY(-1px);
}

.t3rsg-progress span.done{
  color:#24704b;
  border-color:rgba(43,170,114,.22);
  background:#dcf8e8;
}

.t3rsg-progress small{
  position:absolute;
  right:2px;
  bottom:0;
  font-size:6px;
}

.t3rsg-scoreboard{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.t3rsg-scoreboard span{
  display:flex;
  gap:7px;
  align-items:center;
  min-height:34px;
  padding:6px 8px;
  border-radius:11px;
  color:#52637b;
  background:#eef5fb;
  font-size:8px;
  font-weight:900;
}

.t3rsg-scoreboard span.round-winner{
  color:#216a47;
  background:#ddf8e8;
}

.t3rsg-scoreboard strong{
  display:grid;
  place-items:center;
  min-width:24px;
  height:24px;
  border-radius:8px;
  color:#fff;
  background:linear-gradient(145deg,var(--g-blue),var(--g-purple));
  font-size:9px;
}

/* ===== Players ===== */
.t3rsg-player-grid{
  display:grid;
  gap:9px;
  align-items:start;
}

.t3rsg-player-grid.count-2{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.t3rsg-player-card{
  position:relative;
  min-width:0;
  padding:9px;
  overflow:hidden;
  border:1px solid rgba(45,79,123,.14);
  border-radius:20px;
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 23px rgba(36,72,113,.09);
}

.t3rsg-player-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:4px;
  background:linear-gradient(90deg,var(--g-blue),var(--g-purple),var(--g-cyan));
}

.t3rsg-player-card.is-correct{
  border-color:rgba(43,170,114,.60);
  background:linear-gradient(180deg,rgba(247,255,250,.96),rgba(225,250,236,.94));
  box-shadow:0 11px 26px rgba(43,170,114,.16);
}

.t3rsg-player-card.is-wrong{
  border-color:rgba(225,93,107,.60);
  background:linear-gradient(180deg,rgba(255,250,250,.96),rgba(255,231,234,.94));
  box-shadow:0 11px 26px rgba(225,93,107,.15);
}

.t3rsg-player-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:7px;
  margin-bottom:6px;
}

.t3rsg-player-head>div:first-child{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}

.t3rsg-player-head>div:first-child>span{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:9px;
  color:#fff;
  background:linear-gradient(145deg,var(--g-blue),var(--g-purple));
  font-size:9px;
  font-weight:1000;
}

.t3rsg-player-head h3{
  overflow:hidden;
  margin:0;
  font-size:12px;
  font-weight:1000;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.t3rsg-player-head>strong{
  padding:5px 8px;
  border-radius:9px;
  color:#2f6c9e;
  background:#e8f4fb;
  font-size:8px;
  font-weight:1000;
}

.t3rsg-player-status{
  padding:5px 7px;
  border-radius:8px;
  color:#5b6e85;
  background:#edf3f8;
  font-size:6.8px;
  font-weight:1000;
  letter-spacing:.35px;
}

.t3rsg-player-status.ok{
  color:#17683d;
  background:#d8f7e5;
}

.t3rsg-player-status.bad{
  color:#9c2736;
  background:#ffdce1;
}

.t3rsg-player-instruction{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
  margin-bottom:6px;
  padding:6px 8px;
  border-radius:10px;
  background:linear-gradient(135deg,#eef7ff,#f4f0ff);
}

.t3rsg-player-instruction b{
  color:#284362;
  font-size:8px;
  font-weight:950;
}

.t3rsg-player-instruction span{
  color:#718097;
  font-size:7px;
  font-weight:800;
  text-align:right;
}

/* ===== Score ===== */
.t3rsg-score-wrap{
  width:100%;
  overflow:hidden;
  border:1px solid rgba(47,82,128,.12);
  border-radius:14px;
  background:#eff6fd;
  touch-action:manipulation;
}

.t3rsg-score{
  display:block;
  width:100%;
  min-width:0;
  height:auto;
}

.t3rsg-paper{fill:#fffefa;stroke:rgba(42,76,119,.12);stroke-width:1.2}
.t3rsg-staff-line,.t3rsg-bar{stroke:#263850;stroke-linecap:round}
.t3rsg-staff-line{stroke-width:1.1}
.t3rsg-bar{stroke-width:1.55}
.t3rsg-clef{fill:#22344c;font-family:"Apple Symbols","Noto Music","Segoe UI Symbol",serif;font-size:37px;pointer-events:none}
.t3rsg-note ellipse{fill:#1e2f46}
.t3rsg-note line{stroke:#1e2f46;stroke-width:1.8;stroke-linecap:round}
.t3rsg-measure{cursor:pointer;outline:none;touch-action:manipulation}
.t3rsg-measure-hit{fill:transparent;stroke:transparent;stroke-width:2;transition:fill .15s ease,stroke .15s ease,filter .15s ease}
.t3rsg-measure:hover .t3rsg-measure-hit,.t3rsg-measure:focus .t3rsg-measure-hit{fill:rgba(52,123,215,.08);stroke:rgba(52,123,215,.55)}
.t3rsg-measure.is-picked .t3rsg-measure-hit{fill:rgba(52,123,215,.15);stroke:#347bd7;filter:drop-shadow(0 4px 4px rgba(52,123,215,.16))}
.t3rsg-measure.is-locked{pointer-events:none}
.t3rsg-measure-number{fill:#77869a;font-size:9px;font-weight:1000;pointer-events:none}
.t3rsg-pick-badge circle{fill:#347bd7}
.t3rsg-pick-badge text{fill:#fff;font-size:7px;font-weight:1000;text-anchor:middle;pointer-events:none}
.t3rsg-repeat-sign line{stroke:#202f45;stroke-width:3}
.t3rsg-repeat-sign circle{fill:#202f45}
.t3rsg-ending{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.t3rsg-ending.ending-1{stroke:var(--g-purple)}
.t3rsg-ending.ending-2{stroke:var(--g-gold)}
.t3rsg-ending-number{font-size:12px;font-weight:1000}
.t3rsg-ending-number.ending-1{fill:var(--g-purple)}
.t3rsg-ending-number.ending-2{fill:var(--g-gold)}
.t3rsg-symbol path{fill:currentColor}
.t3rsg-segno{color:var(--g-cyan)}
.t3rsg-coda{color:var(--g-gold)}
.t3rsg-double-segno{fill:var(--g-purple);font-family:Georgia,"Times New Roman",serif;font-size:38px;font-weight:900;text-anchor:middle}
.t3rsg-to-coda,.t3rsg-fine,.t3rsg-instruction{font-weight:1000;text-anchor:middle}
.t3rsg-to-coda{fill:#b77a12;font-size:8px}
.t3rsg-fine{fill:#293f5d;font-size:11px}
.t3rsg-instruction{fill:#13889a;font-size:8px}

/* ===== Answer builder ===== */
.t3rsg-route-builder{
  margin-top:6px;
  padding:6px;
  border:1px solid rgba(47,82,128,.11);
  border-radius:12px;
  background:#f4f8fc;
}

.t3rsg-route-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:5px;
  color:#40546e;
  font-size:7.5px;
  font-weight:900;
}

.t3rsg-route-head b{font-size:8px}
.t3rsg-route-head span{padding:3px 6px;border-radius:999px;background:#e4eef8}

.t3rsg-route-chips{
  display:flex;
  gap:4px;
  min-height:31px;
  padding:3px;
  overflow-x:auto;
  scrollbar-width:thin;
}

.t3rsg-route-chips span{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:29px;
  height:29px;
  border:1px solid rgba(48,82,128,.12);
  border-radius:8px;
  color:#53657c;
  background:#fff;
}

.t3rsg-route-chips small{font-size:5px;line-height:.8;opacity:.65}
.t3rsg-route-chips b{font-size:9px;line-height:1}
.t3rsg-route-chips.empty{display:grid;place-items:center}
.t3rsg-route-chips em{color:#8a96a7;font-size:7px;font-style:normal;font-weight:800}

.t3rsg-answer-compare{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin-top:6px;
}

.t3rsg-answer-compare>div{
  min-width:0;
  padding:7px;
  border-radius:11px;
  font-size:7px;
  font-weight:850;
}

.t3rsg-answer-compare .given{
  color:#6f3140;
  background:#ffe8eb;
}

.t3rsg-answer-compare .correct{
  color:#275d43;
  background:#def7e8;
}

.t3rsg-answer-compare b{
  display:block;
  margin-bottom:4px;
  font-size:8px;
}

.t3rsg-answer-compare span{
  display:block;
  overflow-wrap:anywhere;
  line-height:1.45;
}

.t3rsg-player-actions{
  display:grid;
  grid-template-columns:.75fr 1fr 1.2fr;
  gap:5px;
  margin-top:6px;
}

.t3rsg-player-actions button{
  min-height:34px;
  padding:5px;
  border:1px solid rgba(47,82,128,.13);
  border-radius:10px;
  color:#51637b;
  background:#eef4fa;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.035);
  font-size:7.5px;
  font-weight:950;
}

.t3rsg-player-actions button.submit{
  border-color:transparent;
  color:#fff;
  background:linear-gradient(135deg,var(--g-blue),var(--g-purple));
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.08),0 6px 13px rgba(74,91,207,.18);
}

.t3rsg-player-actions button:disabled{
  cursor:not-allowed;
  opacity:.42;
  box-shadow:none;
}

/* ===== Visible round results ===== */
.t3rsg-round-summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:9px;
  padding:10px 12px;
  border:2px solid rgba(255,255,255,.92);
  border-radius:17px;
  background:linear-gradient(135deg,#eef9ff,#f1efff);
  box-shadow:0 8px 18px rgba(39,75,118,.08);
}

.t3rsg-round-summary div{
  display:grid;
  gap:2px;
}

.t3rsg-round-summary small{
  color:#58708d;
  font-size:7px;
  font-weight:900;
  letter-spacing:.35px;
  text-transform:uppercase;
}

.t3rsg-round-summary strong{
  color:#263f5e;
  font-size:10px;
  font-weight:1000;
}

.t3rsg-round-summary button{
  min-height:38px;
  padding:7px 13px;
  border:0;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(135deg,var(--g-blue),var(--g-purple));
  box-shadow:0 7px 14px rgba(74,91,207,.20);
  font-size:8px;
  font-weight:1000;
}

/* ===== Final results ===== */
.t3rsg-results{
  display:grid;
  place-items:center;
  min-height:620px;
}

.t3rsg-results-overlay{
  width:100%;
  min-height:590px;
  display:grid;
  place-items:center;
  padding:18px;
  border-radius:22px;
  background:rgba(66,151,255,.12);
  backdrop-filter:blur(5px);
}

.t3rsg-results-card{
  width:min(760px,100%);
  max-height:calc(100vh - 160px);
  overflow:auto;
  padding:22px;
  border:4px solid rgba(255,255,255,.94);
  border-radius:28px;
  background:linear-gradient(180deg,#fff,#eef7ff);
  box-shadow:0 20px 50px rgba(35,72,92,.22);
  text-align:center;
  animation:t3rsg-result-pop .35s cubic-bezier(.2,1.4,.35,1) both;
}

@keyframes t3rsg-result-pop{
  from{transform:translateY(18px) scale(.92);opacity:0}
  to{transform:translateY(0) scale(1);opacity:1}
}

.t3rsg-trophy{
  font-size:58px;
  line-height:1;
}

.t3rsg-results-card h2{
  margin:7px 0 4px;
  font-size:27px;
}

.t3rsg-results-card>p{
  margin:0 0 13px;
  color:#657289;
  font-size:10px;
  font-weight:900;
}

.t3rsg-ranking{
  display:grid;
  gap:8px;
  text-align:left;
}

.t3rsg-ranking>article{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 50px;
  align-items:center;
  gap:10px;
  padding:10px 11px;
  border-radius:16px;
  background:#fff;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.045);
}

.t3rsg-ranking>article.winner{
  background:linear-gradient(180deg,#fff4b7,#ffd15f);
}

.t3rsg-result-rank{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:12px;
  color:#fff;
  background:#263044;
  font-size:17px;
  font-weight:1000;
}

.t3rsg-result-player-copy strong{
  display:block;
  font-size:14px;
}

.t3rsg-result-player-copy span{
  display:block;
  color:#657289;
  font-size:9px;
  font-weight:900;
}

.t3rsg-result-score{
  font-size:24px;
  text-align:center;
}

.t3rsg-result-rounds{
  grid-column:2/4;
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}

.t3rsg-result-rounds span{
  display:grid;
  grid-template-columns:auto auto;
  align-items:center;
  gap:2px 5px;
  padding:5px 7px;
  border-radius:10px;
  color:#1d653b;
  background:#ddffe6;
  font-size:7px;
  font-weight:1000;
}

.t3rsg-result-rounds span.bad{
  color:#8d2424;
  background:#ffe0e0;
}

.t3rsg-result-rounds small{
  opacity:.72;
  font-size:6px;
}

.t3rsg-result-rounds b{
  font-size:9px;
}

.t3rsg-result-rounds em{
  grid-column:1/3;
  overflow:hidden;
  max-width:130px;
  font-size:6.5px;
  font-style:normal;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.t3rsg-final-actions{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:7px;
  margin-top:15px;
}

.t3rsg-final-actions button{
  min-height:39px;
  padding:7px 13px;
  border:0;
  border-radius:11px;
  color:#38506b;
  background:#e8eff7;
  font-size:8px;
  font-weight:950;
}

.t3rsg-final-actions button.again{
  color:#fff;
  background:linear-gradient(135deg,var(--g-blue),var(--g-purple));
}

.t3rsg-final-actions button.setup{
  color:#244c75;
  background:linear-gradient(180deg,#d8edff,#72b7ff);
}

/* ===== Responsive ===== */
@media (max-width:1100px){
  .t3rsg-setup{
    grid-template-columns:1fr 1fr;
  }

  .t3rsg-setup-card.rounds-card{
    grid-column:1/-1;
  }

  .t3rsg-game-head{
    grid-template-columns:minmax(0,1fr) auto 36px;
  }

  .t3rsg-progress{
    grid-column:1/2;
    grid-row:2;
  }

  .t3rsg-scoreboard{
    grid-column:2/3;
    grid-row:2;
  }

  .t3rsg-close{
    grid-column:3;
    grid-row:1;
  }
}

@media (max-width:760px){
  .t3rsg-scene{
    inset:5px 5px auto;
    max-height:calc(100vh - 90px);
    padding:8px;
    border-radius:19px;
  }

  .t3rsg-setup{
    grid-template-columns:1fr;
  }

  .t3rsg-player-grid.count-2{
    grid-template-columns:1fr;
  }

  .t3rsg-menu-head{
    grid-template-columns:minmax(0,1fr) 34px;
  }

  .t3rsg-levels{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .t3rsg-game-head{
    grid-template-columns:minmax(0,1fr) 34px;
  }

  .t3rsg-round-title{
    grid-column:1;
    grid-row:1;
  }

  .t3rsg-close{
    grid-column:2;
    grid-row:1;
  }

  .t3rsg-progress{
    grid-column:1/3;
    grid-row:2;
  }

  .t3rsg-scoreboard{
    grid-column:1/3;
    grid-row:3;
    justify-content:flex-start;
  }

  .t3rsg-scoreboard span{
    flex:1 1 42%;
    justify-content:space-between;
  }

  .t3rsg-player-card{
    padding:8px;
  }

  .t3rsg-player-instruction{
    align-items:flex-start;
    flex-direction:column;
  }

  .t3rsg-player-instruction span{
    text-align:left;
  }

  .t3rsg-answer-compare{
    grid-template-columns:1fr;
  }

  .t3rsg-round-summary{
    align-items:stretch;
    flex-direction:column;
  }

  .t3rsg-round-summary button{
    width:100%;
  }

  .t3rsg-results-overlay{
    padding:8px;
  }

  .t3rsg-results-card{
    padding:14px;
  }
}

@media (max-width:520px){
  .t3rsg-menu-title h2,
  .t3rsg-game-head h2{
    font-size:19px;
  }

  .t3rsg-menu-title p,
  .t3rsg-game-head p{
    font-size:7.5px;
  }

  .t3rsg-game-icon{
    width:40px;
    height:40px;
    font-size:19px;
  }

  .t3rsg-close{
    width:32px;
    height:32px;
  }

  .t3rsg-levels{
    grid-template-columns:1fr;
  }

  .t3rsg-name-inputs.count-2{
    grid-template-columns:1fr;
  }

  .t3rsg-menu-footer{
    align-items:stretch;
    flex-direction:column;
  }

  .t3rsg-start{
    width:100%;
  }

  .t3rsg-player-head{
    grid-template-columns:minmax(0,1fr) auto;
  }

  .t3rsg-player-status{
    grid-column:1/3;
    grid-row:2;
    text-align:center;
  }

  .t3rsg-player-actions{
    grid-template-columns:1fr 1fr;
  }

  .t3rsg-player-actions .submit{
    grid-column:1/-1;
  }

  .t3rsg-score{
    min-width:0;
  }

  .t3rsg-ranking>article{
    grid-template-columns:36px minmax(0,1fr) 42px;
  }

  .t3rsg-result-rounds{
    grid-column:1/4;
  }
}

@media (prefers-reduced-motion:reduce){
  .t3rsg-scene *,
  .t3rsg-scene *::before,
  .t3rsg-scene *::after{
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
}


/* v1.0.17 · Reliable measure clicks, submitted state and round advance */
.t3rsg-score .t3rsg-system,
.t3rsg-score .t3rsg-repeat-sign,
.t3rsg-score .t3rsg-ending,
.t3rsg-score .t3rsg-ending-number,
.t3rsg-score .t3rsg-vector-segno,
.t3rsg-score .t3rsg-vector-coda,
.t3rsg-score .t3rsg-double-segno,
.t3rsg-score .t3rsg-to-coda,
.t3rsg-score .t3rsg-fine,
.t3rsg-score .t3rsg-instruction{
  pointer-events:none;
}

.t3rsg-measure-capture-layer{
  pointer-events:auto;
}

.t3rsg-measure-capture{
  fill:transparent;
  stroke:transparent;
  stroke-width:2;
  cursor:pointer;
  pointer-events:all;
  touch-action:manipulation;
  outline:none;
}

.t3rsg-measure-capture:hover,
.t3rsg-measure-capture:focus{
  fill:rgba(52,123,215,.055);
  stroke:rgba(52,123,215,.48);
}

.t3rsg-measure-capture.is-locked{
  pointer-events:none;
  cursor:default;
}

.t3rsg-scoreboard span{
  grid-template-columns:minmax(0,1fr) auto;
}

.t3rsg-scoreboard span small{
  grid-column:1 / -1;
  display:block;
  margin-top:2px;
  color:#738198;
  font-size:6.8px;
  font-weight:900;
}

.t3rsg-scoreboard span.submitted{
  border-color:rgba(43,170,114,.34);
  background:linear-gradient(135deg,#eafff5,#f4fffa);
}

.t3rsg-scoreboard span.submitted small{
  color:#238b61;
}


/* v1.0.18 · Always-visible player submission controls */
.t3rsg-player-actions-top{
  position:relative;
  z-index:8;
  grid-template-columns:72px 82px minmax(150px,1fr);
  margin:0 0 7px;
  padding:6px;
  border:1px solid rgba(47,82,128,.12);
  border-radius:13px;
  background:linear-gradient(135deg,#f4f9ff,#f6f2ff);
  box-shadow:0 5px 12px rgba(39,73,115,.07);
}

.t3rsg-player-actions-top button{
  min-height:36px;
  font-size:8px;
}

.t3rsg-player-actions-top button.submit{
  min-height:38px;
  font-size:9px;
  letter-spacing:.12px;
}

.t3rsg-player-actions-top button.submit:not(:disabled){
  animation:t3rsg-submit-ready 1.7s ease-in-out infinite;
}

.t3rsg-player-actions-top button.submit:disabled{
  opacity:.76;
}

@keyframes t3rsg-submit-ready{
  0%,100%{transform:translateY(0);box-shadow:inset 0 -4px 0 rgba(0,0,0,.08),0 6px 13px rgba(74,91,207,.18)}
  50%{transform:translateY(-1px);box-shadow:inset 0 -4px 0 rgba(0,0,0,.08),0 9px 18px rgba(74,91,207,.27)}
}

@media (max-width:760px){
  .t3rsg-player-actions-top{
    grid-template-columns:1fr 1fr;
  }

  .t3rsg-player-actions-top .submit{
    grid-column:1/-1;
  }
}
