/* =========================================================
   GUITAR CHECK V1 — TEST SYSTEM SCAFFOLD
   ========================================================= */

:root{
  --gc-page:#c8c1b4;
  --gc-page-2:#beb6a7;
  --gc-panel:#303638;
  --gc-panel-2:#383e40;
  --gc-panel-3:#414749;
  --gc-line:#596163;
  --gc-line-soft:#4a5152;
  --gc-cream:#eadfc8;
  --gc-cream-2:#d5c8af;
  --gc-muted:#aea491;
  --gc-copper:#a56f50;
  --gc-copper-2:#bf8060;
  --gc-copper-soft:rgba(165,111,80,.13);
  --gc-silver:#a7afae;
  --gc-dark:#222729;
  --gc-wood:#684f43;
}

html,
body.guitar-check-page{background:var(--gc-page)!important}

body.guitar-check-page{
  margin:0;
  color:#222627;
  background:
    radial-gradient(circle at 18% -10%,rgba(255,255,255,.24),transparent 34%),
    linear-gradient(180deg,var(--gc-page) 0%,var(--gc-page-2) 100%)!important;
}

.guitar-check-page .site-shell{
  width:min(1480px,calc(100% - 48px));
  margin:0 auto;
}

/* header */

.check-topbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px;
  padding:14px 0!important;
  border-bottom:1px solid rgba(48,54,56,.20)!important;
  background:transparent!important;
  box-shadow:none!important;
}

.check-topbar .brand{
  display:flex;
  gap:7px;
  align-items:baseline;
  text-decoration:none;
}

.check-topbar .brand strong{
  color:#202426!important;
  font-size:1rem;
  font-weight:900;
  letter-spacing:-.02em;
}

.check-topbar .brand span{
  color:var(--gc-copper)!important;
  font-size:.66rem;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.check-topbar .header-right{
  display:flex;
  align-items:center;
  gap:13px;
}

.check-topbar .main-nav{
  display:flex;
  gap:6px;
}

.check-topbar .main-nav a{
  padding:8px 12px;
  border:1px solid transparent;
  border-radius:9px;
  color:#4c4a45!important;
  text-decoration:none;
  font-size:.84rem;
}


.check-topbar .main-nav a.site-home-button{
  border-color:rgba(165,111,80,.38);
  background:rgba(165,111,80,.10)!important;
  color:#4a382e!important;
  font-weight:800;
}

.check-topbar .main-nav a.site-home-button:hover{
  border-color:rgba(165,111,80,.62);
  background:rgba(165,111,80,.17)!important;
}

.check-topbar .main-nav a.is-active{
  border-color:rgba(48,54,56,.12);
  background:rgba(48,54,56,.08)!important;
  color:#202426!important;
}

/* intro */

.check-intro{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:28px;
  padding:22px 0 16px!important;
}

.check-intro h1{
  margin:0 0 7px;
  color:#202426!important;
  font-size:clamp(2.25rem,4vw,3.75rem);
  line-height:1;
  font-weight:900;
  letter-spacing:-.055em;
}

.check-intro .lead{
  max-width:840px;
  margin:0;
  color:#53504a!important;
  font-size:1rem;
  line-height:1.5;
}

.account-state{
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 10px;
  border:1px solid rgba(48,54,56,.14);
  border-radius:10px;
  background:rgba(244,239,228,.28);
}

.account-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--gc-copper);
}

.account-state>div{
  display:grid;
  gap:1px;
}

.account-state strong{font-size:.75rem;color:#2e3030}
.account-state small{font-size:.62rem;color:#69655e}

.ghost-button,
.secondary-button,
.primary-button,
.mini-button{
  font:inherit;
  cursor:pointer;
}

.ghost-button{
  margin-left:6px;
  padding:6px 8px;
  border:1px solid rgba(48,54,56,.16);
  border-radius:7px;
  background:transparent;
  color:#5b5750;
  font-size:.66rem;
}

button:disabled{
  cursor:default;
  opacity:.58;
}

/* main shell */

.check-shell{
  padding:14px;
  border:1px solid rgba(48,54,56,.16);
  border-radius:16px;
  background:rgba(235,229,216,.38);
}

.setup-card,
.source-card,
.program-card,
.test-console,
.analysis-card{
  border:1px solid var(--gc-line);
  border-radius:12px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.018),rgba(255,255,255,0)),
    var(--gc-panel);
}

.setup-card,
.source-card,
.program-card,
.test-console,
.analysis-card{
  padding:14px;
}

.section-head,
.panel-head,
.test-head,
.analysis-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
}

.section-head>div:first-child,
.panel-head>div:first-child,
.test-head>div:first-child,
.analysis-head>div:first-child{
  display:grid;
  gap:3px;
}

