/* SOLFÈGE STUDIO — screens/panels/buttons come from ../play/style.css */
.hidden { display: none !important; }
:root {
  --s-do: #ff4b4b; --s-re: #ff9a2e; --s-mi: #ffd93b; --s-fa: #39d66a;
  --s-sol: #2ec4d6; --s-la: #5b7cfa; --s-ti: #c55bf0;
}
.studio.screen.active { gap: 16px; }

/* control deck: four equal controls, label on top */
.st-deck { width: min(520px, 100%); box-sizing: border-box; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 12px; border: 1px solid rgba(0,240,255,.18); background: rgba(0,240,255,.03); }
.st-ctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-lbl { color: var(--dim); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; text-align: left; display: flex; justify-content: space-between; }
.st-lbl b { color: var(--neon); font-weight: normal; text-shadow: 0 0 6px var(--neon); }
.st-ctl select { appearance: none; -webkit-appearance: none; width: 100%; height: 38px; box-sizing: border-box;
  background: #0a0d16 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2300f0ff' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--neon); border: 1px solid #2a3550; font: inherit; font-size: 13px; letter-spacing: 1px; padding: 0 26px 0 10px; cursor: pointer; }
.st-ctl select:hover, .st-ctl select:focus { border-color: var(--neon); outline: none; box-shadow: 0 0 10px rgba(0,240,255,.25); }
.st-ctl input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 38px; background: transparent; margin: 0; cursor: pointer; }
.st-ctl input[type=range]::-webkit-slider-runnable-track { height: 4px; background: #2a3550; border-radius: 2px; }
.st-ctl input[type=range]::-moz-range-track { height: 4px; background: #2a3550; border-radius: 2px; }
.st-ctl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
  background: var(--neon); box-shadow: 0 0 10px var(--neon); border: none; }
.st-ctl input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); border: none; }
@media (max-width: 520px) { .st-deck { grid-template-columns: repeat(2, 1fr); } }

