
html{background:var(--bg);}
:root{
  --bg:#050814;
  --panel:rgba(255,255,255,0.04);
  --panel2:rgba(255,255,255,0.06);
  --stroke:rgba(255,255,255,0.10);
  --stroke2:rgba(255,255,255,0.14);
  --text:#e8eeff;
  --muted:#9aa2bb;
  --accent:#f9c74f;
  --ok:#06d6a0;
  --bad:#ef476f;
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:radial-gradient(1100px 500px at 20% -10%, rgba(249,199,79,0.12), transparent 60%),
             radial-gradient(900px 500px at 110% 0%, rgba(6,214,160,0.09), transparent 55%),
             var(--bg);
  color:var(--text);
}

#app{max-width:1220px;margin:0 auto;padding:14px}



    /* Screen scaffolding */
    .rg-screen{display:none;}
    .rg-screen.rg-active{display:block;}
    .rg-screen .rg-screen-body{padding:14px;}
    .rg-nav{display:flex;flex-wrap:wrap;gap:10px;align-items:center;}
    .rg-muted{color:var(--muted);}
    .rg-splash{max-width:760px;margin:0 auto;}

    /* Home layout (v06_p10_ui_home_menu_polish) */
    .rg-home{display:grid;grid-template-columns:1.15fr 0.85fr;grid-template-areas:"brand menu" "bottom bottom";gap:18px;align-items:center;}
    .rg-home-brand{grid-area:brand;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;}
    .rg-home-menu{grid-area:menu;display:flex;flex-direction:column;gap:12px;align-items:stretch;}
    .rg-home-menu .pill{width:100%;text-align:center;padding:10px 12px;}
    .rg-home-title{font-size:34px;font-weight:800;letter-spacing:0.4px;}
    .rg-home-logo{width:175px;max-width:65vw;height:auto;display:block;border-radius:22px;box-shadow:0 18px 40px rgba(0,0,0,0.35);cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none;}
    .rg-home-logo:focus{outline:2px solid rgba(249,199,79,0.75);outline-offset:3px;}
    .rg-home-bottom{grid-area:bottom;display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:10px;}
    .rg-home-bottom .pill{padding:10px 16px;min-width:120px;text-align:center;}

    @media (max-width: 720px){
      .rg-home{grid-template-columns:1fr;grid-template-areas:"brand" "menu" "bottom";}
      .rg-home-menu{max-width:360px;margin:0 auto;width:100%;}
      .rg-home-title{font-size:28px;}
      .rg-home-logo{width:150px;}
    }

    /* Menu screens: lower nav row slightly (v06_p10_ui_home_menu_polish) */
    #screenPlay .rg-nav,
    #screenView .rg-nav,
    #screenSound .rg-nav,
    #screenSoundIntro .rg-nav,
    #screenLibrary .rg-nav{margin-top:14px;padding-top:10px;flex-wrap:wrap;gap:10px;}
.top-bar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding:12px 14px;
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:18px;
  box-shadow:0 12px 26px rgba(0,0,0,0.30);
}

h1{
  margin:0;
  font-size:20px;
  letter-spacing:0.2px;
}


/* Prompt 5: in-game header meta */
.rg-game-head{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:160px;
}
.rg-game-meta{
  display:flex;
  flex-direction:column;
  gap:2px;
  font-size:12px;
  line-height:1.2;
}
.rg-game-meta-line{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:baseline;
}
#gameMetaMethod{
  font-weight:700;
  color:var(--text);
}

/* Prompt 5: in-game menu overlay */
#rgMenuOverlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,0.78);
  z-index:120; /* higher than countdown overlay */
}
#rgMenuPanel{
  width:min(420px, 92vw);
  max-height:min(72vh, 560px);
  overflow:auto;
}
#rgMenuPanel .rg-menu-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
#rgMenuPanel .rg-menu-buttons{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#rgMenuPanel .rg-menu-buttons button{
  width:100%;
}


/* v09_p05_stop_current_run_modal */
#rgStopRunModal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,0.55);
  z-index:10050;
}

#rgStopRunModal .rg-stoprun-panel{
  width:min(420px, 92vw);
  max-height:min(72vh, 560px);
  overflow:auto;
  position:relative;
}

#rgStopRunModal .rg-stoprun-body{
  padding:16px 16px 14px;
}

#rgStopRunModal .rg-stoprun-msg{
  font-size:14px;
  line-height:1.35;
  color:var(--text);
  padding-right:44px; /* keep text clear of the X */
}

#rgStopRunModal .rg-stoprun-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
}

#rgStopRunModalClose{
  position:absolute;
  top:10px;
  right:10px;
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  color:var(--text);
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:18px;
  line-height:1;
}

#rgStopRunModalClose:hover{ background:rgba(255,255,255,0.08); }
#rgStopRunModalClose:active{ transform:translateY(1px); }


/* v015_p02_export_settings_json_generate_copy_save: Export settings metadata modal */
#rgExportSettingsModal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,0.55);
  z-index:10060;
}

#rgExportSettingsModal .rg-export-panel{
  width:min(520px, 94vw);
  max-height:min(80vh, 640px);
  overflow:auto;
  position:relative;
}

#rgExportSettingsModal .rg-export-body{
  padding:16px 16px 14px;
}

#rgExportSettingsModal .rg-export-head{
  padding-right:44px; /* keep text clear of the X */
}

#rgExportSettingsModal .rg-export-title{
  font-size:16px;
  font-weight:700;
  color:var(--text);
}

#rgExportSettingsModal .rg-export-sub{
  margin-top:6px;
  font-size:12px;
  line-height:1.35;
}

#rgExportSettingsModal .rg-export-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
}

#rgExportSettingsModalClose{
  position:absolute;
  top:10px;
  right:10px;
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  color:var(--text);
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:18px;
  line-height:1;
}

#rgExportSettingsModalClose:hover{ background:rgba(255,255,255,0.08); }
#rgExportSettingsModalClose:active{ transform:translateY(1px); }


/* v015_p03_import_settings_json_load_text_file: Import settings result modal */
#rgImportSettingsModal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,0.55);
  z-index:10060;
}

#rgImportSettingsModal .rg-import-panel{
  width:min(520px, 94vw);
  max-height:min(80vh, 560px);
  overflow:auto;
  position:relative;
  background:rgba(8,12,28,0.96);
}

#rgImportSettingsModal .rg-import-body{
  padding:16px 16px 14px;
}

#rgImportSettingsModal .rg-import-title{
  font-size:16px;
  font-weight:700;
  margin:0 0 10px;
  padding-right:44px; /* keep text clear of the X */
}

#rgImportSettingsModal .rg-import-lines{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0 0 12px;
}

#rgImportSettingsModal .rg-import-line{
  font-size:13px;
  line-height:1.35;
}

#rgImportSettingsModal .rg-import-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:6px;
}

#rgImportSettingsModalClose{
  position:absolute;
  top:8px;
  right:10px;
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:22px;
  line-height:1;
  padding:4px 8px;
  opacity:0.85;
}

#rgImportSettingsModalClose:hover{ opacity:1.0; }
#rgImportSettingsModalClose:active{ transform:translateY(1px); }



#controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
  justify-content:flex-end;
  padding-right:54px; /* reserve space for absolute-positioned menu toggle */
}

.rg-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
  justify-content:flex-start;
}

.control{display:flex;flex-direction:column;gap:6px;min-width:120px}
.control > label{font-size:12px;color:rgba(232,238,255,0.75)}
.control input, .control select, .control textarea{
  appearance:none;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:12px;
  padding:8px 10px;
  color:var(--text);
  outline:none;
}

.control textarea{
  resize:vertical;
  min-height:180px;
  line-height:1.35;
}


/* Darker native dropdown menus (Chrome/Windows) */
select { color-scheme: dark; }
select option { background-color: #0b1026; color: #e8eeff; }

.control input:focus,.control select:focus,.control textarea:focus{border-color:rgba(249,199,79,0.40);box-shadow:0 0 0 3px rgba(249,199,79,0.14)}

.control input:disabled,.control select:disabled,.control textarea:disabled{opacity:0.45;cursor:not-allowed}

/* v015_p01_load_screen_nav_shell */
.rg-mono{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
}

.rg-load-shell{display:flex;flex-direction:column;gap:12px;}
.rg-load-actions{display:flex;flex-wrap:wrap;gap:10px 14px;}
.rg-load-textarea{
  width:100%;
  min-height:320px;
  appearance:none;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:12px;
  padding:10px 12px;
  color:var(--text);
  outline:none;
  resize:vertical;
  line-height:1.35;
}
.rg-load-textarea:focus{border-color:rgba(249,199,79,0.40);box-shadow:0 0 0 3px rgba(249,199,79,0.14)}

.control-buttons{flex-direction:row;gap:10px;min-width:auto;flex-wrap:wrap}
.control-buttons button{
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:var(--text);
  padding:9px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:600;
}
.control-buttons button:hover{border-color:rgba(249,199,79,0.40)}
.control-buttons button:disabled{opacity:0.5;cursor:not-allowed}

.toggles{display:flex;gap:10px;flex-wrap:wrap}
.toggle{
  display:flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
  user-select:none;
}

.path-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pill{
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  color:var(--text);
  padding:7px 10px;
  border-radius:999px;
  cursor:pointer;
  font-weight:600;
}
.pill.active{border-color:rgba(249,199,79,0.45);box-shadow:0 0 0 3px rgba(249,199,79,0.12) inset}
.pill:disabled,
.pill.is-disabled{opacity:0.45;cursor:not-allowed}

.bell-picker{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:8px;
}
.bell-picker--small{grid-template-columns:repeat(8,1fr)}
.bell-picker button{
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.03);
  color:var(--text);
  padding:8px 0;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
}
.bell-picker button.selected{
  border-color:rgba(249,199,79,0.50);
  box-shadow:0 0 0 3px rgba(249,199,79,0.12) inset;
  background:rgba(249,199,79,0.10);
}