.section-head span,
.section-head small,
.panel-head span,
.panel-head small,
.test-head span,
.analysis-head span{
  color:var(--gc-muted);
  font-size:.68rem;
}

.section-head strong,
.panel-head strong,
.test-head strong,
.analysis-head strong{
  color:var(--gc-cream);
  font-size:1rem;
  font-weight:850;
}

/* setup */

.setup-grid{
  display:grid;
  grid-template-columns:1.4fr repeat(5,minmax(115px,1fr));
  gap:8px;
  margin-top:11px;
}

.field{
  display:grid;
  gap:5px;
  min-width:0;
}

.field>span{
  color:var(--gc-muted);
  font-size:.65rem;
  font-weight:700;
}

.field input,
.field select{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  height:37px;
  padding:0 10px;
  border:1px solid var(--gc-line);
  border-radius:7px;
  outline:none;
  background:#292f31;
  color:var(--gc-cream);
  font:inherit;
  font-size:.78rem;
}

.field input:focus,
.field select:focus{
  border-color:rgba(191,128,96,.78);
}

/* source / program */

.pretest-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:10px;
  margin-top:10px;
}

.status-pill,
.cycle-pill,
.accept-state{
  padding:5px 8px;
  border:1px solid var(--gc-line);
  border-radius:999px;
  color:var(--gc-muted);
  font-size:.61rem;
}

.source-options,
.program-options{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  margin-top:11px;
}

.source-option,
.program-option{
  display:grid;
  gap:3px;
  min-height:58px;
  padding:9px 10px;
  border:1px solid var(--gc-line);
  border-radius:8px;
  background:#2b3133;
  color:var(--gc-cream);
  text-align:left;
  cursor:pointer;
}

.source-option b,
.program-option b{
  font-size:.73rem;
}

.source-option small,
.program-option small{
  color:var(--gc-muted);
  font-size:.61rem;
  line-height:1.3;
}

.source-option.is-active,
.program-option.is-active{
  border-color:rgba(191,128,96,.70);
  background:var(--gc-copper-soft);
}

.source-footer,
.program-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
  color:var(--gc-muted);
  font-size:.64rem;
}

.secondary-button,
.primary-button{
  padding:8px 11px;
  border-radius:7px;
  font-size:.68rem;
  font-weight:800;
}

.secondary-button{
  border:1px solid var(--gc-line);
  background:#2b3133;
  color:var(--gc-cream-2);
}

.primary-button{
  border:1px solid rgba(191,128,96,.75);
  background:var(--gc-copper);
  color:#fff4df;
}

/* test console */

.test-console{
  margin-top:10px;
}

.progress-meta{
  display:flex;
  gap:8px;
}

.progress-meta>span{
  padding:5px 8px;
  border:1px solid var(--gc-line);
  border-radius:999px;
}

.test-progress{
  height:4px;
  margin:11px 0 12px;
  overflow:hidden;
  border-radius:99px;
  background:#252b2d;
}

.test-progress i{
  display:block;
  width:0;
  height:100%;
  background:var(--gc-copper-2);
}

.measurement-grid{
  display:grid;
  grid-template-columns:minmax(0,2.1fr) minmax(300px,.8fr);
  gap:10px;
}

.fretboard-card,
.tuner-card{
  min-width:0;
  padding:12px;
  border:1px solid var(--gc-line-soft);
  border-radius:9px;
  background:#2b3133;
}

/* fretboard */

.check-fretboard{
  position:relative;
  height:250px;
  margin-top:10px;
  overflow:hidden;
  border:1px solid #66584f;
  border-radius:8px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.025),rgba(0,0,0,.03)),
    linear-gradient(90deg,#5e473c,#735849 48%,#5a443a);
  box-shadow:inset 0 0 24px rgba(0,0,0,.15);
}

