:root{
  color-scheme:dark;
  --primary:#3CA199;
  --secondary:#964890;
  --dark:#1A1A1C;
  --light:#FEFEFE;
  --gray:#626364;
  --soft-gray:#9D9D9E;
  --bg:#0d1116;
  --panel:#111721;
  --panel-alt:#1a2230;
  --accent:var(--primary);
  --accent-2:#f8b332;
  --text:#f5f5f5;
  --border:4px;
  --shadow-x:8px;
  --shadow-y:8px;
  --shadow-color:#0b0b0c;
  --fs-base:22px;
  --fs-small:1.12rem;
  --fs-body:1.18rem;
  --fs-title:clamp(1.5rem,2.8vw,2.2rem);
}

*{box-sizing:border-box}
body{
  margin:0;
  background:
    radial-gradient(circle at 10% 20%, rgba(60,161,153,.2) 0%, rgba(60,161,153,0) 34%),
    radial-gradient(circle at 90% 10%, rgba(150,72,144,.22) 0%, rgba(150,72,144,0) 30%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.015) 0 12px, rgba(255,255,255,0) 12px 24px),
    var(--bg);
  color:var(--text);
  font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:var(--fs-base);
  line-height:1.56;
}
small,.small{
  font-size:var(--fs-small)!important;
}
.text-white-50{
  color:rgba(255,255,255,.92)!important;
}
*:focus-visible{
  outline:4px solid var(--accent-2);
  outline-offset:2px;
}

body.onboarding-active .app-shell{
  opacity:.22;
  filter:blur(3px) saturate(.9);
  pointer-events:none;
  user-select:none;
}
body.onboarding-active{
  overflow:hidden;
}

h1,h2,h3,.h1,.h2,.h3,.h4,.h5,.h6,
#currentModeLabel,
#headerModeLabel,
.mode-list .mode-card h3,
.btn{
  font-family:"Space Grotesk","Inter",system-ui,sans-serif;
  letter-spacing:-.02em;
}
h1,h2,h3,.h1,.h2,.h3,.h4,.h5,.h6{
  text-transform:uppercase;
}

.app-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.main-header{
  background:var(--panel);
  border:var(--border) solid var(--dark);
  box-shadow:var(--shadow-x) var(--shadow-y) 0 0 var(--shadow-color);
  padding:1.25rem;
  margin:1rem 1rem 0;
  position:relative;
  overflow:hidden;
}
.main-header::before{
  content:'';
  position:absolute;
  inset:0;
  background:
    radial-gradient(var(--light) 1.1px, transparent 0);
  background-size:16px 16px;
  opacity:.05;
  pointer-events:none;
}

.brand-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}

.brand-title{
  display:flex;
  align-items:center;
  gap:.75rem;
}

.header-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:1rem;
  margin-top:1rem;
}

.header-card{
  background:var(--panel-alt);
  border:var(--border) solid var(--dark);
  border-radius:.75rem;
  box-shadow:4px 4px 0 0 var(--shadow-color);
  padding:1rem;
}

.session-inline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.session-labels{
  min-width:200px;
}
#headerModeLabel{
  font-size:1.4rem;
  line-height:1.25;
}
.session-status-chip{
  border:3px solid var(--dark);
  border-radius:.7rem;
  background:rgba(255,255,255,.08);
  box-shadow:4px 4px 0 rgba(0,0,0,.45);
  padding:.62rem .8rem;
}
#sessionStatus{
  font-size:1.08rem;
  line-height:1.4;
}

.app-body{
  flex:1;
  display:grid;
  grid-template-columns:290px minmax(0,1fr) 320px;
  gap:1.25rem;
  padding:1.25rem 1rem 1rem;
}

.left-menu,
.right-panel{
  background:var(--panel);
  border:var(--border) solid var(--dark);
  border-radius:.75rem;
  box-shadow:var(--shadow-x) var(--shadow-y) 0 0 var(--shadow-color);
  padding:1rem;
  overflow-y:auto;
  position:relative;
}
.left-menu,
.right-panel{
  top:1rem;
  max-height:calc(100vh - 2rem);
}
.left-menu{position:sticky;}
.right-panel{position:sticky;}
.right-panel{
  font-size:1.1rem;
}
.right-panel .h6{
  font-size:1.14rem;
}
.right-panel .small{
  font-size:1.1rem!important;
}

.menu-card{
  background:rgba(255,255,255,.04);
  border:3px solid var(--dark);
  border-radius:.65rem;
  box-shadow:4px 4px 0 0 rgba(0,0,0,.45);
  padding:1.12rem;
  margin-bottom:1rem;
  transition:transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.menu-card:hover{
  transform:translate(-2px,-2px) rotate(-.35deg);
  box-shadow:7px 7px 0 0 rgba(0,0,0,.55);
}

.menu-card:last-child{margin-bottom:0;}
.config-card .btn{font-size:1.04rem;}

.workspace{
  position:relative;
  overflow:hidden;
  border-radius:.75rem;
  border:var(--border) solid var(--dark);
  box-shadow:var(--shadow-x) var(--shadow-y) 0 0 var(--shadow-color);
  background:rgba(1,3,11,.38);
  isolation:isolate;
}

.app-footer{
  border:var(--border) solid var(--dark);
  box-shadow:var(--shadow-x) var(--shadow-y) 0 0 var(--shadow-color);
  background:#0f1520;
  padding:1.25rem;
  margin:0 1rem 1rem;
}

.footer-content{
  display:flex;
  flex-direction:column;
  gap:1.25rem;
}

.footer-panels{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:1rem;
  width:100%;
}

.footer-signature{
  font-size:1rem;
  color:rgba(255,255,255,.75);
  text-align:center;
  width:100%;
  border-top:3px solid rgba(255,255,255,.18);
  padding-top:.75rem;
}
.footer-signature a{
  color:var(--accent-2);
  text-decoration:none;
}

@media (max-width:1200px){
  .app-body{
    grid-template-columns:220px minmax(0,1fr);
    grid-template-rows:auto auto;
  }
  .right-panel{
    grid-column:1/-1;
    position:static;
    top:auto;
    max-height:none;
  }
  .left-menu{
    position:static;
    top:auto;
    max-height:none;
  }
}

@media (max-width:992px){
  .main-header,
  .app-footer{
    margin:.75rem .75rem 0;
  }
  .app-footer{
    margin:.75rem;
  }
  .app-body{
    grid-template-columns:1fr;
    padding:1rem;
  }
  .session-inline{
    flex-direction:column;
  }
  #sidebar{
    position:fixed;
    top:0;
    bottom:0;
    left:-320px;
    width:280px;
    max-width:85vw;
    border-radius:0;
    border:0;
    border-right:var(--border) solid var(--dark);
    box-shadow:0 0 30px rgba(0,0,0,.6);
    z-index:1200;
    transition:left .3s ease;
  }
  #sidebar.open{
    left:0;
  }
}