.main{
  margin-top:12px;
  display:grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap:12px;
  align-items:start;
}

#leftStack{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:0;
}

.main.onecol{grid-template-columns:1fr}

.pane{
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 22px rgba(0,0,0,0.24);
}

.pane-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  font-weight:700;
  font-size:13px;
  color:rgba(232,238,255,0.90);
}


/* Pane inline settings toggles */
.pane-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.pane-actions .toggle{ padding:4px 8px; font-size:12px; }
.toggles--mini{ gap:6px; }
.toggles--indent{ flex-basis:100%; margin-left:22px; margin-top:4px; }
.pane canvas{
  display:block;
  width:100%;
  height:260px;
}
#displayCanvas{height:240px;cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
/* v06_p17_spotlight_tap_drag_to_ring: prevent iOS tap highlight/selection and enable reliable drag */
#spotlightCanvas{cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
/* v06_p13_notation_touch_polish: prevent iOS tap highlight/selection and enable reliable drag */
#notationCanvas{height:540px;cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}

/* v06_p12a_notation_paging_arrows */
.notation-wrap{position:relative;padding-bottom:56px}
.pill.notation-page-nav{
  position:absolute;
  bottom:4px;
  z-index:5;
  min-width:44px;
  min-height:44px;
  padding:10px 14px;
  font-size:14px;
  font-weight:800;
  line-height:1;
  user-select:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
#notationPrevBtn{left:18px}
#notationNextBtn{right:18px}


.pane-span{grid-column:1 / -1}
.pane-span #stats{padding:12px 14px}

.hidden{display:none !important}

.segmented { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }


/* v012_p02_setup_library_block_and_library_header_hamburger */
.rg-file-input-offscreen{
  position:fixed;
  left:-10000px;
  top:0;
  width:1px;
  height:1px;
  overflow:hidden;
  opacity:0;
}

.footer{
  margin-top:12px;
  margin-bottom:12px;
  padding:10px 14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.03);
  color:rgba(232,238,255,0.78);
  font-size:12px;
}

.summary{
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.08);
  margin-bottom:10px;
  font-weight:700;
}

#stats table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
#stats th,#stats td{
  text-align:right;
  padding:9px 10px;
  font-variant-numeric:tabular-nums;
  border-bottom:1px solid rgba(255,255,255,0.06);
}
#stats th{color:rgba(232,238,255,0.75);font-size:12px;font-weight:700}
#stats td:first-child,#stats th:first-child{text-align:left}

.stats-info{
  margin-top:10px;
  color:rgba(232,238,255,0.70);
  font-size:12px;
  line-height:1.4;
}

/* v06_p11_stats_scroll_safety: keep Stats usable on small screens */
@media (max-width: 700px){
  #statsPane{
    max-height:min(60vh, 460px);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  #statsContent{
    max-height:100%;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    flex:1 1 auto;
    min-height:0;
    box-shadow:inset 0 10px 14px -16px rgba(0,0,0,0.70);
  }
}

.hit-window-control{
  display:flex;align-items:center;gap:10px;font-weight:600;
}
.hit-window-control label{font-size:12px;color:rgba(232,238,255,0.72);font-weight:700}
.hit-window-control select{padding:6px 10px;border-radius:12px}

@media (max-width: 980px){
  .main{grid-template-columns:1fr}
  #notationCanvas{height:460px}
}
    

/* Menu hide toggle */
.top-bar{ position:relative; }
.menu-toggle{
  position:fixed;
  top:calc(26px + env(safe-area-inset-top));
  right:calc((100vw - min(1220px, 100vw)) / 2 + 32px + env(safe-area-inset-right));
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06);
  color:#e8eeff;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:0;
  line-height:1;
  z-index:200;
}
.menu-toggle:hover{ background:rgba(255,255,255,0.10); }
.menu-toggle:active{ transform:translateY(1px); }

.menu-toggle.is-open{
  border-color:rgba(249,199,79,0.30);
  background:rgba(249,199,79,0.12);
}

.menu-toggle-icon{
  position:relative;
  display:block;
  width:18px;
  height:2px;
  border-radius:2px;
  background:#e8eeff;
}
.menu-toggle-icon::before,
.menu-toggle-icon::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  border-radius:2px;
  background:#e8eeff;
}
.menu-toggle-icon::before{ top:-6px; }
.menu-toggle-icon::after{ top:6px; }

/* v09_p04b_hamburger_header_anchor: when hamburger is placed into a pane header row, anchor it in-flow */
.pane-title .menu-toggle{
  position:static;
  top:auto;
  right:auto;
}

/* v09_p04_unified_hamburger_nav: unified dropdown */
.rg-hamburger-dropdown{
  position:fixed;
  top:calc(26px + env(safe-area-inset-top) + 36px + 10px);
  right:calc((100vw - min(1220px, 100vw)) / 2 + 32px + env(safe-area-inset-right));
  z-index:199;
  min-width:176px;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  background:rgba(5,8,20,0.92);
  border:1px solid rgba(255,255,255,0.14);
  border-radius:16px;
  box-shadow:0 18px 60px rgba(0,0,0,0.55);
  backdrop-filter:blur(10px);
}
.rg-hamburger-divider{
  height:1px;
  width:calc(100% - 6px);
  margin:0 3px;
  background:rgba(255,255,255,0.10);
  border-radius:1px;
}

.rg-hamburger-item{
  width:100%;
  text-align:left;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  color:var(--text);
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
}
.rg-hamburger-item:hover{ background:rgba(255,255,255,0.08); }
.rg-hamburger-item:active{ transform:translateY(1px); }

.menu-hidden #controls .control:not(.control-buttons){
  display:none !important;
}
.menu-hidden #controls{
  gap:10px;
}
.menu-hidden .menu-toggle{
  transform:rotate(180deg);
}

/* v06_p9a_view_layout_presets: helper note under control */
.control .control-note{
  font-size:11px;
  line-height:1.25;
}

/* Countdown overlay (Rounds count-up) */
.count-overlay{
  position:fixed;
  left:50%;
  top:84px;
  transform:translateX(-50%);
  z-index:60;
  display:none;
  pointer-events:none;
}
.count-overlay .bubble{
  min-width:110px;
  padding:18px 20px 14px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(5,8,20,0.78);
  box-shadow:0 20px 70px rgba(0,0,0,0.55);
  text-align:center;
}
.count-overlay .num{
  font:800 64px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color:#f9c74f;
}
.count-overlay .lbl{
  margin-top:8px;
  font:600 12px/1.1 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial;
  color:rgba(232,238,255,0.82);
  letter-spacing:0.06em;
  text-transform:uppercase;
}


.menu-hidden #controls{ padding-top:46px; }

.count-overlay .num.ready{ font-size:40px; letter-spacing:0.02em; }

/* Keybindings */
.keybind-panel{display:flex;flex-direction:column;gap:6px;min-width:180px}
.keybind-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.keybind-bell{font-size:12px;color:rgba(232,238,255,0.75);font-weight:700;min-width:60px}
.keybind-glyph{
  font:700 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  min-width:34px;
  text-align:center
}
.keybind-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.keybind-row.glyph-capture .keybind-glyph{
  border-color:rgba(249,199,79,0.55);
  box-shadow:0 0 0 3px rgba(249,199,79,0.12) inset;
  background:rgba(249,199,79,0.10);
  color:#10162c
}
.keybind-key{
  font:700 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  min-width:92px;
  text-align:center
}
.keybind-actions{margin-top:6px;display:flex;gap:10px;flex-wrap:wrap}
.keybind-bind-btn{padding:6px 10px;font-size:12px}