.check-fretboard .nut{
  position:absolute;
  z-index:7;
  top:0;bottom:0;left:0;
  width:7px;
  background:linear-gradient(90deg,#f0e9db,#bdb3a2);
}

.fret-line{
  position:absolute;
  z-index:4;
  top:0;bottom:0;
  width:2px;
  transform:translateX(-1px);
  background:linear-gradient(90deg,#79817f,#d2d7d4,#747c7a);
  opacity:.88;
}

.fret-line b{
  position:absolute;
  top:8px;left:50%;
  transform:translateX(-50%);
  color:#e5d9c4;
  font-size:.54rem;
  font-weight:800;
}

.guitar-string{
  position:absolute;
  z-index:6;
  left:0;right:0;
  height:2px;
  background:linear-gradient(180deg,#f3ebda,#c8baa0);
  box-shadow:0 0 3px rgba(244,231,204,.20);
}

.guitar-string.s1{top:18%}
.guitar-string.s2{top:31%}
.guitar-string.s3{top:44%}
.guitar-string.s4{top:57%}
.guitar-string.s5{top:70%}
.guitar-string.s6{top:83%}

.fret-dot{
  position:absolute;
  z-index:3;
  top:50%;
  width:8px;height:8px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#c7bba6;
  opacity:.8;
}

.fret-dot.double.upper{top:42%}
.fret-dot.double.lower{top:58%}

.target-marker{
  position:absolute;
  z-index:10;
  width:18px;
  height:18px;
  transform:translate(-50%,-50%);
  border:2px solid #f0d2b8;
  border-radius:50%;
  background:rgba(191,128,96,.66);
  box-shadow:0 0 0 4px rgba(191,128,96,.18);
}

.fretboard-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:9px;
  color:var(--gc-muted);
  font-size:.64rem;
}

.test-actions{
  display:flex;
  gap:5px;
}

.mini-button{
  padding:6px 8px;
  border:1px solid var(--gc-line);
  border-radius:6px;
  background:#292f31;
  color:var(--gc-cream-2);
  font-size:.62rem;
}

/* tuner */

.tuner-card{
  display:flex;
  flex-direction:column;
}

.tuner-display{
  display:grid;
  place-items:center;
  align-content:center;
  flex:1;
  min-height:190px;
  margin-top:10px;
  padding:10px;
  border:1px solid var(--gc-line-soft);
  border-radius:8px;
  background:#262c2e;
}

.tuner-note{
  color:var(--gc-cream);
  font-size:3rem;
  line-height:1;
  font-weight:900;
}

.tuner-target{
  margin-top:7px;
  color:var(--gc-muted);
  font-size:.70rem;
}

.tuner-target b{color:var(--gc-cream-2)}

.tuner-scale{
  position:relative;
  width:100%;
  max-width:320px;
  height:58px;
  margin-top:18px;
}

.tuner-scale::before{
  content:"";
  position:absolute;
  left:0;right:0;bottom:10px;
  height:1px;
  background:#777d7d;
}

.tuner-scale .tick{
  position:absolute;
  bottom:10px;
  width:1px;height:15px;
  background:#8c9392;
}
.tuner-scale .center{left:50%;height:25px;background:var(--gc-cream)}
.tuner-scale .t1{left:0}
.tuner-scale .t2{left:12.5%}
.tuner-scale .t3{left:25%}
.tuner-scale .t4{left:37.5%}
.tuner-scale .t6{left:62.5%}
.tuner-scale .t7{left:75%}
.tuner-scale .t8{left:87.5%}
.tuner-scale .t9{left:100%}

.tuner-scale .needle{
  position:absolute;
  left:50%;bottom:7px;
  width:3px;height:42px;
  transform:translateX(-50%);
  border-radius:3px;
  background:var(--gc-copper-2);
}

.tuner-numbers{
  display:flex;
  justify-content:space-between;
  width:100%;
  max-width:320px;
  color:var(--gc-muted);
  font-size:.58rem;
}

.tuner-numbers strong{color:var(--gc-cream)}

.signal-metrics{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:6px;
  margin-top:8px;
}

.signal-metrics>div{
  padding:7px 8px;
  border:1px solid var(--gc-line);
  border-radius:7px;
  background:#292f31;
}

.signal-metrics span{
  display:block;
  color:var(--gc-muted);
  font-size:.59rem;
}

.signal-metrics strong{
  display:block;
  margin-top:3px;
  color:var(--gc-cream);
  font-size:.76rem;
}

/* analysis */

.analysis-card{
  margin-top:10px;
}


.analysis-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex-wrap:wrap;
}

.analysis-api-status{
  color:var(--gc-muted);
  font-size:.58rem;
  white-space:nowrap;
}

.analysis-api-status.is-loading{color:var(--gc-cream-2)}
.analysis-api-status.is-ok{color:#c8d3c6}
.analysis-api-status.is-error{color:#d6a69a}

.analysis-tabs{
  display:flex;
  gap:5px;
}

.analysis-tab{
  padding:7px 9px;
  border:1px solid var(--gc-line);
  border-radius:7px;
  background:#292f31;
  color:var(--gc-muted);
  font-size:.63rem;
  font-weight:750;
  cursor:pointer;
}

.analysis-tab.is-active{
  border-color:rgba(191,128,96,.62);
  background:var(--gc-copper-soft);
  color:var(--gc-cream);
}

.analysis-layout{
  display:grid;
  grid-template-columns:minmax(0,2.1fr) minmax(250px,.72fr);
  gap:10px;
  margin-top:11px;
}

.map-wrap,
.summary-card{
  border:1px solid var(--gc-line-soft);
  border-radius:9px;
  background:#2b3133;
}

.map-wrap{
  min-width:0;
  padding:11px;
}

.map-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
  color:var(--gc-muted);
  font-size:.62rem;
}

.map-legend{
  display:flex;
  align-items:center;
  gap:5px;
}

.map-legend i{
  width:34px;
  height:6px;
  border-radius:9px;
  background:linear-gradient(90deg,#75858b,var(--gc-panel-3),var(--gc-copper-2));
}

.map-legend b{color:var(--gc-cream-2)}

.heatmap-scroll{
  overflow-x:auto;
  padding-bottom:2px;
}

.heatmap-shell{
  display:grid;
  grid-template-columns:38px minmax(720px,1fr);
  gap:7px;
  min-width:780px;
}

.heatmap-labels{
  display:grid;
  grid-template-rows:repeat(6,28px);
  gap:4px;
}

.heatmap-labels span{
  display:grid;
  place-items:center;
  color:var(--gc-cream-2);
  font-size:.61rem;
  font-weight:800;
}

.heatmap-grid{
  display:grid;
  grid-template-rows:repeat(6,28px);
  gap:4px;
}

.heat-cell{
  border:1px solid #555d5e;
  border-radius:4px;
  background:#3d4345;
}

.heat-cell.open{
  border-color:#687173;
}

.heatmap-axis{
  display:grid;
  grid-template-columns:38px minmax(720px,1fr);
  gap:7px;
  min-width:780px;
  margin-top:5px;
}

.heatmap-axis::before{content:""}

.heatmap-axis-inner{
  display:grid;
  color:var(--gc-muted);
  font-size:.52rem;
  text-align:center;
}

.summary-card{
  padding:11px;
}

.summary-head{
  display:grid;
  gap:2px;
  margin-bottom:9px;
}

.summary-head span{
  color:var(--gc-muted);
  font-size:.62rem;
}

.summary-head strong{
  color:var(--gc-cream);
  font-size:.88rem;
}

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

.summary-grid>div{
  padding:8px;
  border:1px solid var(--gc-line);
  border-radius:7px;
  background:#292f31;
}

.summary-grid span{
  display:block;
  color:var(--gc-muted);
  font-size:.57rem;
}

.summary-grid strong{
  display:block;
  margin-top:4px;
  color:var(--gc-cream);
  font-size:.76rem;
}

.session-note{
  display:grid;
  gap:4px;
  margin-top:8px;
  padding:9px;
  border-left:3px solid var(--gc-copper);
  border-radius:6px;
  background:rgba(165,111,80,.08);
}

.session-note strong{
  color:var(--gc-cream);
  font-size:.67rem;
}

.session-note span{
  color:var(--gc-muted);
  font-size:.60rem;
  line-height:1.45;
}

/* responsive */

@media(max-width:1120px){
  .setup-grid{grid-template-columns:repeat(3,1fr)}
  .pretest-grid{grid-template-columns:1fr}
  .measurement-grid{grid-template-columns:1fr}
  .analysis-layout{grid-template-columns:1fr}
}

@media(max-width:760px){
  .guitar-check-page .site-shell{width:min(100% - 24px,1480px)}
  .check-topbar{align-items:flex-start!important;flex-direction:column}
  .check-topbar .header-right{width:100%;justify-content:space-between}
  .check-intro{grid-template-columns:1fr!important}
  .account-state{width:fit-content}
  .setup-grid{grid-template-columns:repeat(2,1fr)}
  .source-options,.program-options{grid-template-columns:1fr}
  .check-fretboard{height:200px}
  .analysis-head{align-items:flex-start;flex-direction:column}
}

@media(max-width:520px){
  .setup-grid{grid-template-columns:1fr}
  .check-shell{padding:9px}
  .setup-card,.source-card,.program-card,.test-console,.analysis-card{padding:10px}
  .check-fretboard{height:175px}
  .source-footer,.program-footer,.fretboard-footer{align-items:flex-start;flex-direction:column}
  .summary-grid{grid-template-columns:1fr}
}




/* =========================================================
   INTERVAL ANALYSIS
   ========================================================= */

.analysis-panel[hidden]{display:none!important}
.analysis-panel.is-active{display:block}

.interval-analysis-head,
.octave-sets-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-top:11px;
  padding:11px 12px;
  border:1px solid var(--gc-line-soft);
  border-radius:9px;
  background:#2b3133;
}

.interval-analysis-head>div:first-child,
.octave-sets-head>div:first-child{
  display:grid;
  gap:3px;
}

.interval-analysis-head span,
.octave-sets-head span{
  color:var(--gc-copper-2);
  font-size:.60rem;
  font-weight:800;
}

.interval-analysis-head strong,
.octave-sets-head strong{
  color:var(--gc-cream);
  font-size:.92rem;
}

.interval-analysis-head small,
.octave-sets-head small{
  color:var(--gc-muted);
  font-size:.60rem;
  line-height:1.45;
}

.interval-common-scale,
.octave-note-legend{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
  color:var(--gc-muted);
  font-size:.58rem;
}

.interval-common-scale b,
.octave-note-legend b{
  color:var(--gc-cream-2);
  font-size:.60rem;
  font-variant-numeric:tabular-nums;
}

.octave-note-legend i{
  width:26px;
  height:5px;
  border-radius:99px;
  background:linear-gradient(90deg,#75858b,var(--gc-panel-3),var(--gc-copper-2));
}

.interval-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-top:9px;
}

.interval-card{
  min-width:0;
  padding:11px;
  border:1px solid var(--gc-line-soft);
  border-radius:9px;
  background:#2b3133;
}

.interval-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.interval-card-head>div{
  display:grid;
  gap:2px;
}

.interval-card-head span{
  color:var(--gc-muted);
  font-size:.56rem;
}

.interval-card-head strong{
  color:var(--gc-cream);
  font-size:.88rem;
}

.interval-reference{
  flex:0 0 auto;
  padding:4px 6px;
  border:1px solid var(--gc-line);
  border-radius:6px;
  background:#292f31;
  color:var(--gc-cream-2);
  font-size:.59rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

.interval-meter-wrap{
  margin-top:10px;
}

.interval-meter-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:5px;
  color:var(--gc-muted);
  font-size:.54rem;
}

.interval-meter-label strong{
  color:var(--gc-cream);
  font-size:.68rem;
  font-variant-numeric:tabular-nums;
}

.interval-meter{
  position:relative;
  height:16px;
  border:1px solid var(--gc-line);
  border-radius:999px;
  background:linear-gradient(90deg,rgba(117,133,139,.24),#303638 50%,rgba(191,128,96,.22));
}

.interval-meter::after{
  content:"";
  position:absolute;
  top:2px;
  bottom:2px;
  left:50%;
  width:1px;
  background:rgba(235,226,211,.46);
}

.interval-meter-marker{
  position:absolute;
  z-index:1;
  top:50%;
  left:50%;
  width:8px;
  height:8px;
  border:2px solid var(--gc-cream);
  border-radius:50%;
  background:var(--gc-copper);
  transform:translate(-50%,-50%);
  box-shadow:0 0 0 2px rgba(0,0,0,.18);
}

.interval-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
  margin-top:9px;
}

.interval-metrics div{
  min-width:0;
  padding:6px 7px;
  border:1px solid var(--gc-line-soft);
  border-radius:6px;
  background:#292f31;
}

.interval-metrics span{
  display:block;
  color:var(--gc-muted);
  font-size:.50rem;
}

.interval-metrics strong{
  display:block;
  margin-top:2px;
  color:var(--gc-cream-2);
  font-size:.65rem;
  font-variant-numeric:tabular-nums;
}

.interval-samples{
  margin-top:9px;
  padding-top:8px;
  border-top:1px solid var(--gc-line-soft);
}

.interval-samples>span{
  display:block;
  margin-bottom:5px;
  color:var(--gc-muted);
  font-size:.52rem;
}

.interval-sample-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
  padding:3px 0;
  color:var(--gc-cream-2);
  font-size:.54rem;
}

.interval-sample-row span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.interval-sample-row b{
  color:var(--gc-cream);
  font-size:.55rem;
  font-variant-numeric:tabular-nums;
}

.octave-sets-section{margin-top:10px}
.octave-sets-head{margin-top:0}

.octave-sets-grid{
  display:grid;
  gap:8px;
  margin-top:8px;
}

.octave-set{
  min-width:0;
  padding:10px;
  border:1px solid var(--gc-line-soft);
  border-radius:9px;
  background:#2b3133;
}

.octave-set-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:7px;
}