.left-menu .btn{
  white-space:normal;
  text-wrap:balance;
}

.modal-content{
  background:var(--panel);
  color:var(--text);
  border:var(--border) solid var(--dark);
  box-shadow:var(--shadow-x) var(--shadow-y) 0 0 var(--shadow-color);
}
.modal-header,.modal-footer{border-color:rgba(255,255,255,.08);}
.modal-content .form-label{color:var(--text);}
.modal-content .form-text{color:rgba(255,255,255,.6)!important;}
.modal-content .form-check-label{color:rgba(255,255,255,.85);}
.modal-content .btn-close{filter:invert(1);}

.mode-list .mode-card{
  background:var(--panel-alt);
  border:3px solid var(--dark);
  border-radius:.6rem;
  box-shadow:4px 4px 0 0 rgba(0,0,0,.45);
  padding:.9rem;
  margin-bottom:.75rem;
  cursor:pointer;
  transition:transform .11s ease,background .11s ease,box-shadow .11s ease;
}
.mode-list .mode-card.active{outline:0;background:#213145;box-shadow:6px 6px 0 0 rgba(0,0,0,.5)}
.mode-list .mode-card:hover{background:#202c3c;transform:translate(-2px,-2px) rotate(-.4deg)}
.mode-list .mode-card h3{
  font-size:1.58rem;
  margin:0;
}
.mode-list .mode-card p{
  margin:.35rem 0 0;
  font-size:1.16rem;
  color:rgba(255,255,255,.6);
}
.mode-list .mode-card .science-note{
  margin-top:.35rem;
  font-size:.72rem;
  color:rgba(255,255,255,.45);
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:.35rem;
}
.mode-list .mode-card .science-note{display:none;}

#pillarButtons{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}
#pillarButtons .btn{
  flex:1 1 calc(50% - .5rem);
  min-width:130px;
}
.btn,.form-select,.form-control{font-size:1.16rem;}
.btn{
  border:3px solid var(--dark);
  box-shadow:4px 4px 0 0 rgba(0,0,0,.5);
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.01em;
  padding:.62rem 1rem;
}
.btn-primary{
  background:var(--primary);
  color:#fff;
}
.btn-primary:hover,
.btn-primary:focus{
  background:var(--dark);
  color:#fff;
}
.btn-outline-light{
  border-color:var(--light);
}
.btn-outline-info{
  border-color:var(--primary);
  color:#8de4dd;
}
.btn-outline-info:hover{
  background:var(--primary);
  color:#fff;
}
.form-control,.form-select{
  border:3px solid var(--dark);
  background:rgba(255,255,255,.92);
  color:#111;
  box-shadow:3px 3px 0 rgba(0,0,0,.45);
}
.btn:active{
  transform:translate(3px,3px);
  box-shadow:none;
}

.timer-box{
  background:var(--panel-alt);
  padding:.8rem;
  border-radius:.6rem;
  text-align:center;
}
.timer-box .label{font-size:.95rem;color:rgba(255,255,255,.6)}
.timer-box .value{font-size:1.6rem;font-weight:600;letter-spacing:.05em}
.session-toggles{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem 1.25rem;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.05);
  border-radius:.65rem;
  padding:.5rem .75rem;
}
.session-toggles .form-check{
  margin:0;
}

.stats-panel{
  display:flex;
  flex-direction:column;
  gap:.6rem;
}
.stats-panel .stat-item{
  background:var(--panel-alt);
  border-radius:.5rem;
  padding:.6rem;
}
.stats-panel .stat-item .label{font-size:.95rem;color:rgba(255,255,255,.55)}
.stats-panel .stat-item .value{font-weight:700;font-size:1.28rem}