/* v013_p03_setup_bells_block_ui_polish: Setup → Bells (Glyph / Key Bindings) geometric grid */
.keybind-panel{gap:10px}
.keybind-row{
  display:grid;
  grid-template-columns:
    minmax(78px, 0.85fr)
    minmax(180px, 1.35fr)
    minmax(210px, 1.45fr)
    minmax(220px, 1.65fr)
    minmax(120px, 0.80fr)
    minmax(78px, 0.60fr);
  gap:10px;
  align-items:start;
  padding:10px 10px;
  border:1px solid rgba(255,255,255,0.10);
  border-radius:14px;
  background:rgba(255,255,255,0.03);
}
.keybind-row.keybind-header{
  padding:0 10px 6px;
  border:0;
  border-radius:0;
  background:transparent;
  align-items:end;
}
.keybind-row.keybind-header .keybind-cell-header{
  font-size:11px;
  font-weight:800;
  color:rgba(232,238,255,0.70);
  text-transform:uppercase;
  letter-spacing:0.05em;
}
.keybind-cell{min-width:0;display:flex;flex-direction:column;gap:6px}
.keybind-cell-bell{flex-direction:row;align-items:center;gap:8px}
.keybind-cell-coloronly,.keybind-cell-clear{align-items:center;justify-content:center}
.keybind-cell-empty{opacity:0.35}
.keybind-cell-stack{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.keybind-color-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.keybind-color-controls-global .keybind-global-desc{flex-basis:100%;margin-bottom:2px}
.keybind-key-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.keybind-row-bell.alt{background:rgba(255,255,255,0.02)}
.keybind-row-global{background:rgba(255,255,255,0.035)}
.keybind-glyph-muted{opacity:0.65}

@media (max-width: 760px){
  .keybind-row{
    grid-template-columns:
      minmax(66px, 0.85fr)
      minmax(160px, 1.35fr)
      minmax(190px, 1.45fr)
      minmax(200px, 1.65fr)
      minmax(110px, 0.80fr)
      minmax(72px, 0.60fr);
    gap:8px;
  }
}
@media (max-width: 620px){
  .keybind-panel{overflow-x:auto}
  .keybind-row{
    grid-template-columns:
      minmax(60px, 0.85fr)
      minmax(150px, 1.35fr)
      minmax(180px, 1.45fr)
      minmax(190px, 1.65fr)
      minmax(104px, 0.80fr)
      minmax(68px, 0.60fr);
  }
  .keybind-row.keybind-header{padding-left:8px;padding-right:8px}
  .keybind-row{padding-left:8px;padding-right:8px}
}

/* v013_p01a_glyph_binding_allow_modifiers_and_paste: hidden focusable input for glyph binding */
.glyph-capture-input{position:fixed;left:-9999px;top:0;width:1px;height:1px;opacity:0}

/* v013_p01c_setup_glyph_color_bindings: keybind glyph styling controls + picker (Setup UI only) */
.keybind-glyph-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.keybind-color-label{font-size:11px;color:rgba(232,238,255,0.70);font-weight:700}
.keybind-color-input{width:34px;height:28px;padding:0;border:0;background:transparent}
.keybind-color-meta{font-size:10px;color:rgba(232,238,255,0.68);min-width:48px}
.keybind-coloronly{display:flex;align-items:center;gap:6px;font-size:11px;color:rgba(232,238,255,0.78);font-weight:700}
.keybind-coloronly input{transform:translateY(1px)}
.keybind-row-global .keybind-global-desc{font-size:11px;color:rgba(232,238,255,0.78);font-weight:700}

/* Glyph picker overlay */
.glyph-picker-overlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,0.55);
  display:flex;align-items:center;justify-content:center;
  z-index:9999
}
.glyph-picker{
  width:min(560px, 92vw);
  max-height:80vh;
  overflow:auto;
  background:rgba(16,22,44,0.98);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  padding:12px;
  box-shadow:0 14px 40px rgba(0,0,0,0.45)
}
.glyph-picker-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.glyph-picker-title{font-size:12px;font-weight:800;color:rgba(232,238,255,0.85)}
.glyph-picker-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(34px, 1fr));gap:6px}
.glyph-picker-btn{
  height:34px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06);
  color:#e8eeff;
  font:700 14px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  cursor:pointer
}
.glyph-picker-btn:hover{background:rgba(255,255,255,0.10)}
.glyph-picker-foot{margin-top:10px;font-size:11px;color:rgba(232,238,255,0.70);line-height:1.3}

.keybind-row.capture .keybind-key{
  border-color:rgba(249,199,79,0.55);
  box-shadow:0 0 0 3px rgba(249,199,79,0.12) inset;
  background:rgba(249,199,79,0.10);
  color:#10162c
}
.keybind-row.conflict .keybind-key{
  border-color:rgba(239,71,111,0.55);
  box-shadow:0 0 0 3px rgba(239,71,111,0.10) inset
}
.keybind-note{font-size:11px;color:rgba(232,238,255,0.70);margin-top:4px;line-height:1.3}


/* Mic */
.mic-status{
  font-size:11px;
  color:rgba(232,238,255,0.70);
  line-height:1.2;
}
.pill.mic-on{
  border-color:rgba(6,214,160,0.55);
  box-shadow:0 0 0 3px rgba(6,214,160,0.12) inset;
  background:rgba(6,214,160,0.10);
}
.mic-body{ padding:12px 14px 14px; }
.mic-meter{
  position:relative;
  height:14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
  overflow:hidden;
}
.mic-meter-fill{
  height:100%;
  width:0%;
  background:rgba(249,199,79,0.85);
}
.mic-readouts{
  margin-top:10px;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:baseline;
}
.mic-label{
  color:rgba(232,238,255,0.78);
  font-weight:700;
  font-size:12px;
  margin-right:6px;
}
.control input[type="range"]{ padding:0; height:34px; }


/* v06_p9a_view_layout_presets: layout presets (class applied on main#main) */

/* Two columns (classic) - keep existing behavior, but make it explicit. */
.main.layout-two-col:not(.onecol){
  grid-template-columns: 0.9fr 1.1fr;
}

/* One column (wide) */
.main.layout-one-wide{
  grid-template-columns: 1fr;
}

/* One column (narrow / centered) */
.main.layout-one-narrow{
  grid-template-columns: 1fr;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile (thumb reach) */
.main.layout-mobile-thumb{
  grid-template-columns: 1fr;
}
.main.layout-mobile-thumb #spotlightPane{ order: 0; }
.main.layout-mobile-thumb #displayPane{ order: 1; }
.main.layout-mobile-thumb #micPane{ order: 2; }


/* v06_p9b_view_menu_selected_states: clearly show selected vs deselected View toggles */
#screenView #viewMenuControls label.toggle{
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

/* Restore visible checkbox/radio state (global input styles set appearance:none). */
#screenView #viewMenuControls label.toggle input[type="checkbox"],
#screenView #viewMenuControls label.toggle input[type="radio"]{
  appearance:auto;
  -webkit-appearance:auto;
  width:16px;
  height:16px;
  padding:0;
  margin:0;
  accent-color:var(--accent);
  background:transparent;
  border:none;
  box-shadow:none;
}

/* Selected/on state */
#screenView #viewMenuControls .is-selected{
  border-color:rgba(249,199,79,0.55);
  background:rgba(249,199,79,0.12);
  box-shadow:0 0 0 3px rgba(249,199,79,0.10) inset;
}



/* Privacy consent: match View toggle checkbox styling */
#screenPrivacy .rg-privacy-consent label.toggle input[type="checkbox"]{
  appearance:auto;
  -webkit-appearance:auto;
  width:16px;
  height:16px;
  padding:0;
  margin:0;
  accent-color:var(--accent);
  background:transparent;
  border:none;
  box-shadow:none;
}

/* Sound: Run audio mute toggles (Restore Sound defaults area) */
#screenSound .rg-sound-defaults label.toggle input[type="checkbox"]{
  appearance:auto;
  -webkit-appearance:auto;
  width:16px;
  height:16px;
  padding:0;
  margin:0;
  accent-color:var(--accent);
  background:transparent;
  border:none;
  box-shadow:none;
}

/* Selected/on state */
#screenPrivacy .rg-privacy-consent .is-selected{
  border-color:rgba(249,199,79,0.55);
  background:rgba(249,199,79,0.12);
  box-shadow:0 0 0 3px rgba(249,199,79,0.10) inset;
}
/* Focus visibility for keyboard users */
#screenView #viewMenuControls label.toggle:focus-within,
#screenView #viewMenuControls button[aria-pressed]:focus-visible{
  border-color:rgba(249,199,79,0.45);
  box-shadow:0 0 0 3px rgba(249,199,79,0.14);
}


/* v06_p12d_library_browser: Setup CCCBR Library helpers */
#setupCCCBRLibraryControl a{
  color:var(--accent);
  text-decoration:none;
}
#setupCCCBRLibraryControl a:hover{
  text-decoration:underline;
}
#setupLoadCCCBRWebStatus{
  min-height:1em;
  font-size:12px;
}

/* v06_p12d_library_browser: Library screen layout */
#libraryNotationPlaceholder{
  margin-top:12px;
}

#screenLibrary .rg-library-loaded{
  margin-top:6px;
}

#screenLibrary .rg-library-layout{
  display:grid;
  grid-template-columns:1fr 1.15fr;
  gap:14px;
}