.octave-set-head strong{
  color:var(--gc-cream);
  font-size:.72rem;
}

.octave-set-head span{
  color:var(--gc-muted);
  font-size:.54rem;
}

.octave-note-row{
  display:grid;
  grid-template-columns:repeat(12,minmax(46px,1fr));
  gap:4px;
  overflow-x:auto;
  padding-bottom:2px;
}

.octave-note{
  min-width:46px;
  padding:6px 4px 7px;
  border:1px solid var(--gc-line);
  border-radius:6px;
  background:#292f31;
  text-align:center;
}

.octave-note.is-missing{opacity:.36}

.octave-note>span{
  display:block;
  color:var(--gc-muted);
  font-size:.49rem;
  font-weight:800;
}

.octave-note>strong{
  display:block;
  margin-top:2px;
  color:var(--gc-cream);
  font-size:.59rem;
  font-variant-numeric:tabular-nums;
}

.octave-note-meter{
  position:relative;
  height:9px;
  margin-top:5px;
}

.octave-note-meter::before{
  content:"";
  position:absolute;
  left:3px;
  right:3px;
  top:4px;
  height:1px;
  background:var(--gc-line);
}

.octave-note-meter::after{
  content:"";
  position:absolute;
  left:50%;
  top:1px;
  width:1px;
  height:7px;
  background:rgba(235,226,211,.38);
}