.history-list{
  list-style:none;
  margin:0;
  padding:0;
  max-height:160px;
  overflow-y:auto;
}
.history-list li{
  font-size:1rem;
  padding:.46rem 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.history-list li:last-child{border-bottom:none}

.user-panel{
  background:rgba(17,20,37,.9);
  padding:1rem;
  border-radius:.75rem;
  border:1px solid rgba(255,255,255,.06);
}
.user-panel .form-select{
  background:var(--panel);
  color:var(--text);
}
.xp-bar{
  width:100%;
  height:6px;
  background:rgba(255,255,255,.12);
  border-radius:999px;
  overflow:hidden;
}
#xpProgressFill{
  height:100%;
  width:0%;
  background:var(--accent-2);
  transition:width .3s ease;
}
.leaderboard-list{
  list-style:none;
  margin:0;
  padding:0;
}
.leaderboard-list li{
  display:flex;
  justify-content:space-between;
  font-size:1rem;
  padding:.42rem 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.leaderboard-list li:last-child{border-bottom:none;}

.chord-diagrams{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
}
.diagram-block{
  flex:1 1 220px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.05);
  border-radius:.6rem;
  padding:.75rem;
}
.diagram-block h4{
  margin:0 0 .5rem;
  font-size:1.1rem;
}
.pitch-readout{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:1rem;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius:.75rem;
  padding:1rem;
}
.pitch-note{
  font-size:2.4rem;
  font-weight:700;
  min-width:90px;
  text-align:center;
}
.pitch-data{
  flex:1 1 160px;
}
.pitch-frequency{
  font-size:1.35rem;
  font-weight:600;
}
.pitch-clarity{
  color:rgba(255,255,255,.65);
}
.pitch-meter{
  flex:1 1 200px;
}
.pitch-gauge{
  position:relative;
  background:rgba(255,255,255,.08);
  border-radius:999px;
  height:6px;
  overflow:hidden;
  margin-bottom:.35rem;
}
.pitch-needle{
  position:absolute;
  top:-4px;
  width:2px;
  height:14px;
  background:var(--accent);
  border-radius:2px;
  left:50%;
  transition:left .1s ease;
}
.pitch-cents{
  font-size:1.05rem;
  color:rgba(255,255,255,.7);
}
.pitch-target-badge{
  background:#1b1f33;
  border:1px solid rgba(255,255,255,.08);
  border-radius:.6rem;
  padding:.6rem .85rem;
  display:inline-block;
  font-weight:600;
}
.match-stats{
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius:.6rem;
  padding:.6rem .75rem;
}
.pitch-match-mode .feedback-box{
  min-height:54px;
}
.piano-diagram{
  display:flex;
  gap:2px;
  margin-bottom:.4rem;
}
.piano-diagram .key{
  width:18px;
  height:40px;
  border-radius:.2rem;
  font-size:.66rem;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding-bottom:2px;
  background:#f0f0f0;
  color:#111;
}
.piano-diagram .key.sharp{
  background:#111;
  color:#fff;
  height:30px;
}
.piano-diagram .key.active{
  background:var(--accent-2);
  color:#000;
}
.note-badges{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
}
.note-badges span{
  background:rgba(255,255,255,.08);
  border-radius:999px;
  padding:.1rem .6rem;
  font-size:.95rem;
}
.string-diagram{
  list-style:none;
  margin:0;
  padding:0;
  font-size:1rem;
  line-height:1.4;
}
.string-diagram li{
  display:flex;
  gap:.25rem;
}
.string-diagram strong{
  font-weight:600;
}
.fret-diagram{
  margin-bottom:.75rem;
}
.fret-legend{
  font-size:.92rem;
  color:rgba(255,255,255,.6);
  margin-bottom:.35rem;
}
.fret-board{
  display:flex;
  flex-direction:column;
  gap:.3rem;
}
.fret-row{
  display:flex;
  align-items:center;
  gap:.4rem;
}
.fret-string-label{
  font-size:.9rem;
  min-width:24px;
  color:rgba(255,255,255,.7);
}
.fret-lane{
  position:relative;
  flex:1;
  height:18px;
  background:linear-gradient(90deg,rgba(255,255,255,.08) 0,rgba(255,255,255,.08) 100%);
  border-radius:999px;
}
.fret-lane::before,
.fret-lane::after{
  content:'';
  position:absolute;
  top:0;
  bottom:0;
  border-left:1px solid rgba(255,255,255,.1);
}
.fret-lane::before{left:25%}
.fret-lane::after{left:50%}
.fret-lane::after,
.fret-lane::before{
  pointer-events:none;
}
.fret-dot{
  position:absolute;
  top:-3px;
  transform:translateX(-50%);
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--accent);
  color:#000;
  font-size:.92rem;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
}
.fret-dot.optional{
  background:rgba(76,201,240,.4);
  color:#fff;
}
.fret-mute{
  position:absolute;
  top:0;
  left:-6px;
  font-size:.92rem;
  color:rgba(255,255,255,.7);
}
.piano-reference{
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.piano-row{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
}
.piano-octave{
  padding:.6rem;
  background:rgba(255,255,255,.05);
  border-radius:.8rem;
  min-width:220px;
}
.octave-label{
  font-size:.95rem;
  color:rgba(255,255,255,.6);
  margin-bottom:.3rem;
}
.keys-row{
  display:flex;
  gap:.2rem;
  margin-bottom:.25rem;
}
.keys-row.blacks{
  justify-content:space-between;
}
.keys-row.whites{
  justify-content:space-between;
}
.piano-key{
  border:none;
  cursor:pointer;
  border-radius:.3rem;
  font-size:.88rem;
  padding:.4rem .3rem;
  min-width:32px;
  transition:transform .1s ease,background .2s ease;
}
.piano-key.white{
  background:#fdfdfd;
  color:#111;
}
.piano-key.black{
  background:#111;
  color:#fdfdfd;
}
.piano-key:active{
  transform:translateY(2px);
}
.visual-stage{
  position:relative;
  width:100%;
  min-height:360px;
  border:3px solid var(--dark);
  border-radius:.7rem;
  box-shadow:6px 6px 0 rgba(0,0,0,.45);
  overflow:hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(60,161,153,.18) 0%, rgba(60,161,153,0) 42%),
    radial-gradient(circle at 85% 5%, rgba(150,72,144,.26) 0%, rgba(150,72,144,0) 36%),
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255,255,255,.06) 14px 15px),
    #02040a;
}