@media (max-width: 860px){
  #screenLibrary .rg-library-layout{
    grid-template-columns:1fr;
    grid-template-areas:
      "details"
      "browse";
  }

  #screenLibrary .rg-library-browse{ grid-area:browse; }
  #screenLibrary .rg-library-details{ grid-area:details; }
}


#screenLibrary .rg-library-anchor{
  display:block;
  height:0;
  scroll-margin-top:12px;
}

#screenLibrary .rg-library-jump-row{
  display:none;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
  margin-bottom:10px;
}

#screenLibrary .rg-library-jump-pill{
  padding:6px 10px;
  font-size:12px;
}

@media (max-width: 700px){
  #screenLibrary .rg-library-jump-row{
    display:flex;
  }
}

#screenLibrary .rg-library-col{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  background:rgba(255,255,255,0.03);
  padding:12px;
}

#screenLibrary .rg-library-col-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

#screenLibrary .rg-library-col-title{
  font-weight:800;
  font-size:13px;
  letter-spacing:0.2px;
}

#screenLibrary #librarySearchInput{
  width:min(340px, 100%);
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.20);
  color:rgba(232,238,255,0.92);
}

#screenLibrary .rg-library-notice{
  border:1px dashed rgba(255,255,255,0.18);
  border-radius:16px;
  padding:12px;
  background:rgba(255,255,255,0.02);
}

#screenLibrary .rg-library-notice-title{
  margin-bottom:10px;
}

#screenLibrary .rg-library-mt6{
  margin-top:6px;
}

#screenLibrary details.rg-lib-stage,
#screenLibrary details.rg-lib-class{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:12px;
  padding:8px 10px;
  background:rgba(255,255,255,0.02);
  margin-bottom:10px;
}

/* v06_p14b_library_alphabetical_chunking: nested letter/chunk details */
#screenLibrary details.lib-letter,
#screenLibrary details.lib-chunk{
  border:1px solid rgba(255,255,255,0.10);
  border-radius:12px;
  padding:6px 10px;
  background:rgba(255,255,255,0.015);
  margin-top:8px;
}

#screenLibrary details.lib-letter{
  margin-left:10px;
}

#screenLibrary details.lib-chunk{
  margin-left:18px;
}

#screenLibrary details.lib-letter > summary,
#screenLibrary details.lib-chunk > summary{
  font-weight:650;
  white-space:normal;
}

#screenLibrary .lib-letter-body{
  padding-top:6px;
}

#screenLibrary .lib-chunk-body{
  padding-top:6px;
}

#screenLibrary details.rg-lib-class{
  margin-bottom:8px;
}

#screenLibrary details.rg-lib-stage > summary{
  font-weight:800;
}

#screenLibrary details.rg-lib-class > summary{
  font-weight:700;
}

#screenLibrary details summary{
  cursor:pointer;
}

#screenLibrary .rg-lib-method-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top:8px;
}

#screenLibrary button.rg-lib-method-btn{
  width:100%;
  text-align:left;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.03);
  color:rgba(232,238,255,0.92);
  font-weight:650;
}

#screenLibrary button.rg-lib-method-btn:hover{
  border-color:rgba(249,199,79,0.45);
}

#screenLibrary button.rg-lib-method-btn.is-active{
  border-color:rgba(249,199,79,0.55);
  background:rgba(249,199,79,0.10);
  box-shadow:0 0 0 3px rgba(249,199,79,0.10) inset;
}

#screenLibrary .rg-library-selected-title{
  font-size:18px;
  font-weight:900;
  margin-bottom:8px;
}

#screenLibrary .rg-library-selected-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:10px;
}

#screenLibrary .rg-library-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:10px 0 8px 0;
}


.rg-library-loading{
  margin:0 0 8px 0;
}
#screenLibrary .rg-library-section-title{
  font-weight:900;
  margin-bottom:6px;
}

#screenLibrary .rg-library-section-body{
  color:rgba(232,238,255,0.88);
  font-size:13px;
  line-height:1.35;
}

#screenLibrary .rg-library-mono{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
}

#screenLibrary .rg-library-preview{
  margin-top:12px;
}

#screenLibrary .rg-library-preview-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:8px;
}

#screenLibrary .rg-library-line{
  display:flex;
  align-items:center;
  gap:8px;
}

#screenLibrary #libraryLineBellSelect{
  padding:6px 8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.20);
  color:rgba(232,238,255,0.92);
}

#screenLibrary #libraryPreview{
  max-height:340px;
  overflow:auto;
  white-space:pre;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  padding:10px 10px 64px 10px;
  background:rgba(0,0,0,0.25);
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
}

#screenLibrary .rg-library-preview-box{position:relative}

#screenLibrary .pill.rg-library-page-nav{
  position:absolute;
  bottom:10px;
  z-index:6;
  min-width:44px;
  min-height:44px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  font-weight:900;
  line-height:1;
  user-select:none;
}

#screenLibrary #libraryPreviewPrevBtn{left:10px}
#screenLibrary #libraryPreviewNextBtn{right:10px}

#screenLibrary .rg-library-preview-page-label{
  position:absolute;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  z-index:6;
  font-size:12px;
  font-weight:700;
  pointer-events:none;
}

#screenLibrary .rg-library-preview-limit{
  margin-top:6px;
  font-size:12px;
}

#screenLibrary .lineHilite{
  background:rgba(249,199,79,0.22);
  color:rgba(249,199,79,0.95);
  border-radius:6px;
  padding:0 2px;
}

/* v06_p12d_library_browser: Setup Method Library summary */
#methodLibrary .rg-lib-summary{
  flex:1 1 100%;
  width:100%;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  background:rgba(255,255,255,0.02);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

#methodLibrary .rg-lib-summary-head{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:baseline;
}

#methodLibrary .rg-lib-stage-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

#methodLibrary .rg-lib-stage-pill{
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.03);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  color:rgba(232,238,255,0.85);
}

#methodLibrary .rg-lib-summary-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

#methodLibrary .rg-lib-summary-actions .control{
  min-width:auto;
}

#methodLibrary .rg-lib-summary-hint{
  font-size:12px;
  color:rgba(232,238,255,0.72);
}


/* v07_p01_privacy_audience_measurement_consent */

.rg-consent-banner{
  position:fixed;
  left:10px;
  right:10px;
  bottom:calc(10px + env(safe-area-inset-bottom));
  z-index:9999;
}

.rg-consent-inner{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px 14px;
  background:rgba(5,8,20,0.96);
  border:1px solid var(--stroke2);
  border-radius:18px;
  box-shadow:0 12px 26px rgba(0,0,0,0.35);
}

.rg-consent-text{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.rg-consent-copy{
  font-size:13px;
  line-height:1.35;
  color:var(--text);
}

.rg-link-button{
  background:none;
  border:none;
  padding:0;
  margin:0;
  text-align:left;
  color:var(--accent);
  text-decoration:underline;
  cursor:pointer;
  font:inherit;
}

.rg-consent-actions{
  display:flex;
  gap:10px;
}

.rg-consent-actions .rg-consent-btn{
  flex:1;
}

@media (min-width: 720px){
  .rg-consent-inner{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:14px;
  }
  .rg-consent-text{
    flex:1;
  }
  .rg-consent-actions{
    flex:0 0 auto;
    min-width:340px;
  }
}

#screenPrivacy .rg-privacy-consent{
  width:100%;
  max-width:900px;
  margin:0 auto 12px auto;
}

#screenPrivacy .rg-privacy-consent-control{
  padding:12px 14px;
  background:var(--panel2);
  border:1px solid var(--stroke2);
  border-radius:18px;
}

#screenPrivacy .rg-privacy-refresh-note{
  margin-top:8px;
  padding:10px 12px;
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:14px;
  color:rgba(232,238,255,0.92);
  font-size:13px;
  line-height:1.45;
}

#screenPrivacy .rg-privacy-policy{
  width:100%;
  max-width:900px;
  margin:0 auto;
  padding:12px 14px;
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:18px;
  color:var(--text);
  font-size:14px;
  line-height:1.55;
}

#screenPrivacy .rg-privacy-policy h2{
  margin:0 0 10px 0;
  font-size:18px;
}

#screenPrivacy .rg-privacy-policy h3{
  margin:14px 0 6px 0;
  font-size:15px;
}

#screenPrivacy .rg-privacy-policy p{
  margin:0 0 10px 0;
}

#screenPrivacy .rg-privacy-policy ul{
  margin:0 0 12px 18px;
  padding:0;
}

#screenPrivacy .rg-privacy-policy li{
  margin:0 0 6px 0;
}

#screenPrivacy .rg-nav{
  margin-top:14px;
}

.rg-privacy-actions{
  margin-top:10px;
}

.rg-footer-privacy{
  max-width:1220px;
  margin:8px auto 18px auto;
  text-align:center;
}

.rg-footer-privacy-link{
  background:transparent;
  border:0;
  padding:6px 10px;
  color:rgba(232,238,255,0.78);
  font:inherit;
  font-size:12px;
  text-decoration:underline;
  cursor:pointer;
}

.rg-footer-privacy-link:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:10px;
}

.rg-consent-head{margin-bottom:4px;}