.octave-note-marker{
  position:absolute;
  z-index:1;
  top:2px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--gc-copper-2);
  transform:translateX(-50%);
}

.octave-note.is-negative .octave-note-marker{background:#88999f}

.analysis-empty{
  grid-column:1/-1;
  padding:18px;
  border:1px dashed var(--gc-line);
  border-radius:8px;
  color:var(--gc-muted);
  background:#292f31;
  font-size:.65rem;
  text-align:center;
}

.analysis-empty-large{
  display:grid;
  gap:5px;
  margin-top:11px;
  padding:30px 18px;
}

.analysis-empty-large strong{color:var(--gc-cream);font-size:.86rem}
.analysis-empty-large span{line-height:1.5}

@media(max-width:1180px){
  .interval-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:760px){
  .interval-analysis-head,.octave-sets-head{align-items:flex-start;flex-direction:column}
  .interval-grid{grid-template-columns:1fr}
  .octave-note-row{grid-template-columns:repeat(12,52px)}
}


/* =========================================================
   START INSTRUCTIONS MODAL
   ========================================================= */

.program-actions{
  display:flex;
  align-items:center;
  gap:7px;
}

.instruction-modal[hidden]{
  display:none;
}

.instruction-modal{
  position:fixed;
  z-index:1000;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
}

.instruction-backdrop{
  position:absolute;
  inset:0;
  background:rgba(24,28,29,.72);
  backdrop-filter:blur(4px);
}

.instruction-dialog{
  position:relative;
  z-index:1;
  width:min(760px,100%);
  max-height:min(820px,calc(100vh - 48px));
  overflow:auto;
  box-sizing:border-box;
  padding:20px;
  border:1px solid var(--gc-line);
  border-radius:14px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,0)),
    var(--gc-panel);
  box-shadow:0 24px 80px rgba(0,0,0,.32);
  color:var(--gc-cream);
}