.arcade-hud{
  position:absolute;
  left:1rem;
  right:1rem;
  top:.8rem;
  z-index:3;
  display:grid;
  gap:.45rem;
  opacity:0;
  transform:translateY(-8px);
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.arcade-hud.is-visible{
  opacity:1;
  transform:none;
}
.arcade-hud__row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:.45rem;
}
.arcade-chip{
  background:rgba(0,0,0,.34);
  border:2px solid rgba(255,255,255,.42);
  border-radius:.55rem;
  padding:.28rem .55rem;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.6rem;
  box-shadow:4px 4px 0 rgba(0,0,0,.45);
}
.arcade-chip span{
  font-size:.96rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:rgba(255,255,255,.82);
}
.arcade-chip strong{
  font-size:1.45rem;
  color:#fff;
}
.arcade-mission{
  background:rgba(0,0,0,.36);
  border:2px solid rgba(255,255,255,.36);
  border-radius:.55rem;
  padding:.35rem .62rem;
  font-size:1.2rem;
  color:#fff;
  box-shadow:4px 4px 0 rgba(0,0,0,.42);
}
.arcade-rhythm{
  height:12px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.1);
  overflow:hidden;
  box-shadow:4px 4px 0 rgba(0,0,0,.35);
}
.arcade-rhythm span{
  display:block;
  width:0%;
  height:100%;
  background:linear-gradient(90deg,#3CA199 0%, #f8b332 60%, #ff5a5f 100%);
  transition:width .16s ease;
}
.arcade-hud.is-live .arcade-chip{
  border-color:var(--accent-2);
}

.phase-banner{
  position:absolute;
  top:3.8rem;
  left:50%;
  transform:translate(-50%,-8px) scale(.96);
  z-index:4;
  background:linear-gradient(90deg,var(--accent) 0%,var(--accent-2) 100%);
  border:3px solid var(--dark);
  color:#fff;
  font-family:"Space Grotesk","Inter",sans-serif;
  text-transform:uppercase;
  letter-spacing:.02em;
  font-weight:900;
  padding:.5rem 1.1rem;
  border-radius:.55rem;
  box-shadow:6px 6px 0 rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
}
.phase-banner.is-visible{
  animation:phasePop 1.2s ease both;
}

.result-overlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:2800;
  align-items:center;
  justify-content:center;
  padding:1rem;
  background:rgba(0,0,0,.28);
  backdrop-filter:blur(4px);
}
body.result-open .result-overlay{
  display:flex;
}
.result-card{
  width:min(100%,560px);
  border:4px solid var(--dark);
  border-radius:.8rem;
  background:rgba(15,20,30,.86);
  box-shadow:10px 10px 0 rgba(0,0,0,.55);
  padding:1.2rem;
}
.result-kicker{
  margin:0 0 .2rem;
  font-size:1.08rem;
  color:var(--accent-2);
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:800;
}
.result-title{
  margin:0 0 .5rem;
  font-size:1.9rem;
}
.result-stars{
  font-size:2rem;
  letter-spacing:.2em;
  color:#ffd166;
  margin-bottom:.5rem;
}
.result-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.45rem;
}
.result-grid > div{
  border:2px solid var(--dark);
  border-radius:.5rem;
  background:rgba(255,255,255,.05);
  padding:.45rem .55rem;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.4rem;
}
.result-grid span{
  font-size:1.06rem;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.result-grid strong{
  font-size:1.46rem;
}
.result-actions{
  margin-top:.75rem;
  display:flex;
  justify-content:flex-end;
  gap:.5rem;
}
.result-review-hint{
  margin:.75rem 0 0;
  min-height:1.45em;
  font-size:1.02rem;
  color:var(--accent-2);
  font-weight:700;
}

.game-menu-head{
  display:none;
}
.game-menu-backdrop{
  display:none;
}
#gameMenuToggleBtn{
  display:none;
}

body.gameplay-mode #gameMenuToggleBtn{
  display:inline-flex;
}
body.gameplay-mode #startToggleBtn,
body.gameplay-mode #focusModeBtn{
  display:none;
}
body.gameplay-mode .main-header,
body.gameplay-mode .left-menu,
body.gameplay-mode .app-footer{
  display:none;
}
body.gameplay-mode .app-body{
  grid-template-columns:1fr;
  padding:.6rem;
}
body.gameplay-mode .workspace{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:.7rem;
  padding:.65rem;
  min-height:calc(100vh - 1.2rem);
}
body.gameplay-mode .interaction-pane{
  width:min(100%,980px);
  max-width:980px;
  margin:0;
  padding:1rem;
  transform:none;
  display:flex;
  flex-direction:column;
  gap:.75rem;
  background:rgba(9,11,20,.34);
  backdrop-filter:blur(3px);
}
body.gameplay-mode .pane-header{
  position:sticky;
  top:0;
  z-index:8;
  margin:0;
  padding:.55rem .7rem;
  border:3px solid var(--dark);
  border-radius:.6rem;
  background:rgba(13,19,30,.68);
  box-shadow:8px 8px 0 rgba(0,0,0,.52);
}
body.gameplay-mode #currentPillarLabel{
  display:none;
}
body.gameplay-mode #currentModeLabel{
  font-size:clamp(1.4rem,2.6vw,2rem);
}
body.gameplay-mode #modeDescription{
  margin-top:.2rem;
  min-height:auto;
  font-size:1.2rem;
  line-height:1.45;
}
body.gameplay-mode .mode-meta-footer{
  margin-top:.35rem;
  font-size:1.16rem;
  background:rgba(255,255,255,.025);
}
body.question-flow #modeDescription,
body.question-flow .mode-meta-footer{
  display:none;
}
body.question-flow #interactionContent > div{
  border:3px solid var(--dark);
  border-radius:.8rem;
  background:rgba(6,10,18,.44);
  padding:1rem;
  box-shadow:7px 7px 0 rgba(0,0,0,.45);
}
body.question-flow .science-callout{
  display:none;
}
body.question-flow #interactionContent p{
  font-size:1.06rem;
}
body.gameplay-mode .arcade-hud{
  position:relative;
  top:auto;
  left:auto;
  right:auto;
  width:min(100%,980px);
  z-index:7;
  pointer-events:auto;
}
body.gameplay-mode .phase-banner{
  position:relative;
  top:auto;
  left:auto;
  transform:translateY(-6px);
  margin:0 auto;
  z-index:7;
}
body.gameplay-mode .phase-banner.is-visible{
  animation:phasePopFlow 1.2s ease both;
}
body.gameplay-mode .session-floating-controls{
  position:sticky;
  right:auto;
  bottom:.45rem;
  align-self:flex-end;
  z-index:9;
}
body.gameplay-mode .right-panel{
  display:block;
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  width:min(92vw,420px);
  max-height:none;
  border-radius:0;
  transform:translateX(108%);
  transition:transform .2s ease;
  z-index:2500;
  overflow-y:auto;
}
body.gameplay-mode .game-menu-head{
  display:flex;
  position:sticky;
  top:0;
  z-index:5;
  justify-content:space-between;
  align-items:center;
  gap:.4rem;
  padding:.55rem .25rem .65rem;
  margin-bottom:.5rem;
  background:rgba(14,20,30,.95);
}
body.gameplay-mode.game-menu-open .right-panel{
  transform:translateX(0);
}
body.gameplay-mode .game-menu-backdrop{
  display:block;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  z-index:2470;
  transition:opacity .2s ease;
}
body.gameplay-mode.game-menu-open .game-menu-backdrop{
  opacity:1;
  pointer-events:auto;
}