/* v08_p05_sound_per_bell_overrides: per-bell sound editor (Sound menu) */
.rg-bell-overrides-control{ width:100%; }
.rg-bell-overrides-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.rg-bell-overrides-list{ display:flex; flex-direction:column; gap:10px; margin-top:6px; }

/* v011_p01_sound_intro_page: Sound Menu Introduction entry (Sound menu) */
#screenSound .rg-sound-intro-entry{
  width:100%;
  max-width:900px;
  margin:0 auto 10px auto;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.02);
}

#screenSound .rg-sound-intro-link{
  display:inline-block;
  font:inherit;
  font-weight:800;
  letter-spacing:0.2px;
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}

#screenSound .rg-sound-intro-link:hover{ opacity:0.92; }

#screenSound .rg-sound-intro-link:focus{
  outline:2px solid var(--accent);
  outline-offset:3px;
  border-radius:10px;
}

#screenSound .rg-sound-intro-helper{
  margin-top:4px;
  font-size:13px;
  line-height:1.35;
}

/* v011_p03_sound_layout_drone_first: section blocks (Sound menu) */
/* v021_p05_sound_layout_phrase_help_drone_key_root_mode: Sound defaults spacing */
#screenSound .rg-sound-defaults{
  width:100%;
  max-width:900px;
  margin:0 auto 14px auto;
}


#screenSound .rg-sound-block{
  width:100%;
  max-width:900px;
  margin:0 auto 10px auto;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.02);
}

#screenSound .rg-sound-block-head{ margin:0 0 8px 0; }

#screenSound .rg-sound-profiles{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-start;
  margin:6px 0 10px 0;
}

#screenSound .rg-sound-profiles .control{ margin:0; }

#screenSound .rg-sound-profiles-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

#screenSound .rg-sound-profiles-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}



#screenSound .rg-sound-profiles-select{
  min-width:160px;
}

#screenSound .rg-sound-profiles-max-note{
  display:none;
  font-size:12px;
  opacity:0.75;
}

#screenSound .rg-sound-profile-tab{
  padding:6px 10px;
  font-size:12px;
  line-height:1;
}

#screenSound .rg-sound-profile-tab[aria-selected="true"]{
  outline:2px solid rgba(255,255,255,0.18);
  box-shadow:0 0 0 1px rgba(0,0,0,0.35) inset;
}

#screenSound .rg-sound-profiles-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}

#screenSound .rg-sound-lead-assignments{
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,0.10);
}

#screenSound .rg-sound-lead-assignments > .rg-sound-lead-assignments-label{
  margin:0;
  font-size:12px;
  font-weight:600;
}

#screenSound #soundLeadAssignmentsNote{
  margin-top:4px;
  font-size:12px;
}

#screenSound .rg-sound-lead-assignments-list{
  margin-top:6px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

#screenSound .rg-sound-lead-assignments-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

#screenSound .rg-sound-lead-assignments-row > .rg-sound-lead-assignments-label{
  margin:0;
  min-width:64px;
  font-size:12px;
  opacity:0.85;
}

#screenSound .rg-sound-lead-assignments-select{
  min-width:140px;
}


#screenSound .rg-sound-leadcount-value{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.02);
  font-weight:800;
  letter-spacing:0.2px;
  opacity:0.92;
}

#screenSound .rg-sound-block-title{
  font-size:12px;
  font-weight:900;
  letter-spacing:1.2px;
  opacity:0.92;
}

#screenSound details.rg-sound-block > summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}

#screenSound details.rg-sound-block > summary::-webkit-details-marker{ display:none; }

#screenSound .rg-sound-block-summary{
  font-size:12px;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:70%;
}

#screenSound details.rg-sound-block[open] > summary{
  margin-bottom:8px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
/* v011_p04_bell_pitch_collapsible_blocks: Bell Pitch summary caret + pitch pattern blocks */
#screenSound .rg-sound-block-summaryline{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  list-style:none;
}

#screenSound .rg-sound-block-summaryline:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:12px;
}

#screenSound .rg-sound-block-summaryline .rg-sound-block-summary{
  flex:1 1 auto;
  min-width:0;
}

#screenSound .rg-sound-block-caret{
  margin-left:auto;
  width:0;
  height:0;
  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-top:8px solid rgba(232,238,255,0.75);
  opacity:0.85;
  transform:rotate(-90deg);
  transition:transform 120ms ease;
}

#screenSound details.rg-sound-block[open] > summary .rg-sound-block-caret{
  transform:rotate(0deg);
}

#screenSound .rg-bell-pitch-root{
  margin:2px 0 10px 0;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.02);
}

#screenSound .rg-bell-pitch-root-title{
  font-size:12px;
  font-weight:800;
  letter-spacing:0.2px;
  margin:0 0 6px 0;
  color:rgba(232,238,255,0.90);
}

#screenSound .rg-bell-pitch-blocks{
  display:flex;
  flex-direction:column;
  gap:10px;
}

#screenSound .rg-pitch-card{
  display:flex;
  gap:10px;
  padding:10px 10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.02);
}

#screenSound .rg-pitch-card.is-selected{
  border-color:rgba(249,199,79,0.55);
  box-shadow:0 0 0 3px rgba(249,199,79,0.12) inset;
  background:rgba(249,199,79,0.07);
}

#screenSound .rg-pitch-card-check{
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  padding-top:2px;
  position:relative;
}

#screenSound .rg-pitch-card input[type="radio"]{
  position:absolute;
  left:0;
  top:0;
  width:26px;
  height:26px;
  margin:0;
  opacity:0;
  cursor:pointer;
}

#screenSound .rg-pitch-check{
  position:relative;
  pointer-events:none;
  width:26px;
  height:26px;
  border-radius:7px;
  border:2px solid rgba(255,255,255,0.32);
  background:rgba(0,0,0,0.12);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

#screenSound .rg-pitch-card input[type="radio"]:checked + .rg-pitch-check{
  border-color:rgba(249,199,79,0.75);
  background:rgba(249,199,79,0.14);
}

#screenSound .rg-pitch-card input[type="radio"]:checked + .rg-pitch-check::after{
  content:"";
  width:10px;
  height:10px;
  border-radius:3px;
  background:rgba(249,199,79,0.85);
}

#screenSound .rg-pitch-card-body{
  flex:1 1 auto;
  min-width:0;
}

#screenSound .rg-pitch-card-title-row{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin:0 0 4px 0;
}

#screenSound .rg-pitch-card-title{
  font-size:14px;
  font-weight:850;
  color:rgba(232,238,255,0.95);
}

#screenSound .rg-pitch-card-sub{
  font-size:12px;
  line-height:1.25;
  color:rgba(232,238,255,0.70);
}

#screenSound .rg-pitch-card-controls{
  margin-top:6px;
}

#screenSound .rg-pitch-card-controls .control{
  margin-top:8px;
}

#screenSound .rg-pitch-card:focus-within{
  outline:2px solid rgba(249,199,79,0.55);
  outline-offset:2px;
}




/* v011_p04b_bell_pitch_blocks_custom_collapsible: Custom sub-collapse inside Bell Pitch */
#screenSound details.rg-pitch-custom-details{
  margin-top:6px;
  padding:6px 8px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.015);
}

#screenSound details.rg-pitch-custom-details > summary::-webkit-details-marker{ display:none; }

#screenSound .rg-pitch-custom-summaryline{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  list-style:none;
}

#screenSound .rg-pitch-custom-summaryline:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:12px;
}

#screenSound .rg-pitch-custom-title{
  font-size:13px;
  font-weight:820;
  color:rgba(232,238,255,0.90);
}

#screenSound .rg-pitch-custom-summary{
  flex:1 1 auto;
  min-width:0;
  font-size:12px;
}

#screenSound .rg-pitch-custom-caret{
  margin-left:auto;
  width:0;
  height:0;
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-top:7px solid rgba(232,238,255,0.70);
  opacity:0.85;
  transform:rotate(-90deg);
  transition:transform 120ms ease;
}

#screenSound details.rg-pitch-custom-details[open] > summary .rg-pitch-custom-caret{
  transform:rotate(0deg);
}

#screenSound .rg-pitch-custom-body{
  margin-top:8px;
}
/* v011_p02a_sound_test_row_spotlight_style: Bell Test Instrument Row (Sound menu) */
#screenSound .rg-sound-test-row{
  width:100%;
  max-width:900px;
  margin:12px auto 12px auto;
}

/* Reuse Spotlight-style "track" container styling via .rg-quick-bell-row (visual only). */
#screenSound #soundTestInstrumentRow.rg-quick-bell-row{
  padding:8px 10px;
  gap:8px;
  border-radius:16px;
  justify-content:center;
  --rg-sound-test-btn-size: clamp(56px, 16vw, 74px);
}