/* the pads: high Do at the top, low Do at the bottom (signed high = sung high) */
.st-pads { width: min(520px, 100%); display: flex; flex-direction: column; gap: 6px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.st-pad { --c: #fff; position: relative; display: grid; grid-template-columns: 30px 130px 1fr; align-items: center; gap: 10px;
  height: 64px; padding: 0 14px; background: #0a0d16; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  font-family: var(--font); color: inherit; cursor: pointer; transition: transform .06s, background .1s, box-shadow .1s; touch-action: none; }
.st-pad .k { color: var(--dim); font-size: 12px; text-align: center; }
.st-pad .hand { display: block; }
.st-pad .ink { display: block; height: 62px; width: 130px; background: #cfe7ff;
  -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat; }
.st-pad .hand { filter: drop-shadow(0 0 3px rgba(0,240,255,.45)); }
.st-pad .syl { font-size: 30px; font-weight: 900; letter-spacing: 1px; color: var(--c); text-shadow: 0 0 8px var(--c); text-align: left; }
.st-pad .note { position: absolute; right: 14px; color: var(--dim); font-size: 12px; letter-spacing: 1px; }
.st-pad.on { background: color-mix(in srgb, var(--c) 22%, #0a0d16); transform: scale(1.02); box-shadow: 0 0 22px var(--c); }
.st-pad.on .ink { background: var(--c); }
.st-pad.next { box-shadow: 0 0 0 3px var(--gold), 0 0 22px var(--gold); animation: st-pulse .9s ease-in-out infinite; }
@keyframes st-pulse { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 6px var(--gold); } }
.st-now { color: var(--dim); letter-spacing: 1px; font-size: 13px; min-height: 1.4em; margin: 0; text-align: center; }
.st-now b { color: var(--gold); }

.st-panel { width: min(520px, 100%); box-sizing: border-box; }
.st-songs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; }
.st-songs .inst { padding: 10px 6px; }
.st-songctl, .st-rec { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.st-songctl .btn-big { font-size: 16px; padding: 12px 22px; }
.st-tape .r { color: #ff3b5c; }
@keyframes st-pulse-red { 50% { opacity: .55; } }
@media (max-width: 420px) {
  .st-pad { grid-template-columns: 20px 104px 1fr; height: 58px; padding: 0 10px; gap: 8px; }
  .st-pad .ink { width: 104px; height: 56px; }
  .st-pad .syl { font-size: 26px; }
}
.st-ctl input[type=range]:focus { outline: none; }
.st-ctl input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(0,240,255,.35), 0 0 12px var(--neon); }

/* record bar: right under the controls */
.st-recbar { width: min(520px, 100%); box-sizing: border-box; display: flex; align-items: center; gap: 8px; margin-top: -16px;
  padding: 8px 12px; border: 1px solid rgba(0,240,255,.18); border-top: none; background: rgba(0,240,255,.03); }
.st-rb { height: 34px; padding: 0 12px; background: #0a0d16; border: 1px solid #2a3550; color: var(--neon); font: inherit; font-size: 12px;
  letter-spacing: 2px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.st-rb:hover:not(:disabled) { border-color: var(--neon); box-shadow: 0 0 10px rgba(0,240,255,.25); }
.st-rb:disabled { opacity: .35; cursor: default; }
.st-rb .dot { width: 10px; height: 10px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 6px #ff3b5c; display: inline-block; }
#rec-btn { color: #ff8a9c; }
#rec-btn.rec { border-color: #ff3b5c; color: #ff3b5c; animation: st-pulse-red 1s infinite; }
.st-tape { flex: 1; min-width: 0; text-align: right; color: var(--dim); font-size: 11px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tape .r { color: #ff3b5c; }
@media (max-width: 420px) { .st-rb { padding: 0 9px; letter-spacing: 1px; } }

/* shared-tune banner */
.st-shared { width: min(520px, 100%); box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px; border: 1px solid var(--gold); box-shadow: 0 0 18px rgba(255,207,58,.3); color: var(--gold); letter-spacing: 1px; text-align: center; }
.st-shared .btn-big { font-size: 16px; padding: 12px 28px; }
@media (max-width: 420px) { .st-recbar { flex-wrap: wrap; } .st-tape { flex-basis: 100%; text-align: center; } }

/* shared-tune banner */
.st-shared { width: min(520px, 100%); box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px; border: 1px solid var(--gold); box-shadow: 0 0 18px rgba(255,207,58,.3); color: var(--gold); letter-spacing: 1px; text-align: center; }
.st-shared .btn-big { font-size: 16px; padding: 12px 28px; }
@media (max-width: 420px) { .st-recbar { flex-wrap: wrap; } .st-tape { flex-basis: 100%; text-align: center; } }

/* name your tune (before sharing) */
.st-namerow { width: min(520px, 100%); box-sizing: border-box; margin-top: -16px; padding: 10px 12px; border: 1px solid var(--gold);
  border-top: none; background: rgba(255,207,58,.05); display: flex; flex-direction: column; gap: 6px; }
.st-namerow label { color: var(--gold); font-size: 10px; letter-spacing: 2px; }
.st-namewrap { display: flex; gap: 6px; }
.st-namewrap input { flex: 1; min-width: 0; height: 34px; box-sizing: border-box; background: #0a0d16; border: 1px solid #2a3550; color: #e8f4ff;
  font: inherit; font-size: 14px; letter-spacing: 1px; padding: 0 10px; }
.st-namewrap input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 10px rgba(255,207,58,.3); }
.st-nameerr { color: #ff8a9c; font-size: 11px; letter-spacing: 1px; min-height: 1em; }

.st-kicker { margin: 0 0 -14px; color: var(--gold); letter-spacing: 8px; font-size: 13px; text-shadow: 0 0 8px var(--gold); }

/* count-in */
.st-padwrap { position: relative; width: min(520px, 100%); display: flex; flex-direction: column; align-items: stretch; }
.st-count { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font-size: 160px; font-weight: 900; color: var(--gold); text-shadow: 0 0 30px var(--gold), 0 0 60px rgba(255,207,58,.5); background: rgba(5,6,10,.35); }
#layer-btn.rec { border-color: #ff3b5c; color: #ff3b5c; animation: st-pulse-red 1s infinite; }
.st-classbtn { align-self: flex-end; margin-bottom: 6px; background: none; border: 1px solid #2a3550; color: var(--dim); font: inherit; font-size: 11px;
  letter-spacing: 2px; padding: 5px 10px; cursor: pointer; }
.st-classbtn:hover { color: var(--neon); border-color: var(--neon); }

/* stars on songs + after YOUR TURN */
.st-songs .inst .stars { display: block; color: var(--gold); font-size: 11px; letter-spacing: 2px; margin-top: 3px; min-height: 1em; }
.st-starline { color: var(--gold); letter-spacing: 3px; text-shadow: 0 0 8px var(--gold); }

/* my tunes */
.st-tunes { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.st-tunes li { display: grid; grid-template-columns: 38px 1fr 32px 32px; align-items: center; gap: 8px; padding: 6px 8px;
  background: #0a0d16; border: 1px solid #2a3550; cursor: pointer; text-align: left; }
.st-tunes li.cur { border-color: var(--gold); box-shadow: 0 0 10px rgba(255,207,58,.25); }
.st-tunes li:hover { border-color: var(--neon); }
.st-tunes button { background: none; border: 1px solid #2a3550; color: var(--neon); height: 30px; cursor: pointer; font: inherit; }
.st-tunes .tu-play { color: var(--green); border-color: var(--green); }
.st-tunes .tu-del { color: #ff8a9c; }
.tu-name { color: #e8f4ff; font-size: 13px; letter-spacing: .5px; min-width: 0; overflow: hidden; }
.tu-name small { display: block; color: var(--dim); font-size: 10px; letter-spacing: 1px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tu-input { width: 100%; box-sizing: border-box; background: #05060a; border: 1px solid var(--gold); color: #e8f4ff; font: inherit; padding: 4px 6px; }

/* first-time guide */
.st-guide { width: min(520px, 100%); box-sizing: border-box; padding: 16px 18px; border: 1px solid var(--gold); background: rgba(255,207,58,.05);
  box-shadow: 0 0 18px rgba(255,207,58,.2); text-align: left; color: #e8f4ff; font-size: 13px; line-height: 1.55; letter-spacing: .5px; }
.st-guide-hi { margin: 0 0 6px; color: var(--gold); font-size: 15px; letter-spacing: 1px; }
.st-guide ol { margin: 0 0 12px; padding-left: 20px; }
.st-guide li { margin: 6px 0; }
.st-guide b { color: var(--gold); font-weight: normal; }
.st-guide .btn { display: block; margin: 0 auto; }

/* class mode: giant pads only, with a slim song bar */
.st-cmbar { display: none; }
body.classmode #crt { overflow: hidden; }
body.classmode .studio > :not(.st-padwrap):not(.st-cmbar) { display: none !important; }
body.classmode .studio.screen.active { padding: 8px; gap: 8px; width: 100vw; max-width: none; }
body.classmode .st-padwrap { width: 100%; }
body.classmode .st-classbtn { display: none; }
body.classmode .st-pads { width: 100%; height: calc(100vh - 80px); gap: 6px; }
body.classmode .st-pad { height: auto; flex: 1; grid-template-columns: 40px minmax(120px, 28%) 1fr; }
body.classmode .st-pad .ink { width: 100%; height: calc((100vh - 80px) / 8 - 10px); }
body.classmode .st-pad .syl { font-size: clamp(32px, 7vh, 72px); }
body.classmode .st-pad .note { font-size: 16px; }
body.classmode .st-cmbar { display: flex; gap: 8px; justify-content: center; align-items: center; height: 52px; }
body.classmode .st-cmbar select { height: 34px; background: #0a0d16; color: var(--neon); border: 1px solid #2a3550; font: inherit; padding: 0 8px; }
body.classmode .feedback-bar, body.classmode #br-feedback-bar, body.classmode .br-fbbar { display: none !important; }
.st-submit { align-self: flex-start; color: var(--gold); border-color: rgba(255,207,58,.5); }
.st-submit:hover:not(:disabled) { border-color: var(--gold) !important; box-shadow: 0 0 10px rgba(255,207,58,.3) !important; }
.st-nameerr .ok { color: var(--green); }

/* voice controller bar */
.st-voicebar { width: min(520px, 100%); box-sizing: border-box; display: flex; align-items: center; gap: 8px; margin-top: -16px; flex-wrap: wrap;
  padding: 8px 12px; border: 1px solid rgba(0,240,255,.18); border-top: none; background: rgba(0,240,255,.03); }
#vc-btn.on { border-color: var(--green); color: var(--green); box-shadow: 0 0 10px rgba(57,255,136,.35); }
.st-meter { width: 60px; height: 8px; background: #141a2a; border: 1px solid #2a3550; position: relative; overflow: hidden; }
.st-meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--green); box-shadow: 0 0 6px var(--green); transition: width .05s; }
.st-vchint { flex: 1; min-width: 140px; color: var(--dim); font-size: 11px; letter-spacing: 1px; line-height: 1.4; }
.st-vchint b { color: var(--c, var(--gold)); text-shadow: 0 0 6px var(--c, var(--gold)); font-size: 15px; }
.st-pad.sung { box-shadow: 0 0 0 2px var(--c), 0 0 24px var(--c); }
body.classmode .st-voicebar { display: none !important; }

/* layer lanes (mini piano-roll per layer, scrolling together) */
.st-lanes { width: min(520px, 100%); box-sizing: border-box; margin-top: -16px; padding: 8px 12px 10px; border: 1px solid rgba(0,240,255,.18);
  border-top: none; background: rgba(0,240,255,.03); }
.st-lanes-scroll { position: relative; overflow-x: auto; overflow-y: hidden; display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px;
  scrollbar-color: #2a3550 transparent; }
.lane { position: relative; height: 90px; flex: none; min-width: 100%; text-align: left; border: 1px solid #1d2640; background-color: #070a12;
  background-image: linear-gradient(to right, rgba(0,240,255,.08) 1px, transparent 1px); }
.lane.muted .nb { opacity: .18; filter: grayscale(1); }
.lane-head { position: sticky; left: 0; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 6px;
  background: rgba(5,6,10,.85); border-right: 1px solid #1d2640; border-bottom: 1px solid #1d2640; color: var(--dim); font-size: 10px; letter-spacing: 1px; }
.lane-head b { color: var(--neon); font-weight: normal; }
.lane-head button { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 11px; padding: 0 2px; }
.lane-head .ln-del:hover { color: #ff6b6b; }
.nb { position: absolute; height: 6px; border-radius: 3px; background: var(--c); box-shadow: 0 0 6px var(--c); font-style: normal;
  font-size: 8px; line-height: 6px; color: #05060a; font-weight: 900; overflow: hidden; padding-left: 2px; box-sizing: border-box; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); box-shadow: 0 0 8px var(--gold); z-index: 3; pointer-events: none; }
.st-lanes-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; color: var(--dim); font-size: 10px; letter-spacing: 1px; }
body.classmode .st-lanes { display: none !important; }
.lane-head .ln-nudge { color: var(--neon); font-size: 9px; }

/* saved box: link to the tune's own page + "submit to the playlist?" */
.st-savedrow { position: relative; width: min(520px, 100%); box-sizing: border-box; margin-top: -16px; padding: 12px 14px; border: 1px solid var(--green);
  border-top: none; background: rgba(57,255,136,.05); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.st-savedx { position: absolute; top: 6px; right: 8px; background: none; border: none; color: var(--dim); cursor: pointer; font-size: 13px; }
.st-saved-hi { margin: 0; color: var(--green); font-size: 13px; letter-spacing: 1px; }
.st-saved-link { color: var(--gold); font-size: 15px; letter-spacing: .5px; word-break: break-all; text-shadow: 0 0 8px rgba(255,207,58,.4); }
.st-saved-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-saved-audio { color: var(--dim); font-size: 11px; letter-spacing: 1px; margin-left: auto; }
.st-saved-ask { border-top: 1px dashed #2a3550; padding-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-saved-ask p { margin: 0; flex-basis: 100%; color: #e8f4ff; font-size: 13px; }
.st-saved-ask a { color: var(--neon); }
.st-saved-msg { margin: 0; color: var(--green); font-size: 12px; line-height: 1.5; min-height: 0; }
.st-saved-msg:empty { display: none; }
.st-plhead { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.st-plhead a { color: var(--neon); font-size: 11px; letter-spacing: 1px; text-decoration: none; }
body.classmode .st-savedrow { display: none !important; }