.instruction-close{
  position:absolute;
  top:12px;
  right:12px;
  width:32px;
  height:32px;
  border:1px solid var(--gc-line);
  border-radius:8px;
  background:#292f31;
  color:var(--gc-muted);
  font-size:1.2rem;
  line-height:1;
  cursor:pointer;
}

.instruction-head{
  padding-right:46px;
}

.instruction-head>span{
  color:var(--gc-copper-2);
  font-size:.68rem;
  font-weight:850;
}

.instruction-head h2{
  margin:5px 0 7px;
  color:var(--gc-cream);
  font-size:1.6rem;
  line-height:1.1;
}

.instruction-head p{
  max-width:650px;
  margin:0;
  color:var(--gc-cream-2);
  font-size:.84rem;
  line-height:1.55;
}

.instruction-flow{
  display:grid;
  grid-template-columns:auto auto auto auto auto auto auto auto auto;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:16px 0;
  padding:10px 12px;
  border:1px solid var(--gc-line-soft);
  border-radius:8px;
  background:#292f31;
}

.instruction-flow span{
  color:var(--gc-cream-2);
  font-size:.67rem;
  font-weight:800;
}

.instruction-flow b{
  color:var(--gc-copper-2);
  font-size:.76rem;
}

.instruction-steps{
  display:grid;
  gap:7px;
  margin:0;
  padding:0;
  list-style:none;
}

.instruction-steps li{
  display:grid;
  grid-template-columns:30px 1fr;
  gap:10px;
  align-items:start;
  padding:9px 10px;
  border:1px solid var(--gc-line-soft);
  border-radius:8px;
  background:#2b3133;
}

.instruction-steps li>b{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border:1px solid rgba(191,128,96,.5);
  border-radius:50%;
  background:var(--gc-copper-soft);
  color:var(--gc-copper-2);
  font-size:.70rem;
}

.instruction-steps li>div{
  display:grid;
  gap:2px;
}

.instruction-steps strong{
  color:var(--gc-cream);
  font-size:.76rem;
}

.instruction-steps span{
  color:var(--gc-muted);
  font-size:.68rem;
  line-height:1.45;
}

.instruction-note{
  margin-top:12px;
  padding:10px 12px;
  border-left:3px solid var(--gc-copper-2);
  border-radius:7px;
  background:rgba(165,111,80,.09);
}