.onboarding-flow{
  position:fixed;
  inset:0;
  z-index:3000;
  display:none;
  align-items:flex-start;
  justify-content:center;
  padding:1rem;
  overflow-y:auto;
  background:
    radial-gradient(circle at 15% 15%, rgba(60,161,153,.25) 0%, rgba(60,161,153,0) 38%),
    radial-gradient(circle at 85% 20%, rgba(150,72,144,.24) 0%, rgba(150,72,144,0) 34%),
    repeating-linear-gradient(-45deg, transparent 0 16px, rgba(255,255,255,.05) 16px 17px),
    rgba(9,13,20,.72);
  backdrop-filter:blur(3px);
}
body.onboarding-active .onboarding-flow{
  display:flex;
}
.onboarding-card{
  width:min(100%,980px);
  max-height:calc(100vh - 2rem);
  border:4px solid var(--dark);
  border-radius:.9rem;
  box-shadow:12px 12px 0 rgba(0,0,0,.6);
  background:rgba(14,19,29,.84);
  padding:1.35rem;
  position:relative;
  overflow:auto;
}
.onboarding-card::before{
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.24;
  background:
    radial-gradient(circle at 8% 20%, var(--accent-2) 0 10px, transparent 11px),
    radial-gradient(circle at 28% 42%, var(--accent) 0 10px, transparent 11px),
    radial-gradient(circle at 58% 56%, var(--accent-2) 0 10px, transparent 11px),
    radial-gradient(circle at 82% 30%, var(--accent) 0 10px, transparent 11px),
    linear-gradient(130deg, transparent 8%, rgba(248,179,50,.65) 9%, transparent 10%),
    linear-gradient(130deg, transparent 28%, rgba(60,161,153,.7) 29%, transparent 30%),
    linear-gradient(130deg, transparent 58%, rgba(248,179,50,.55) 59%, transparent 60%);
}
.onboarding-kicker{
  margin:0 0 .25rem;
  font-size:1.16rem;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--accent-2);
}
.onboarding-title{
  margin:0;
  font-size:clamp(1.95rem,4.2vw,3rem);
  color:#fff;
  max-width:16ch;
}
.onboarding-subtitle{
  margin:.35rem 0 1rem;
  font-size:1.3rem;
  color:rgba(255,255,255,.82);
  max-width:46ch;
}
.onboarding-step{
  margin-bottom:.85rem;
  border:3px solid var(--dark);
  border-radius:.7rem;
  background:rgba(255,255,255,.04);
  padding:1rem;
  position:relative;
  z-index:1;
}
.onboarding-step.is-locked{
  opacity:.5;
  filter:grayscale(.2);
}
.onboarding-step.is-locked .onboarding-grid{
  pointer-events:none;
}
.onboarding-step.is-ready{
  animation:unlock .2s ease both;
}
.onboarding-step-title{
  margin:0 0 .5rem;
  font-size:1.42rem;
  font-weight:800;
  text-transform:uppercase;
}
.onboarding-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:.5rem;
}
.onboarding-grid--mode{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}
.onboarding-step--brief{
  border-style:dashed;
}
.onboarding-lesson-brief{
  border:2px solid rgba(255,255,255,.22);
  border-radius:.6rem;
  background:rgba(0,0,0,.28);
  padding:.75rem .85rem;
  margin-bottom:.65rem;
}
.lesson-map{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:.45rem;
}
.lesson-map--onboarding{
  margin-top:.35rem;
}
.lesson-map--inline{
  margin-bottom:.75rem;
}
.lesson-node{
  position:relative;
  border:2px solid rgba(255,255,255,.35);
  border-radius:.55rem;
  background:rgba(0,0,0,.3);
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:.42rem;
  transition:transform .14s ease,border-color .14s ease,background .14s ease,opacity .14s ease;
}
.lesson-node span{
  font-size:.94rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:800;
  color:rgba(255,255,255,.88);
}
.lesson-node.is-done{
  border-color:#2ec4b6;
  background:linear-gradient(135deg,rgba(46,196,182,.28),rgba(76,201,240,.16));
}
.lesson-node.is-done::after{
  content:'✓';
  position:absolute;
  top:4px;
  right:6px;
  font-size:.78rem;
  color:#9cffd3;
}
.lesson-node.is-current{
  border-color:var(--accent-2);
  background:linear-gradient(135deg,rgba(248,179,50,.3),rgba(255,255,255,.08));
  transform:translateY(-1px);
  box-shadow:0 0 0 2px rgba(248,179,50,.24);
}
.lesson-node.is-locked{
  opacity:.62;
}
.lesson-brief-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.6rem;
  flex-wrap:wrap;
  margin-bottom:.35rem;
}
.lesson-brief-head h3{
  margin:0;
  font-size:1.2rem;
}
.lesson-badge{
  display:inline-flex;
  align-items:center;
  border:2px solid var(--dark);
  border-radius:999px;
  padding:.2rem .65rem;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#101113;
  font-weight:900;
  font-size:.88rem;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.lesson-checklist{
  margin:.4rem 0 0;
  padding-left:1.1rem;
  display:grid;
  gap:.25rem;
}
.lesson-checklist li{
  font-size:1rem;
}
.onboarding-check{
  display:flex;
  align-items:flex-start;
  gap:.5rem;
  font-size:1rem;
  color:rgba(255,255,255,.88);
}
.onboarding-check input{
  margin-top:.22rem;
  transform:scale(1.2);
}
.onboard-btn{
  border:3px solid var(--dark);
  border-radius:.55rem;
  background:#172132;
  color:#fff;
  box-shadow:4px 4px 0 rgba(0,0,0,.5);
  padding:1rem;
  text-align:left;
  font-family:"Space Grotesk","Inter",sans-serif;
  font-weight:700;
  text-transform:uppercase;
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.onboard-btn:hover{
  transform:translate(-2px,-2px);
  box-shadow:6px 6px 0 rgba(0,0,0,.56);
}
.onboard-btn.active{
  background:linear-gradient(140deg, var(--accent) 0%, var(--accent-2) 100%);
  color:#111;
}
.onboard-btn--mode{
  text-transform:none;
}
.onboard-btn--mode span{
  display:block;
  font-size:1.28rem;
  font-weight:800;
  text-transform:uppercase;
}
.onboard-btn--mode small{
  display:block;
  margin-top:.2rem;
  font-size:1.1rem;
  color:rgba(255,255,255,.82);
}
.onboard-btn--mode.active small{
  color:rgba(0,0,0,.82);
}
.onboard-empty{
  padding:.5rem;
  color:rgba(255,255,255,.7);
}
.onboarding-actions{
  display:flex;
  justify-content:flex-end;
  gap:.55rem;
  position:relative;
  z-index:1;
  padding-bottom:.25rem;
}
.onboarding-actions .btn{
  font-size:1.24rem;
  padding:.85rem 1.25rem;
  border-width:4px;
}
#onboardingStartBtn:disabled{
  opacity:.45;
  filter:saturate(.55);
  cursor:not-allowed;
}

@keyframes phasePop{
  0%{opacity:0;transform:translate(-50%,-8px) scale(.96)}
  14%{opacity:1;transform:translate(-50%,0) scale(1)}
  78%{opacity:1;transform:translate(-50%,0) scale(1)}
  100%{opacity:0;transform:translate(-50%,-6px) scale(.98)}
}
@keyframes phasePopFlow{
  0%{opacity:0;transform:translateY(-8px) scale(.96)}
  14%{opacity:1;transform:translateY(0) scale(1)}
  78%{opacity:1;transform:translateY(0) scale(1)}
  100%{opacity:0;transform:translateY(-6px) scale(.98)}
}

.interaction-pane{
  position:relative;
  z-index:2;
  max-width:920px;
  margin:1.5rem;
  background:rgba(9,11,20,.56);
  border:var(--border) solid var(--dark);
  border-radius:.9rem;
  box-shadow:var(--shadow-x) var(--shadow-y) 0 0 rgba(0,0,0,.55);
  padding:1.45rem;
  backdrop-filter:blur(5px);
  font-size:var(--fs-body);
  transform:rotate(-.25deg);
}
.play-columns{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:.9rem;
  align-items:start;
}
.play-main{
  min-width:0;
}
.play-side{
  position:sticky;
  top:4.2rem;
  z-index:8;
}
.play-side-title{
  margin:0 0 .55rem;
  font-size:1.06rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#fff;
}
body:not(.gameplay-mode) .play-columns{
  grid-template-columns:1fr;
}
body:not(.gameplay-mode) .play-side{
  position:static;
  top:auto;
}
body.gameplay-mode .play-columns{
  grid-template-columns:minmax(0,1fr) 300px;
}
body.gameplay-mode .visual-stage{
  min-height:420px;
}

#modeDescription{
  min-height:56px;
}