/* Bigger, touch-friendly Spotlight-style pill buttons (visual only). */
#screenSound #soundTestInstrumentRow .rg-sound-test-btn{
  height:62px;
  min-height:56px;
  width:var(--rg-sound-test-btn-size, 64px);
  min-width:var(--rg-sound-test-btn-size, 64px);
  flex:0 0 var(--rg-sound-test-btn-size, 64px);
  padding:0;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:850;
  font-size:20px;
  letter-spacing:0.2px;
  color:rgba(232,238,255,0.96);
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.10);
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  touch-action:none;
}

#screenSound #soundTestInstrumentRow .rg-sound-test-btn:hover{ background:rgba(255,255,255,0.07); }
#screenSound #soundTestInstrumentRow .rg-sound-test-btn:active{ transform:scale(0.98); }

/* Match Spotlight selection/active feel without changing any Sound settings. */
#screenSound #soundTestInstrumentRow .rg-sound-test-btn.is-active{
  border-color:rgba(249,199,79,0.50);
  box-shadow:0 0 0 3px rgba(249,199,79,0.12) inset;
  background:rgba(249,199,79,0.10);
}

#screenSound #soundTestInstrumentRow .rg-sound-test-btn:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

@media (max-width: 480px){
  #screenSound #soundTestInstrumentRow.rg-quick-bell-row{ padding:7px 8px; gap:6px; --rg-sound-test-btn-size: clamp(54px, 18vw, 68px); }
  #screenSound #soundTestInstrumentRow .rg-sound-test-btn{ height:58px; font-size:19px; }
}

/* v011_p01_sound_intro_page: Sound Menu Introduction screen */
#screenSoundIntro .rg-sound-intro{
  width:100%;
  max-width:900px;
  margin:0 auto;
  padding:12px 14px;
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:18px;
  color:var(--text);
  font-size:14px;
  line-height:1.55;
}

#screenSoundIntro .rg-sound-intro h2{
  margin:0 0 10px 0;
  font-size:18px;
}

#screenSoundIntro .rg-sound-intro h3{
  margin:14px 0 6px 0;
  font-size:15px;
}

#screenSoundIntro .rg-sound-intro h4{
  margin:12px 0 4px 0;
  font-size:14px;
  opacity:0.95;
}

#screenSoundIntro .rg-sound-intro p{
  margin:0 0 10px 0;
}

#screenSoundIntro .rg-sound-intro ul{
  margin:0 0 12px 18px;
  padding:0;
}

#screenSoundIntro .rg-sound-intro li{
  margin:0 0 6px 0;
}

/* v10_p08_sound_global_chords_splitstrike: global chord controls (Sound menu) */
#screenSound #soundChordControls{
  width:100%;
  margin-top:6px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.02);
}

#screenSound #soundChordControls .control{
  min-width:140px;
}

#screenSound #soundChordControls .control-note{
  max-width:260px;
}


/* v014_p01_global_custom_chords_advanced: global chord custom + advanced */
#screenSound #soundChordControls details.rg-chords-advanced{
  width:100%;
  margin-top:8px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.02);
}
#screenSound #soundChordControls details.rg-chords-advanced > summary{
  list-style:none;
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  letter-spacing:0.6px;
  color:rgba(232,238,255,0.78);
}
#screenSound #soundChordControls details.rg-chords-advanced > summary::-webkit-details-marker{ display:none; }
#screenSound #soundChordControls details.rg-chords-advanced[open] > summary{
  margin-bottom:8px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
#screenSound #soundChordControls .rg-chords-advanced-body{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-start;
}
#screenSound #soundChordControls .rg-chords-advanced-body .control{
  min-width:180px;
}


/* v10_p04_sound_quick_bell_row: Spotlight-style quick test row (Sound menu) */
.rg-quick-bell-row{
  flex-basis:100%;
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  padding:6px 8px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.02);
  touch-action:none;
  -webkit-tap-highlight-color: transparent;
  user-select:none;
  -webkit-user-select:none;
}

.rg-quick-bell-btn{
  width:34px;
  height:34px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:16px;
  color:rgba(232,238,255,0.96);
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.10);
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  touch-action:none;
}

.rg-quick-bell-btn:hover{ background:rgba(255,255,255,0.07); }
.rg-quick-bell-btn:active{ transform:scale(0.98); }
.rg-quick-bell-btn.is-active{ background:rgba(255,255,255,0.09); }

.rg-bell-override-row{
  display:grid;
  grid-template-columns:44px 1fr;
  gap:10px;
  align-items:start;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,0.10);
  border-radius:14px;
  background:rgba(255,255,255,0.03);
}

.rg-bell-override-bell{
  width:40px;
  height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:18px;
  color:rgba(232,238,255,0.96);
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.10);
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.rg-bell-override-bell:hover{ background:rgba(255,255,255,0.07); }
.rg-bell-override-bell:active{ transform:scale(0.98); }

.rg-bell-override-body{ display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; }
.rg-bell-override-group{ flex:1 1 240px; min-width:220px; display:flex; flex-direction:column; gap:6px; }
.rg-bell-override-group-head{ display:flex; justify-content:space-between; gap:8px; align-items:baseline; }
.rg-bell-override-group-title{ font-size:12px; color:rgba(232,238,255,0.72); }
.rg-bell-override-effective{ font-size:12px; color:rgba(232,238,255,0.88); }
.rg-bell-override-group-controls{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.rg-bell-override-group-controls input{ flex:1 1 120px; min-width:120px; }
.rg-bell-override-group-controls select{ flex:1 1 140px; min-width:140px; }



/* v014_p05b_bell_timbre_per_bell_overrides: per-bell timbre override UI */
.rg-bell-override-group--timbre{ flex:2 1 360px; min-width:300px; }
.rg-bell-timbre-controls{ display:flex; flex-direction:column; align-items:stretch; gap:8px; width:100%; }
.rg-bell-timbre-controls select{ flex:0 0 auto; min-width:180px; }
.rg-bell-timbre-body{ display:flex; flex-direction:column; gap:8px; width:100%; }
.rg-bell-timbre-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; width:100%; }
.rg-bell-timbre-row label{ flex:1 1 180px; min-width:160px; font-size:12px; color:rgba(232,238,255,0.88); }
.rg-bell-timbre-row input[type="range"]{ flex:2 1 220px; min-width:200px; }
.rg-bell-timbre-value{ font-variant-numeric:tabular-nums; }

/* v10_p09_sound_per_bell_chords_overrides: per-bell chord override UI */
.rg-bell-override-group--chord{ flex:2 1 360px; min-width:300px; }
.rg-bell-chord-controls{ display:flex; flex-direction:column; gap:8px; width:100%; }
.rg-bell-chord-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rg-bell-chord-row select{ flex:1 1 160px; min-width:160px; }
.rg-bell-chord-row input{ flex:1 1 160px; min-width:160px; }
.rg-chord-enable{ display:flex; align-items:center; gap:6px; font-size:12px; color:rgba(232,238,255,0.88); }
.rg-chord-enable input{ flex:0 0 auto; min-width:auto; }
.rg-chord-num{ display:flex; align-items:center; gap:6px; font-size:12px; color:rgba(232,238,255,0.88); }
.rg-chord-num input{ width:74px; min-width:74px; flex:0 0 auto; }
.rg-bell-chord-adv{ width:100%; padding:8px; border:1px solid rgba(255,255,255,0.10); border-radius:12px; background:rgba(255,255,255,0.02); }
.rg-bell-chord-adv-grid{ display:grid; grid-template-columns:repeat(2, minmax(160px, 1fr)); gap:10px; }
.rg-bell-chord-adv-field{ display:flex; flex-direction:column; gap:6px; }
.rg-bell-chord-adv-label{ font-size:12px; color:rgba(232,238,255,0.78); }
.rg-bell-chord-adv-note{ margin-top:8px; font-size:12px; }
.rg-inline-warn{ font-size:12px; color:rgba(255,196,128,0.95); }

/* v10_p06_sound_per_bell_piano_keypicker: per-bell Key piano keyboard */
.rg-bell-override-group-controls .rg-piano{ flex:1 1 220px; min-width:220px; }

.rg-piano{
  position:relative;
  height:46px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.02);
  overflow:hidden;
  touch-action:none;
  -webkit-tap-highlight-color: transparent;
  user-select:none;
  -webkit-user-select:none;
}

.rg-piano-white{
  position:absolute;
  inset:0;
  display:flex;
  z-index:1;
}

.rg-piano-key{
  font:inherit;
  border:0;
  margin:0;
  padding:0;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}

.rg-piano-key--white{
  flex:1 1 0;
  height:100%;
  background:rgba(255,255,255,0.07);
  border-right:1px solid rgba(0,0,0,0.25);
  color:rgba(232,238,255,0.78);
  font-size:10px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding-bottom:4px;
}
.rg-piano-key--white:last-child{ border-right:0; }

.rg-piano-key--black{
  position:absolute;
  top:0;
  height:62%;
  width:10%;
  transform:translateX(-50%);
  z-index:2;
  border-radius:0 0 9px 9px;
  background:rgba(0,0,0,0.68);
  border:1px solid rgba(255,255,255,0.08);
  color:rgba(232,238,255,0.70);
  font-size:9px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding-bottom:3px;
}