.instruction-note strong{
  color:var(--gc-cream);
  font-size:.74rem;
}

.instruction-note p{
  margin:5px 0 0;
  color:var(--gc-cream-2);
  font-size:.72rem;
  line-height:1.52;
}

.instruction-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--gc-line-soft);
}

.instruction-remember{
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--gc-muted);
  font-size:.65rem;
}

.instruction-remember input{
  accent-color:var(--gc-copper);
}

body.modal-open{
  overflow:hidden;
}

@media(max-width:620px){
  .instruction-modal{padding:12px}
  .instruction-dialog{padding:16px}
  .instruction-flow{
    grid-template-columns:1fr;
    justify-items:center;
  }
  .instruction-flow b{
    transform:rotate(90deg);
  }
  .instruction-footer{
    align-items:flex-start;
    flex-direction:column;
  }
  .program-actions{
    width:100%;
  }
  .program-actions button{
    flex:1;
  }
}


/* =========================================================
   AUDIO INPUT V1
   ========================================================= */

.source-footer-audio{
  align-items:flex-end;
}

.audio-source-info{
  display:grid;
  gap:7px;
  min-width:0;
  flex:1;
}

.audio-device-row{
  display:grid;
  grid-template-columns:auto minmax(180px,1fr);
  align-items:center;
  gap:8px;
}

.audio-device-row label,
.audio-level-row>span{
  color:var(--gc-muted);
  font-size:.62rem;
}

.audio-device-row select{
  min-width:0;
  height:32px;
  padding:0 8px;
  border:1px solid var(--gc-line);
  border-radius:7px;
  outline:none;
  background:#292f31;
  color:var(--gc-cream);
  font:inherit;
  font-size:.68rem;
}

.audio-level-row{
  display:grid;
  grid-template-columns:auto minmax(120px,1fr) 42px;
  align-items:center;
  gap:8px;
}

.audio-level-meter{
  position:relative;
  height:7px;
  overflow:hidden;
  border-radius:999px;
  background:#252b2d;
  border:1px solid var(--gc-line-soft);
}

.audio-level-meter i{
  display:block;
  width:0%;
  height:100%;
  border-radius:inherit;
  background:var(--gc-copper-2);
  transition:width .08s linear;
}

.audio-level-row b{
  color:var(--gc-cream-2);
  font-size:.61rem;
  text-align:right;
  font-variant-numeric:tabular-nums;
}

.status-pill.is-connected{
  border-color:rgba(191,128,96,.62);
  background:rgba(165,111,80,.10);
  color:var(--gc-cream-2);
}

.status-pill.is-error{
  border-color:rgba(186,102,86,.55);
  color:#e0b1a8;
}

@media(max-width:760px){
  .audio-device-row,
  .audio-level-row{
    grid-template-columns:1fr;
  }
  .audio-level-row b{
    text-align:left;
  }
}

.accept-state.is-reading{
  border-color:rgba(167,175,174,.45);
  color:var(--gc-silver);
}
.accept-state.is-stable{
  border-color:rgba(191,128,96,.65);
  background:rgba(165,111,80,.10);
  color:var(--gc-cream);
}
.tuner-note.is-live{color:var(--gc-cream)}
.tuner-note.is-quiet{color:var(--gc-muted)}


/* =========================================================
   TEST SESSION CONTROLS
   ========================================================= */

.test-actions{
  flex-wrap:wrap;
  justify-content:flex-end;
}

.mini-button.danger-soft{
  border-color:rgba(174,103,86,.42);
  color:#d8b0a4;
}

.mini-button.danger-soft:not(:disabled):hover{
  border-color:rgba(191,128,96,.72);
  background:rgba(165,111,80,.10);
}

.test-console.is-paused{
  border-color:rgba(191,128,96,.55);
}

.test-console.is-stopped{
  opacity:.94;
}

/* =========================================================
   CABINET
   ========================================================= */

.cabinet-modal[hidden]{display:none}

.cabinet-modal{
  position:fixed;
  z-index:1001;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
}

.cabinet-backdrop{
  position:absolute;
  inset:0;
  background:rgba(24,28,29,.72);
  backdrop-filter:blur(4px);
}

.cabinet-dialog{
  position:relative;
  z-index:1;
  width:min(820px,100%);
  max-height:min(820px,calc(100vh - 48px));
  overflow:auto;
  box-sizing:border-box;
  padding:20px;
  border:1px solid var(--gc-line);
  border-radius:14px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,0)),
    var(--gc-panel);
  box-shadow:0 24px 80px rgba(0,0,0,.34);
  color:var(--gc-cream);
}

.cabinet-head{
  padding-right:46px;
}