.pane-header{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:flex-start;
  margin-bottom:.75rem;
  flex-wrap:wrap;
}
.pane-actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}
.pane-actions .btn{
  white-space:normal;
  text-wrap:balance;
  min-height:46px;
}
.help-mode-block p{
  font-size:1.06rem;
  line-height:1.52;
}
.help-mode-block ol{
  margin-bottom:.8rem;
}
.help-mode-block li{
  margin-bottom:.3rem;
  font-size:1.03rem;
}
.help-ultra-board{
  display:grid;
  gap:.45rem;
  margin:.65rem 0 .75rem;
}
.help-ultra-chip{
  border:2px solid var(--dark);
  border-radius:.55rem;
  background:linear-gradient(145deg,rgba(60,161,153,.2),rgba(150,72,144,.22));
  box-shadow:4px 4px 0 rgba(0,0,0,.4);
  padding:.5rem .65rem;
  animation:helpPulse 1.8s ease-in-out infinite alternate;
}
.help-ultra-chip span{
  display:block;
  font-size:.84rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:rgba(255,255,255,.82);
}
.help-ultra-chip strong{
  font-size:1rem;
  color:#fff;
}
@keyframes helpPulse{
  from{transform:translateY(0)}
  to{transform:translateY(-1px)}
}

#interactionContent .btn-note{
  min-width:64px;
  margin:.25rem;
  font-size:1rem;
}