.rg-piano-key--black[data-note="C#"]{ left:14.2857%; }
.rg-piano-key--black[data-note="Eb"]{ left:28.5714%; }
.rg-piano-key--black[data-note="F#"]{ left:57.1429%; }
.rg-piano-key--black[data-note="Ab"]{ left:71.4286%; }
.rg-piano-key--black[data-note="Bb"]{ left:85.7143%; }

.rg-piano-key.is-selected{
  background:rgba(249,199,79,0.20);
  color:rgba(232,238,255,0.96);
}
.rg-piano-key--black.is-selected{
  background:rgba(249,199,79,0.50);
  border-color:rgba(249,199,79,0.55);
}

.rg-piano-key.is-active{
  box-shadow: inset 0 0 0 2px rgba(249,199,79,0.55);
}

.rg-piano-key:focus{
  outline:2px solid var(--accent);
  outline-offset:-2px;
}

@media (max-width: 520px){
  .rg-bell-override-group-controls .rg-piano{ min-width:180px; }
  .rg-piano{ height:44px; }
  .rg-piano-key--white{ font-size:9px; padding-bottom:3px; }
  .rg-piano-key--black{ font-size:8px; }
}



/* v10_p05_sound_per_bell_hz_slider_preview: per-bell Hz slider */
.rg-bell-override-group-controls input.rg-bell-hz-slider{
  flex:2 1 200px;
  min-width:170px;
  touch-action:none;
  -webkit-tap-highlight-color: transparent;
 }

.pill.rg-mini{ padding:6px 10px; font-size:12px; }

@media (max-width: 520px){
  .rg-bell-override-row{ grid-template-columns:40px 1fr; padding:10px; }
  .rg-bell-override-group{ min-width:180px; }
  .rg-bell-override-group--chord{ min-width:220px; }
  .rg-bell-chord-adv-grid{ grid-template-columns:1fr; }
}


/* v10_p01_polish_defaults_privacy_home_buttons: Home button readability */
#screenHome .rg-home .pill{
  font-size:18px;
  font-weight:700;
  line-height:1.15;
}
#screenHome .rg-home-menu .pill{padding:12px 14px;}
#screenHome .rg-home-bottom .pill{padding:12px 18px;}

/* v012_p01_setup_blocks_layout: Setup screen blocks */
#screenPlay #playMenuControls{ align-items:stretch; }

#screenPlay .rg-setup-block{
  width:100%;
  max-width:900px;
  margin:0 auto 10px auto;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.02);
}

#screenPlay .rg-setup-block-head{ margin:0 0 8px 0; }

#screenPlay .rg-setup-block-title{
  font-size:12px;
  font-weight:900;
  letter-spacing:1.2px;
  text-transform:uppercase;
  color:rgba(232,238,255,0.85);
}

#screenPlay .rg-setup-block-body{ width:100%; }


/* v022_p13_view_menu_reorg_defaults_and_setup_notation_browser: Setup Notation browser (collapsible) */
#screenPlay details.rg-setup-block.rg-setup-block--collapsible > summary.rg-setup-block-summaryline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  list-style:none;
}
#screenPlay details.rg-setup-block.rg-setup-block--collapsible > summary.rg-setup-block-summaryline::-webkit-details-marker{display:none}
#screenPlay details.rg-setup-block.rg-setup-block--collapsible > summary.rg-setup-block-summaryline:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:12px;
}
#screenPlay .rg-setup-block-caret{
  width:0;height:0;
  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-top:8px solid rgba(232,238,255,0.75);
  opacity:0.85;
  transform:rotate(-90deg);
  transition:transform 120ms ease;
}
#screenPlay details.rg-setup-block[open] > summary .rg-setup-block-caret{transform:rotate(0deg)}

#setupNotationLineMount{ margin:0 0 8px 0; }
#setupNotationMount{ width:100%; }



/* v014_p02_drone_variant_knobs: Drone Variants group */
#droneVariantsControl{flex:1 1 100%;min-width:260px}
#droneVariantsControl .rg-variants-controls{margin-top:4px}
#droneVariantsControl .rg-variants-controls .control{min-width:140px}


/* v014_p04_multi_drone_layers: Drone Layers UI (Sound → Drone) */
#screenSound .rg-drone-layers-root{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
}
#screenSound .rg-drone-layers-global{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
  justify-content:flex-start;
}
#screenSound .rg-drone-layers-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#screenSound .rg-drone-layer-card{
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.03);
  border-radius:14px;
  padding:10px;
}
#screenSound .rg-drone-layer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
#screenSound .rg-drone-layer-title{
  font-size:12px;
  line-height:1.2;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:rgba(232,238,255,0.80);
  user-select:none;
}
#screenSound .rg-drone-layer-title .rg-override-label{
  margin-left:8px;
  font-size:11px;
  letter-spacing:0.02em;
  opacity:0.75;
  text-transform:none;
}

#screenSound .rg-drone-layer-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
#screenSound .rg-drone-layer-body{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
  justify-content:flex-start;
}


#screenSound .rg-drone-layer-body .rg-drone-adv-details{
  flex-basis:100%;
  width:100%;
  align-self:stretch;
}
#screenSound .rg-drone-layer-add-row{
  display:flex;
  align-items:center;
  gap:10px;
}
#screenSound .rg-drone-layer-card.rg-drone-layer-muted{
  opacity:0.70;
}


/* v014_p045a_spatial_pan_only */
.rg-range-readout{
  margin-left:8px;
  font-variant-numeric:tabular-nums;
  font-weight:700;
  opacity:0.9;
}
/* v014_p05a_bell_timbre_global */
#screenSound .rg-sound-subsection-title{
  width:100%;
  margin:10px 0 6px 0;
  font-size:11px;
  font-weight:900;
  letter-spacing:1.1px;
  color:rgba(232,238,255,0.78);
}
#screenSound .rg-sound-bell-timbre{
  margin:0 0 8px 0;
}
/* v015_p02a_load_ui_polish: Load + Export UI polish */
/* A) Keep Load JSON textarea clear of the fixed hamburger/menu button on narrower widths */
#screenLoad{ --rg-load-menu-reserve: 0px; }
@media (max-width: 960px){
  #screenLoad{ --rg-load-menu-reserve: calc(54px + env(safe-area-inset-right)); }
}
#screenLoad .rg-load-textarea{
  max-width: calc(100% - var(--rg-load-menu-reserve));
}

/* v015_p03a_load_hotfix_glyphs_typing_ui: prevent Load textarea from clipping into bottom nav */
#screenLoad .rg-nav{margin-top:14px;padding-top:10px;}


/* B) Export settings modal readability (less transparency / higher contrast) */
#rgExportSettingsModal{
  background:rgba(0,0,0,0.68);
}
#rgExportSettingsModal .rg-export-panel{
  background:rgba(8,12,28,0.96);
  border-color:rgba(255,255,255,0.16);
  box-shadow:0 14px 30px rgba(0,0,0,0.52);
}
#rgExportSettingsModal .control > label{
  color:rgba(232,238,255,0.86);
}
#rgExportSettingsModal .rg-export-sub{
  color:rgba(232,238,255,0.70);
}
#rgExportSettingsModal .control input{
  background:rgba(255,255,255,0.08);
  border-color:rgba(255,255,255,0.18);
}


/* v015_p04_stats_export_import_and_compare: Export stats toggle + preview */
#rgExportSettingsModal .rg-export-stats{
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.08);
}

#rgExportSettingsModal .rg-export-stats-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  cursor:pointer;
  user-select:none;
}

#rgExportSettingsModal .rg-export-stats-toggle input{
  width:18px;
  height:18px;
}

#rgExportSettingsModal .rg-export-stats-preview{
  margin-top:8px;
  font-size:0.95em;
  line-height:1.35;
  opacity:0.92;
}

#rgExportSettingsModal .rg-export-stats-preview .muted{
  opacity:0.75;
}

#rgExportSettingsModal .rg-export-stats-preview table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin-top:8px;
}

#rgExportSettingsModal .rg-export-stats-preview th,
#rgExportSettingsModal .rg-export-stats-preview td{
  padding:6px 8px;
  text-align:right;
  font-variant-numeric:tabular-nums;
}

#rgExportSettingsModal .rg-export-stats-preview th:first-child,
#rgExportSettingsModal .rg-export-stats-preview td:first-child{
  text-align:left;
}

/* v015_p04_stats_export_import_and_compare: Historic stats section */
#stats .stats-historic{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,0.08);
}

#stats .stats-historic-title{
  font-weight:800;
  margin-bottom:8px;
}

#stats .stats-historic-item{
  display:flex;
  flex-wrap:wrap;
  gap:8px 10px;
  align-items:baseline;
  padding:6px 0;
  border-bottom:1px solid rgba(255,255,255,0.06);
}

#stats .stats-historic-item:last-child{
  border-bottom:0;
}

#stats .stats-historic-score{
  font-weight:900;
  letter-spacing:0.2px;
}

#stats .stats-historic-when{
  opacity:0.78;
  font-variant-numeric:tabular-nums;
}