.cabinet-head>span{
  color:var(--gc-copper-2);
  font-size:.68rem;
  font-weight:850;
}

.cabinet-head h2{
  margin:5px 0 7px;
  color:var(--gc-cream);
  font-size:1.55rem;
  line-height:1.1;
}

.cabinet-head p{
  margin:0;
  color:var(--gc-cream-2);
  font-size:.82rem;
  line-height:1.5;
}

.cabinet-user-state{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:11px;
  margin-top:15px;
  padding:10px 11px;
  border:1px solid var(--gc-line-soft);
  border-radius:9px;
  background:#292f31;
}

.cabinet-avatar{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:1px solid rgba(191,128,96,.5);
  border-radius:50%;
  background:var(--gc-copper-soft);
  color:var(--gc-copper-2);
  font-weight:900;
}

.cabinet-user-state>div:nth-child(2){
  display:grid;
  gap:2px;
}

.cabinet-user-state strong{
  color:var(--gc-cream);
  font-size:.78rem;
}

.cabinet-user-state span:not(.status-pill){
  color:var(--gc-muted);
  font-size:.65rem;
}

.cabinet-tabs{
  display:flex;
  gap:6px;
  margin-top:12px;
  padding-bottom:10px;
  border-bottom:1px solid var(--gc-line-soft);
  overflow-x:auto;
}

.cabinet-tab{
  flex:0 0 auto;
  padding:7px 10px;
  border:1px solid var(--gc-line);
  border-radius:7px;
  background:#292f31;
  color:var(--gc-muted);
  font:inherit;
  font-size:.65rem;
  font-weight:750;
  cursor:pointer;
}

.cabinet-tab.is-active{
  border-color:rgba(191,128,96,.62);
  background:var(--gc-copper-soft);
  color:var(--gc-cream);
}

.cabinet-panel{
  display:none;
  margin-top:12px;
}

.cabinet-panel.is-active{
  display:block;
}

.cabinet-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.cabinet-section-head>div{
  display:grid;
  gap:2px;
}

.cabinet-section-head span,
.cabinet-current-profile span,
.cabinet-compare-grid span{
  color:var(--gc-muted);
  font-size:.62rem;
}

.cabinet-section-head strong{
  color:var(--gc-cream);
  font-size:.9rem;
}

.cabinet-current-profile{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:10px;
  padding:11px;
  border:1px solid var(--gc-line-soft);
  border-radius:8px;
  background:#2b3133;
}

.cabinet-current-profile>div:first-child{
  display:grid;
  gap:3px;
}

.cabinet-current-profile strong{
  color:var(--gc-cream);
  font-size:.82rem;
}

.cabinet-profile-meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  justify-content:flex-end;
}

.cabinet-profile-meta span{
  padding:5px 7px;
  border:1px solid var(--gc-line);
  border-radius:999px;
  color:var(--gc-cream-2);
  font-size:.59rem;
}

.cabinet-lock-note,
.cabinet-empty,
.cabinet-auth-box{
  display:grid;
  gap:5px;
  margin-top:10px;
  padding:11px 12px;
  border-left:3px solid var(--gc-copper);
  border-radius:7px;
  background:rgba(165,111,80,.08);
}

.cabinet-lock-note strong,
.cabinet-empty strong,
.cabinet-auth-box strong{
  color:var(--gc-cream);
  font-size:.73rem;
}

.cabinet-lock-note span,
.cabinet-empty span,
.cabinet-auth-box span,
.cabinet-auth-box small{
  color:var(--gc-muted);
  font-size:.66rem;
  line-height:1.5;
}

.cabinet-compare-grid{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:10px;
  align-items:center;
}

.cabinet-compare-grid>div{
  display:grid;
  gap:4px;
  padding:12px;
  border:1px solid var(--gc-line-soft);
  border-radius:8px;
  background:#2b3133;
  text-align:center;
}

.cabinet-compare-grid>div strong{
  color:var(--gc-cream);
  font-size:1rem;
}

.cabinet-compare-grid>b{
  color:var(--gc-copper-2);
}

.cabinet-auth-actions{
  display:flex;
  gap:7px;
  margin-top:7px;
}

@media(max-width:620px){
  .cabinet-modal{padding:12px}
  .cabinet-dialog{padding:16px}
  .cabinet-user-state{grid-template-columns:auto 1fr}
  .cabinet-user-state .status-pill{grid-column:1/-1;width:max-content}
  .cabinet-current-profile{align-items:flex-start;flex-direction:column}
  .cabinet-profile-meta{justify-content:flex-start}
  .cabinet-compare-grid{grid-template-columns:1fr}
  .cabinet-compare-grid>b{transform:rotate(90deg);text-align:center}
  .cabinet-auth-actions{flex-direction:column}
}