.science-note{font-size:1rem;color:rgba(255,255,255,.7);}
.science-note strong{color:#fff;font-weight:600;}
.science-callout{
  background:rgba(76,201,240,.1);
  border:1px solid rgba(76,201,240,.25);
  border-radius:.65rem;
  padding:.6rem .75rem;
  font-size:1rem;
  margin-bottom:.8rem;
}
.science-callout strong{color:#4cc9f0}

.choice-grid{
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
}

.mode-meta-footer{
  margin-top:1rem;
  padding:1rem;
  border-radius:.65rem;
  border:3px solid var(--dark);
  background:rgba(255,255,255,.04);
  font-size:1.08rem;
  color:rgba(255,255,255,.75);
  min-height:60px;
  background-image:
    repeating-linear-gradient(-45deg, transparent 0 17px, rgba(255,255,255,.04) 17px 18px);
}
.mode-meta-footer strong{color:#fff;font-weight:600;}
.session-prep{
  background:rgba(255,255,255,.05);
  border:3px solid var(--dark);
  border-radius:.8rem;
  padding:1rem;
  font-size:1.24rem;
  background-image:
    radial-gradient(rgba(255,255,255,.15) 1px, transparent 0);
  background-size:14px 14px;
}
.session-prep.empty-state{
  text-align:center;
}
.session-floating-controls{
  position:absolute;
  bottom:1rem;
  right:1rem;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:.4rem;
  z-index:10;
}
.session-floating-controls .timer-pill{
  background:rgba(0,0,0,.42);
  border:2px solid rgba(255,255,255,.25);
  color:#fff;
  padding:.25rem .75rem;
  border-radius:999px;
  font-size:1rem;
  display:flex;
  align-items:center;
  gap:.35rem;
}
.session-floating-controls .timer-pill .value{
  font-weight:600;
}
.session-floating-controls button{
  border-radius:999px;
  padding:.4rem .6rem;
}

.feedback-box{
  margin-top:1rem;
  padding:.6rem 1rem;
  border-radius:.5rem;
  border:2px solid rgba(60,161,153,.6);
  background:rgba(60,161,153,.16);
  font-size:1.22rem;
  line-height:1.55;
}
.feedback-box.error{
  background:rgba(255,111,97,.16);
  border-color:rgba(255,111,97,.75);
  color:#ffd2cb;
}

.log-panel{
  background:rgba(0,0,0,.35);
  color:#d2d6ff;
  padding:.75rem 1rem;
  font-size:1rem;
  max-height:150px;
  overflow-y:auto;
  border-radius:.6rem;
  border:1px solid rgba(255,255,255,.08);
}

.log-entry{margin:0;font-size:1rem;line-height:1.5}

.tap-button{
  width:100%;
  font-size:1.45rem;
  padding:1.2rem;
  border-radius:.8rem;
  text-transform:uppercase;
}

.grid-steps{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(40px,1fr));
  gap:.2rem;
  margin:1rem 0;
}
.grid-steps button{
  padding:.7rem 0;
  border-radius:.4rem;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.08);
  color:#fff;
}
.grid-steps button.active{
  background:var(--accent);
  border-color:var(--accent);
  color:#000;
}

.rhythm-panel{
  display:flex;
  flex-direction:column;
  gap:.9rem;
}
.rhythm-controls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.55rem;
  padding:.6rem;
  border:3px solid var(--dark);
  border-radius:.65rem;
  background:rgba(255,255,255,.04);
}
.rhythm-bpm-input{
  width:110px;
  max-width:100%;
}
.rhythm-aux-btn{
  padding:.45rem .8rem;
}
.pattern-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(26px,1fr));
  gap:.35rem;
  padding:.55rem;
  border:3px solid var(--dark);
  border-radius:.65rem;
  background:rgba(255,255,255,.03);
}
.pattern-strip span{
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid rgba(255,255,255,.2);
  border-radius:.4rem;
  font-size:.92rem;
  color:rgba(255,255,255,.75);
  background:rgba(255,255,255,.03);
}
.pattern-strip span.is-hit{
  border-color:rgba(60,161,153,.8);
}
.pattern-strip span.is-playing{
  background:var(--accent-2);
  color:#000;
  border-color:#000;
}
.rhythm-step-btn{
  min-height:42px;
  font-size:1.15rem;
}
.tap-zone{
  background:linear-gradient(145deg, rgba(60,161,153,.95) 0%, rgba(150,72,144,.92) 100%);
  color:#fff;
  border-color:#050507;
}
.tap-zone.is-hit{
  transform:translate(3px,3px) scale(.98);
  box-shadow:none;
}
.rhythm-mini-log{
  font-size:1rem;
  color:rgba(255,255,255,.75);
  border-top:2px dashed rgba(255,255,255,.2);
  padding-top:.45rem;
}