#stats .stats-historic-mae{
  opacity:0.86;
  font-variant-numeric:tabular-nums;
}


#stats .stats-historic-label{
  opacity:0.92;
}

#stats .stats-historic-details{
  opacity:0.78;
}

#stats .stats-historic-note{
  margin-top:8px;
  opacity:0.78;
  font-size:0.95em;
}


/* v017_p01_polyrhythm_core: Polyrhythm (Sound) */
#screenSound .rg-poly-root{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
}
#screenSound .rg-poly-global{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
}


/* v021_p06_poly_presets_panel_percussion_and_quick_layers: Presets affordance */
#screenSound .rg-poly-presets-details{
  margin:0;
}
#screenSound .rg-poly-presets-details > summary{
  list-style:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
}
#screenSound .rg-poly-presets-details > summary::-webkit-details-marker{ display:none; }
#screenSound .rg-poly-presets-details[open]{
  flex-basis:100%;
}
#screenSound .rg-poly-presets-panel{
  margin-top:8px;
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.08);
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
}
#screenSound .rg-poly-presets-panel .control{
  min-width:240px;
}
#screenSound .rg-poly-presets-panel select{
  min-width:220px;
}

#screenSound .rg-poly-presets-panel select optgroup{
  color:#111;
  font-weight:700;
  opacity:1;
}
#screenSound .rg-poly-presets-panel select optgroup option{
  font-weight:400;
}

#screenSound .rg-poly-hb-builder{
  flex-basis:100%;
  width:100%;
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
  margin-top:8px;
  padding-top:8px;
  border-top:1px dashed rgba(255,255,255,0.10);
}

#screenSound .rg-poly-hb-builder .rg-poly-adv-details{
  flex-basis:100%;
  width:100%;
}

#screenSound .rg-poly-presets-panel .rg-poly-hb-builder:first-child{
  margin-top:0;
  padding-top:0;
  border-top:0;
}

#screenSound .rg-poly-hb-title{
  flex-basis:100%;
  font-weight:700;
  font-size:13px;
  opacity:0.88;
}
#screenSound .rg-poly-hb-note{
  flex-basis:100%;
  font-size:12px;
  opacity:0.75;
}

#screenSound .rg-poly-layers{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#screenSound .rg-poly-layer-card{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.02);
}
#screenSound .rg-poly-layer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 8px 0;
}
#screenSound .rg-poly-layer-title{
  font-size:12px;
  line-height:1.2;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:rgba(232,238,255,0.80);
  user-select:none;
}
#screenSound .rg-poly-layer-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
#screenSound .rg-poly-layer-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
}
#screenSound .rg-poly-layer-controls .control{ min-width:140px; }
#screenSound .rg-poly-layer-controls input[type="text"]{ width:260px; max-width:100%; }

/* v021_p12_poly_layer_time_signature_phrase_durations: compact time sig control */
#screenSound .rg-poly-layer-controls .control.rg-poly-time-sig-ctl{ min-width:0; }
#screenSound .rg-poly-time-sig{ display:flex; align-items:center; gap:6px; }
#screenSound .rg-poly-time-sig input[type="number"]{ width:56px; }
#screenSound .rg-poly-time-sig select{ width:68px; }
#screenSound .rg-poly-time-sig-slash{ opacity:0.85; }

#screenSound .rg-poly-test-area{
  display:flex;
  flex-wrap:wrap;
  gap:6px 8px;
  align-items:center;
}
#screenSound .rg-poly-test-kb{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
#screenSound .rg-poly-inline-note{
  font-size:12px;
  line-height:1.3;
  color:rgba(232,238,255,0.65);
}

/* v017_p02_polyrhythm_layer_sound: per-layer sound UI inside polyrhythm layer cards */
#screenSound .rg-poly-sound-details{
  margin-top:10px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.12);
}
#screenSound .rg-poly-sound-details > summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  font-weight:750;
}
#screenSound .rg-poly-sound-details > summary::-webkit-details-marker{ display:none; }
#screenSound .rg-poly-sound-details[open] > summary{ margin-bottom:8px; }

#screenSound .rg-poly-sound-badge{
  font-size:11px;
  opacity:0.75;
  white-space:nowrap;
}

#screenSound .rg-poly-adv-details{
  padding:8px 10px;
  border-radius:12px;
  border:1px dashed rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.08);
}
#screenSound .rg-poly-adv-details > summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  font-weight:750;
}
#screenSound .rg-poly-adv-details > summary::-webkit-details-marker{ display:none; }
#screenSound .rg-poly-adv-details[open] > summary{ margin-bottom:8px; }
#screenSound .rg-poly-adv-body{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#screenSound .rg-poly-tokenovr-details > summary::-webkit-details-marker{ display:none; }
#screenSound .rg-poly-tokenovr-details > summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  font-weight:750;
}
#screenSound .rg-poly-token-grid{
  display:flex;
  flex-direction:column;
  gap:6px;
}
#screenSound .rg-poly-token-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px 10px;
  align-items:flex-end;
  padding:4px 0;
  border-top:1px solid rgba(255,255,255,0.06);
}
#screenSound .rg-poly-token-row:first-child{ border-top:none; }
#screenSound .rg-poly-token-label{
  font-weight:750;
  min-width:64px;
  opacity:0.85;
}
#screenSound .rg-poly-token-row input[type="number"]{
  width:92px;
}

#screenSound .rg-poly-sound-body{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#screenSound .rg-poly-sound-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
}
#screenSound .rg-poly-sound-custom{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#screenSound .rg-poly-range-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}
#screenSound .rg-poly-range-wrap input[type="range"]{
  flex:1 1 auto;
  min-width:160px;
}
#screenSound .rg-poly-range-val{
  font-size:12px;
  opacity:0.8;
  min-width:40px;
  text-align:right;
}
#screenSound .rg-poly-check{
  display:flex;
  align-items:center;
  gap:8px;
}
#screenSound .rg-poly-sound-advanced{
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,0.07);
}
#screenSound .rg-poly-sound-advanced > summary{
  cursor:pointer;
  font-weight:650;
  opacity:0.9;
}
#screenSound .rg-poly-perbell-body{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
#screenSound .rg-poly-perbell-row{
  padding:10px 10px 8px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.09);
  background:rgba(0,0,0,0.10);
}
#screenSound .rg-poly-perbell-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
#screenSound .rg-poly-perbell-title{
  font-size:12px;
  font-weight:750;
  opacity:0.9;
}
#screenSound .rg-poly-perbell-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:flex-end;
}
#screenSound .rg-poly-perbell-group{
  min-width:220px;
}
#screenSound .rg-poly-perbell-group-head{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:650;
  margin-bottom:6px;
}
#screenSound .rg-poly-perbell-group-body{
  display:flex;
  flex-wrap:wrap;
  gap:8px 10px;
  align-items:flex-end;
}
#screenSound .rg-poly-perbell-group-body input[type="number"]{
  width:92px;
}
#screenSound .rg-poly-perbell-group-body .rg-poly-perbell-field{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:92px;
}
#screenSound .rg-poly-perbell-group-body .rg-poly-perbell-field-label{
  font-size:10px;
  line-height:1.1;
  opacity:0.85;
  font-weight:650;
  white-space:nowrap;
}
#screenSound .rg-poly-perbell-group-body select{
  min-width:150px;
}
#screenSound .rg-poly-perbell-group-body input[type="text"]{
  min-width:160px;
  width:200px;
  max-width:100%;
}



/* v019_p01_lead_overlay: Lead overlay UI (View) */
.lead-overlay-colors{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}


.lead-overlay-palette-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.lead-overlay-palette-label{
  font-size: 13px;
}

.lead-overlay-palette-select{
  min-width: 180px;
}

.lead-overlay-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}

.lead-overlay-label{
  min-width:56px;
  font-size:13px;
}

.lead-overlay-hex{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12px;
  min-width: 0;
}

.lead-overlay-actions{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

/* v019_p08_lead_range_editor: Lead overlay range editor UI */
.lead-overlay-info{
  font-size:12px;
}

.lead-overlay-note{
  font-size:12px;
  margin-top:6px;
}

.lead-overlay-field{
  display:flex;
  align-items:center;
  gap:6px;
}

.lead-overlay-field-label{
  font-size:12px;
}

.lead-overlay-num{
  width:88px;
}

.lead-overlay-mini{
  width:auto;
  padding:6px 10px;
}

.lead-overlay-mini--danger{
  width:auto;
  padding:6px 10px;
}


.control .lead-overlay-colors input[type="color"]{
  appearance:auto;
  -webkit-appearance:auto;
  background:transparent;
  border:none;
  padding:0;
  width:44px;
  height:28px;
}


/* v021_p04_poly_global_row_gating */
#screenSound .rg-poly-row-slots{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
#screenSound .rg-poly-row-slots .pill{
  width:auto;
  min-width:40px;
}

/* v022_p14_setup_method_input_pn_lh_and_default_live_bells_2: manual method input textareas */
#methodPnInput{min-height:96px}
#methodLhInput{min-height:54px}