.game-card{
  background:linear-gradient(160deg, rgba(60,161,153,.15) 0%, rgba(150,72,144,.15) 100%);
  background-image:
    radial-gradient(rgba(255,255,255,.12) 1px, transparent 0),
    linear-gradient(160deg, rgba(60,161,153,.15) 0%, rgba(150,72,144,.15) 100%);
  background-size:15px 15px, auto;
  border-width:4px;
  position:relative;
  overflow:hidden;
}
.game-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  margin-bottom:.35rem;
}
.game-tag{
  border:2px solid var(--dark);
  border-radius:999px;
  background:rgba(0,0,0,.32);
  padding:.18rem .55rem;
  font-size:.9rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.game-hud{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:.45rem;
}
.game-pill{
  border:2px solid var(--dark);
  border-radius:.5rem;
  padding:.4rem;
  background:rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.game-pill span{
  font-size:.9rem;
  color:rgba(255,255,255,.75);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.game-pill strong{
  font-size:1.48rem;
}
.game-mission{
  border:2px solid rgba(255,255,255,.25);
  border-radius:.55rem;
  background:rgba(0,0,0,.3);
  padding:.45rem .55rem;
  font-size:1.22rem;
  color:rgba(255,255,255,.9);
  line-height:1.45;
}
.game-combo-track{
  height:10px;
  border-radius:999px;
  border:2px solid var(--dark);
  background:rgba(255,255,255,.14);
  overflow:hidden;
}
.game-combo-track span{
  display:block;
  width:0%;
  height:100%;
  background:linear-gradient(90deg,#3CA199 0%, #f8b332 55%, #ff5a5f 100%);
  transition:width .16s ease;
}
.game-mission-progress{
  height:10px;
  border-radius:999px;
  border:2px solid var(--dark);
  background:rgba(255,255,255,.14);
  overflow:hidden;
}
.game-mission-progress span{
  display:block;
  width:0%;
  height:100%;
  background:linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  transition:width .18s ease;
}
.game-stars{
  font-size:2.05rem;
  letter-spacing:.2em;
  color:#ffd166;
}

.game-card.is-locked{
  filter:saturate(.72);
}
.game-card.is-locked::after{
  content:'ESCOLHA UM MODO PARA DESBLOQUEAR';
  position:absolute;
  inset:auto .55rem .55rem .55rem;
  border:2px dashed rgba(255,255,255,.35);
  border-radius:.45rem;
  padding:.35rem .45rem;
  font-size:.9rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:rgba(0,0,0,.38);
  color:rgba(255,255,255,.92);
}
.game-card.is-ready{
  box-shadow:8px 8px 0 rgba(0,0,0,.45), 0 0 0 2px rgba(255,255,255,.2) inset;
}
.game-card.is-live{
  box-shadow:10px 10px 0 rgba(0,0,0,.58), 0 0 0 2px rgba(255,255,255,.22) inset;
  animation:livePulse .65s ease-in-out infinite alternate;
}

@keyframes livePulse{
  from{transform:translateY(0)}
  to{transform:translateY(-1px)}
}

body:not(.has-mode) .right-panel .menu-card:nth-child(n+2){
  opacity:.35;
  filter:grayscale(.25);
  pointer-events:none;
}
body:not(.has-mode) #modeDescription,
body:not(.has-mode) .mode-meta-footer,
body:not(.has-mode) .session-floating-controls{
  display:none;
}
body.gameplay-mode:not(.has-session) .session-floating-controls{
  display:none;
}
body.has-mode .right-panel .menu-card:nth-child(n+2){
  opacity:1;
  filter:none;
  pointer-events:auto;
  animation:unlock .25s ease both;
}
body:not(.has-session) .game-card .game-hud,
body:not(.has-session) .game-card .game-stars,
body:not(.has-session) .game-card .game-mission-progress{
  opacity:.6;
}
body.has-session .game-card{
  box-shadow:10px 10px 0 rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.22) inset;
}
body.has-session .game-card .game-tag{
  background:var(--accent-2);
  color:#111;
}
body.hit-feedback .interaction-pane,
body.hit-feedback .game-card{
  animation:hitPulse .22s ease;
}
body.miss-feedback .interaction-pane{
  animation:missShake .22s ease;
}
body.miss-feedback .visual-stage{
  animation:missFlash .22s ease;
}
body.combo-hot .game-card .game-tag{
  background:#ff5a5f;
  color:#fff;
  box-shadow:0 0 0 2px rgba(255,90,95,.25);
}
body.combo-hot .arcade-rhythm span,
body.combo-hot .game-combo-track span{
  animation:comboGlow .6s ease-in-out infinite alternate;
}
body.boss-wave .interaction-pane{
  box-shadow:0 0 0 3px rgba(255,90,95,.35), var(--shadow-x) var(--shadow-y) 0 0 rgba(0,0,0,.55);
}
body.boss-wave .game-tag{
  background:#ff5a5f!important;
  color:#fff!important;
}
.gameplay-feedback{
  position:fixed;
  left:50%;
  top:42%;
  transform:translate(-50%,-50%) scale(.9);
  z-index:3200;
  opacity:0;
  pointer-events:none;
  border:4px solid var(--dark);
  border-radius:.75rem;
  box-shadow:10px 10px 0 rgba(0,0,0,.55);
  padding:.7rem 1.2rem;
  font-family:"Space Grotesk","Inter",sans-serif;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
  font-size:clamp(1.2rem,3vw,2rem);
}
.gameplay-feedback.is-show{
  animation:feedbackPop .28s ease both;
}
.gameplay-feedback.is-hit{
  background:linear-gradient(140deg,#3CA199 0%,#f8b332 100%);
  color:#111;
}
.gameplay-feedback.is-miss{
  background:linear-gradient(140deg,#ff5a5f 0%,#964890 100%);
  color:#fff;
}

.focus-mode .left-menu,
.focus-mode .right-panel{display:none;}
.focus-mode .main-header{display:none;}
.focus-mode .app-body{grid-template-columns:1fr;padding:0;}
.focus-mode .interaction-pane{max-width:760px;margin:1.5rem auto;transform:none;}
.focus-mode .log-panel{max-height:200px;font-size:.95rem;}
.focus-mode #focusModeBtn{background:var(--accent-2);color:#000;border:none;}
.focus-mode-indicator{
  position:fixed;
  top:12px;
  right:16px;
  background:rgba(0,0,0,.6);
  border:1px solid rgba(255,255,255,.2);
  padding:.4rem .85rem;
  border-radius:999px;
  font-size:.85rem;
  z-index:30;
}

@keyframes unlock{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}
@keyframes hitPulse{
  0%{transform:translateY(0) scale(1)}
  50%{transform:translateY(-1px) scale(1.01)}
  100%{transform:translateY(0) scale(1)}
}
@keyframes missShake{
  0%{transform:translateX(0)}
  25%{transform:translateX(-4px)}
  50%{transform:translateX(4px)}
  75%{transform:translateX(-3px)}
  100%{transform:translateX(0)}
}
@keyframes missFlash{
  0%{box-shadow:0 0 0 0 rgba(255,90,95,.0)}
  50%{box-shadow:0 0 0 3px rgba(255,90,95,.45) inset}
  100%{box-shadow:0 0 0 0 rgba(255,90,95,.0)}
}
@keyframes comboGlow{
  from{filter:saturate(1) brightness(1)}
  to{filter:saturate(1.25) brightness(1.15)}
}
@keyframes feedbackPop{
  0%{opacity:0;transform:translate(-50%,-50%) scale(.88)}
  45%{opacity:1;transform:translate(-50%,-50%) scale(1.03)}
  100%{opacity:1;transform:translate(-50%,-50%) scale(1)}
}

@media (max-width:600px){
  body{
    font-size:20px;
  }
  .brand-line{
    flex-direction:column;
    align-items:flex-start;
  }
  .session-inline{
    width:100%;
  }
  .interaction-pane{
    padding:1.1rem;
    margin:1rem .5rem;
    transform:none;
  }
  .play-columns{
    grid-template-columns:1fr;
  }
  .play-side{
    position:static;
    top:auto;
  }
  .visual-stage{
    min-height:280px;
  }
  .arcade-hud{
    left:.5rem;
    right:.5rem;
    top:.55rem;
  }
  body.gameplay-mode .pane-header{
    top:0;
    padding:.45rem .5rem;
  }
  body.gameplay-mode .interaction-pane{
    width:100%;
    margin:0;
    padding:.8rem;
  }
  body.gameplay-mode .arcade-hud{
    width:100%;
  }
  body.gameplay-mode .phase-banner{
    width:calc(100% - 1rem);
    text-align:center;
  }
  .arcade-hud__row{
    grid-template-columns:1fr 1fr;
  }
  .arcade-mission{
    font-size:1.02rem;
  }
  .phase-banner{
    top:5.5rem;
    font-size:1.05rem;
    width:calc(100% - 1rem);
    text-align:center;
  }
  .onboarding-card{
    padding:.85rem;
  }
  .onboarding-actions{
    flex-direction:column;
  }
  .onboarding-actions .btn{
    width:100%;
  }
  .log-panel{font-size:.95rem}
  #pillarButtons .btn{flex:1 1 100%}
  .game-hud{grid-template-columns:1fr}
}
.progression-examples{
  margin-top:.5rem;
  font-size:.85rem;
  color:rgba(255,255,255,.75);
}
.progression-examples .example-item{margin-bottom:.2rem;}
.progression-examples strong{color:#fff;font-weight:600;}
