.piano-component {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.piano-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.piano-keys-scroll-wrapper {
  overflow-x: auto;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  width: 100%;
  justify-content: center;
}

.piano-keyboard {
  display: flex;
  position: relative;
  height: clamp(200px, 18vw, 260px);
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  margin: 0 auto;
  user-select: none;
  background-color: #0b0f17;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 2px solid #1e293b;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.piano-key {
  position: relative;
  cursor: pointer;
  transition: background-color 0.08s ease, transform 0.05s ease;
}

.piano-key.white-key {
  flex: 1 1 0;
  min-width: 28px;
  width: 0;
  height: 100%;
  background: linear-gradient(to bottom, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 0 0 5px 5px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 8px;
  color: #334155;
  box-sizing: border-box;
}

.piano-key.white-key:hover {
  background: linear-gradient(to bottom, #f8fafc 0%, #e2e8f0 100%);
}

.piano-key.white-key.active, .piano-key.white-key:active {
  background: linear-gradient(to bottom, #e2e8f0 0%, #bae6fd 100%);
  transform: translateY(2px);
  border-color: var(--accent-color);
}

.piano-key.black-key {
  flex: 0 0 auto;
  width: clamp(18px, 2.2vw, 32px);
  height: 60%;
  margin-left: calc(-0.5 * clamp(18px, 2.2vw, 32px));
  margin-right: calc(-0.5 * clamp(18px, 2.2vw, 32px));
  background: linear-gradient(to bottom, #1e293b 0%, #0f172a 100%);
  border: 1px solid #000000;
  border-radius: 0 0 4px 4px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 6px;
  color: #94a3b8;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.piano-key.black-key:hover {
  background: linear-gradient(to bottom, #334155 0%, #1e293b 100%);
}

.piano-key.black-key.active, .piano-key.black-key:active {
  background: linear-gradient(to bottom, #0369a1 0%, #0284c7 100%);
  transform: translateY(2px);
}

.key-note-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  pointer-events: none;
}

.key-shortcut-label {
  font-size: 0.65rem;
  opacity: 0.7;
  pointer-events: none;
}

.fretboard-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2.25rem;
  margin: 1rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.guitar-fretboard {
  width: 100%;
  min-width: 780px;
  height: clamp(190px, 16vw, 240px);
  background: linear-gradient(to bottom, #2b170e 0%, #3e2417 50%, #201008 100%); 
  border-radius: var(--radius-md);
  position: relative;
  border: 3px solid #1a0c06;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85), var(--shadow-md);
  display: flex;
  user-select: none;
  box-sizing: border-box;
}

.guitar-strings-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

.guitar-string-line {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.55; 
}

.guitar-string-line.string-1 {
  top: 12%;
  height: 1.2px;
  background: linear-gradient(to bottom, #e2e8f0, #94a3b8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.guitar-string-line.string-2 {
  top: 26.4%;
  height: 1.6px;
  background: linear-gradient(to bottom, #e2e8f0, #94a3b8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.guitar-string-line.string-3 {
  top: 40.8%;
  height: 2.2px;
  background: linear-gradient(to bottom, #cbd5e1, #64748b);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.guitar-string-line.string-4 {
  top: 55.2%;
  height: 2.8px;
  background: linear-gradient(to bottom, #cbd5e1, #64748b);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.guitar-string-line.string-5 {
  top: 69.6%;
  height: 3.4px;
  background: linear-gradient(to bottom, #cbd5e1, #475569);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.guitar-string-line.string-6 {
  top: 84%;
  height: 4.2px;
  background: linear-gradient(to bottom, #cbd5e1, #334155);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.fret-column {
  flex: 1;
  position: relative;
  height: 100%;
  border-right: 3px solid #cbd5e1; 
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.65);
}

.fret-column.nut-fret {
  flex: 0 0 54px;
  background: rgba(23, 13, 6, 0.4);
  border-right: 8px solid #fef3c7; 
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.7);
}

.fret-marker-dot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #f8fafc 0%, #cbd5e1 100%);
  opacity: 0.75;
  pointer-events: none;
  z-index: 5;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.fret-marker-dot.single-dot {
  width: 14px;
  height: 14px;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fret-marker-dot.double-dot-top {
  width: 12px;
  height: 12px;
  top: 33.6%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fret-marker-dot.double-dot-bottom {
  width: 12px;
  height: 12px;
  top: 62.4%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fret-num-label {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.guitar-fret-note-target {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30; 
}

.guitar-fret-note-target.target-string-1 { top: 12%; }
.guitar-fret-note-target.target-string-2 { top: 26.4%; }
.guitar-fret-note-target.target-string-3 { top: 40.8%; }
.guitar-fret-note-target.target-string-4 { top: 55.2%; }
.guitar-fret-note-target.target-string-5 { top: 69.6%; }
.guitar-fret-note-target.target-string-6 { top: 84%; }

.fret-note-bubble {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.fret-note-bubble.note-natural {
  background: #1e293b;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.5);
}

.fret-note-bubble.note-accidental {
  background: #0f172a;
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.25);
}

.fret-note-bubble.open-root {
  background: #1e293b;
  border-color: #f59e0b;
  color: #fef08a;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.guitar-fret-note-target:hover .fret-note-bubble {
  background-color: var(--accent-color) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.85);
  z-index: 35;
}

.guitar-fret-note-target.active .fret-note-bubble {
  background-color: #0284c7 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(2, 132, 199, 1);
  z-index: 35;
}

.guitar-fret-note-target.chord-active .fret-note-bubble {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.95);
  z-index: 35;
}

.guitar-fretboard.mode-natural .fret-note-bubble.note-accidental {
  opacity: 0.18;
  transform: scale(0.65);
}
.guitar-fretboard.mode-natural .guitar-fret-note-target:hover .fret-note-bubble.note-accidental,
.guitar-fretboard.mode-natural .guitar-fret-note-target.active .fret-note-bubble.note-accidental,
.guitar-fretboard.mode-natural .guitar-fret-note-target.chord-active .fret-note-bubble.note-accidental {
  opacity: 1;
  transform: scale(1.25);
}

.guitar-fretboard.mode-roots .fret-note-bubble:not(.open-root) {
  opacity: 0.15;
  transform: scale(0.65);
}
.guitar-fretboard.mode-roots .guitar-fret-note-target:hover .fret-note-bubble,
.guitar-fretboard.mode-roots .guitar-fret-note-target.active .fret-note-bubble,
.guitar-fretboard.mode-roots .guitar-fret-note-target.chord-active .fret-note-bubble {
  opacity: 1;
  transform: scale(1.25);
}

.guitar-fretboard.mode-hover .fret-note-bubble {
  opacity: 0;
  transform: scale(0.6);
}
.guitar-fretboard.mode-hover .guitar-fret-note-target:hover .fret-note-bubble,
.guitar-fretboard.mode-hover .guitar-fret-note-target.active .fret-note-bubble,
.guitar-fretboard.mode-hover .guitar-fret-note-target.chord-active .fret-note-bubble {
  opacity: 1;
  transform: scale(1.25);
}

.chord-strum-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5rem 0;
}

.chord-chip {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.chord-chip:hover {
  border-color: var(--accent-color);
  background: var(--accent-subtle);
  transform: translateY(-1px);
}

.drum-kit-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: clamp(380px, 35vw, 520px);
  margin: 0 auto;
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-inner);
  box-sizing: border-box;
}

.drum-pad {
  position: absolute;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: transform 0.05s ease, filter 0.05s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.drum-pad:active, .drum-pad.hit {
  transform: scale(0.96);
  filter: brightness(1.2);
}

.drum-pad-cymbal {
  background: radial-gradient(circle, #fde047 0%, #ca8a04 70%, #854d0e 100%);
  border: 2px solid #a16207;
}

.drum-pad-skin {
  background: radial-gradient(circle, #f8fafc 0%, #e2e8f0 70%, #94a3b8 100%);
  border: 6px solid #475569;
}

.drum-pad-bass {
  background: radial-gradient(circle, #1e293b 0%, #0f172a 80%, #020617 100%);
  border: 8px solid #334155;
  color: #f8fafc;
}

.drum-name {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.drum-key-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  margin-top: 2px;
}

.xylophone-frame {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: #2a1810;
  border: 4px solid #1a0f0a;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  box-sizing: border-box;
}

.xylophone-bars-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 14px);
  width: 100%;
  min-width: 680px;
  height: clamp(260px, 22vw, 320px);
  box-sizing: border-box;
}

.xylo-bar {
  flex: 1 1 0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px;
  user-select: none;
  transition: transform 0.06s ease, filter 0.06s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  position: relative;
}

.xylo-bar.wood-timber {
  background: linear-gradient(to right, #854d0e 0%, #a16207 30%, #713f12 100%);
  border: 1px solid #451a03;
  color: #fef3c7;
}

.xylo-bar:hover {
  filter: brightness(1.1);
}

.xylo-bar:active, .xylo-bar.active {
  transform: translateY(3px);
  filter: brightness(1.3);
}

.xylo-note-label {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.9rem;
}

.xylo-key-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.8;
}

.violin-stage {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.violin-position-header {
  width: 100%;
  min-width: 720px;
  height: 32px;
  position: relative;
  margin-bottom: 8px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
  box-sizing: border-box;
}

.violin-pos-label {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  top: 4px;
}

.violin-fingerboard {
  width: 100%;
  min-width: 720px;
  height: clamp(190px, 16vw, 240px);
  position: relative;
  background: linear-gradient(to bottom, #0d1017 0%, #1a2234 50%, #0d1017 100%); 
  border-radius: var(--radius-md);
  border: 3px solid #030712;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9), var(--shadow-md);
  user-select: none;
  box-sizing: border-box;
}

.violin-nut-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12%;
  width: 6px;
  background: #fef3c7; 
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.7);
  z-index: 15;
  pointer-events: none;
}

.violin-tape-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(254, 240, 138, 0.45); 
  box-shadow: 0 0 6px rgba(254, 240, 138, 0.3);
  z-index: 12;
  pointer-events: none;
}

.violin-tape-mark.tape-1 { left: 38%; }
.violin-tape-mark.tape-2 { left: 64%; }
.violin-tape-mark.tape-3 { left: 77%; }
.violin-tape-mark.tape-4 { left: 91%; }

.violin-strings-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

.violin-string-line {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  transform: translateY(-50%);
  opacity: 0.6;
  pointer-events: none;
}

.violin-string-line.string-1 {
  top: 18%;
  height: 1.2px;
  background: linear-gradient(to bottom, #f8fafc, #94a3b8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.violin-string-line.string-2 {
  top: 39%;
  height: 1.8px;
  background: linear-gradient(to bottom, #f1f5f9, #94a3b8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.violin-string-line.string-3 {
  top: 60%;
  height: 2.5px;
  background: linear-gradient(to bottom, #cbd5e1, #64748b);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.violin-string-line.string-4 {
  top: 82%;
  height: 3.4px;
  background: linear-gradient(to bottom, #cbd5e1, #475569);
  box-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.6);
}

.violin-note-target {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25; 
}

.violin-note-bubble {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.violin-note-bubble.note-natural {
  background: #1e293b;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.5);
}

.violin-note-bubble.note-accidental {
  background: #0f172a;
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.25);
}

.violin-note-bubble.open-root {
  background: #1e293b;
  border-color: #f59e0b;
  color: #fef08a;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.45);
}

.violin-note-target:hover .violin-note-bubble {
  background-color: var(--accent-color) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  transform: scale(1.22);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.85);
  z-index: 35;
}

.violin-note-target.active .violin-note-bubble {
  background-color: #0284c7 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  transform: scale(1.28);
  box-shadow: 0 0 12px rgba(2, 132, 199, 1);
  z-index: 35;
}

.btn-drone-active {
  background-color: var(--accent-color) !important;
  color: #ffffff !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.6);
}

.metronome-visualizer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

.tempo-display-big {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.tempo-descriptor {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.beat-indicators-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.beat-led {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--meter-track);
  border: 2px solid var(--border-color);
  transition: all 0.05s ease;
}

.beat-led.active {
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
}

.beat-led.active.accented {
  background: var(--color-danger);
  box-shadow: 0 0 12px var(--color-danger);
}

.tempo-slider {
  width: 100%;
  max-width: 450px;
  height: 8px;
  border-radius: 4px;
  background: var(--meter-track);
  outline: none;
  -webkit-appearance: none;
  margin: 1rem 0;
}

.tempo-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--bg-surface);
}

.circle-fifths-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
}

#circle-svg-canvas {
  width: 100%;
  max-width: 440px;
  height: auto;
  user-select: none;
}

.circle-key-sector {
  cursor: pointer;
  transition: all 0.15s ease;
}

.circle-key-sector:hover {
  filter: brightness(1.15);
}

.circle-key-sector.selected {
  stroke: var(--accent-color);
  stroke-width: 3px;
}

.key-chords-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.chord-degree-card {
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.chord-degree-card .deg-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.chord-degree-card .deg-chord {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

.workbench-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  flex-wrap: wrap;
}

.instrument-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.inst-rec-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.studio-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated, #162032);
  border: 1px solid var(--border-color, #2a3a52);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.studio-tool-btn:hover {
  color: var(--text-primary, #ffffff);
  border-color: var(--border-strong, #3e5270);
  background: var(--bg-surface-hover, #1d2b42);
}

.studio-tool-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.studio-tool-btn.btn-record {
  border-color: #4a2226;
  background: #1b1216;
  color: #fca5a5;
}

.studio-tool-btn.btn-record:hover {
  background: #27141b;
  border-color: #ef4444;
  color: #fee2e2;
}

.studio-tool-btn.btn-record .rec-led-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  display: inline-block;
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
  transition: all 0.2s ease;
}

.studio-tool-btn.btn-record.is-recording {
  background: #3b1116 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.studio-tool-btn.btn-record.is-recording .rec-led-dot {
  background-color: #ff2a2a;
  animation: recPulse 1.2s infinite ease-in-out;
}

.studio-tool-btn.btn-record .rec-timer {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ff7676;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

@keyframes recPulse {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px #ff2a2a; }
  50% { transform: scale(1.35); opacity: 0.4; box-shadow: 0 0 14px #ff2a2a; }
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px #ff2a2a; }
}

.studio-tool-btn.btn-download {
  background: #0d2319;
  border-color: #1a4d34;
  color: #86efac;
  animation: fadeInPop 0.25s ease-out;
}

.studio-tool-btn.btn-download:hover {
  background: #123324;
  border-color: #22c55e;
  color: #bbf7d0;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

@keyframes fadeInPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.studio-tool-btn.btn-fullscreen.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-color, #38bdf8);
  color: var(--accent-color, #38bdf8);
}

.workbench-card:fullscreen,
.workbench-card:-webkit-full-screen,
.workbench-card.is-fullscreen,
.workbench-card.is-fallback-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background: #070a12 !important;
  z-index: 99999 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 1rem 2rem !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.workbench-card.force-landscape {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100vh !important;
  width: 100dvh !important;
  height: 100vw !important;
  height: 100dvw !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background: #070a12 !important;
  z-index: 999999 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: max(0.25rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.25rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  transform-origin: 0 0 !important;
  transform: rotate(90deg) translateY(-100%) !important;
}

@media (orientation: landscape) {
  .workbench-card.force-landscape {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    transform: none !important;
    padding: max(0.25rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.25rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)) !important;
  }
}

body.inst-fullscreen-active {
  overflow: hidden !important;
  touch-action: none !important;
}

.workbench-card.is-fullscreen .workbench-status,
.workbench-card:fullscreen .workbench-status,
.workbench-card.force-landscape .workbench-status,
.workbench-card.is-fullscreen .control-bar,
.workbench-card:fullscreen .control-bar,
.workbench-card.force-landscape .control-bar,
.workbench-card.is-fullscreen .piano-controls-bar,
.workbench-card:fullscreen .piano-controls-bar,
.workbench-card.force-landscape .piano-controls-bar,
.workbench-card.is-fullscreen .piano-keymap-legend,
.workbench-card:fullscreen .piano-keymap-legend,
.workbench-card.force-landscape .piano-keymap-legend,
.workbench-card.is-fullscreen .guitar-chord-deck,
.workbench-card:fullscreen .guitar-chord-deck,
.workbench-card.force-landscape .guitar-chord-deck,
.workbench-card.is-fullscreen .guitar-fret-feedback,
.workbench-card:fullscreen .guitar-fret-feedback,
.workbench-card.force-landscape .guitar-fret-feedback,
.workbench-card.is-fullscreen .violin-fret-feedback,
.workbench-card:fullscreen .violin-fret-feedback,
.workbench-card.force-landscape .violin-fret-feedback,
.workbench-card.is-fullscreen #xylo-guide-banner,
.workbench-card:fullscreen #xylo-guide-banner,
.workbench-card.force-landscape #xylo-guide-banner,
.workbench-card.is-fullscreen .xylo-keymap-legend,
.workbench-card:fullscreen .xylo-keymap-legend,
.workbench-card.force-landscape .xylo-keymap-legend,
.workbench-card.is-fullscreen .drums-keymap-legend,
.workbench-card:fullscreen .drums-keymap-legend,
.workbench-card.force-landscape .drums-keymap-legend,
.workbench-card.is-fullscreen .fret-feedback,
.workbench-card:fullscreen .fret-feedback,
.workbench-card.force-landscape .fret-feedback {
  display: none !important;
}

.workbench-card.is-fullscreen .workbench-header,
.workbench-card:fullscreen .workbench-header,
.workbench-card.force-landscape .workbench-header {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  width: 100% !important;
  height: 36px !important;
  min-height: 36px !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  z-index: 1000000 !important;
}

.workbench-card.is-fullscreen .workbench-header-top,
.workbench-card:fullscreen .workbench-header-top,
.workbench-card.force-landscape .workbench-header-top {
  width: 100% !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

.workbench-card.is-fullscreen .piano-keys-scroll-wrapper,
.workbench-card:fullscreen .piano-keys-scroll-wrapper,
.workbench-card.force-landscape .piano-keys-scroll-wrapper {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto 0 !important;
  padding: 0 0 10px 0 !important;
  overflow: hidden !important;
}

.workbench-card.is-fullscreen .piano-keyboard,
.workbench-card:fullscreen .piano-keyboard {
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(240px, 56vh, 420px) !important;
}

.workbench-card.is-fullscreen .fretboard-container,
.workbench-card:fullscreen .fretboard-container,
.workbench-card.force-landscape .fretboard-container {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.workbench-card.is-fullscreen .guitar-fretboard,
.workbench-card:fullscreen .guitar-fretboard {
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(320px, 68vh, 520px) !important;
  margin: auto 0 !important;
}

.workbench-card.is-fullscreen .violin-stage,
.workbench-card:fullscreen .violin-stage {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto 0 !important;
  height: clamp(320px, 68vh, 520px) !important;
}

.workbench-card.is-fullscreen .xylophone-frame,
.workbench-card:fullscreen .xylophone-frame {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto 0 !important;
  height: clamp(380px, 78vh, 600px) !important;
}

.workbench-card.is-fullscreen .xylo-bar,
.workbench-card:fullscreen .xylo-bar,
.workbench-card.force-landscape .xylo-bar {
  max-height: 96% !important;
}

.workbench-card.is-fullscreen .drum-kit-stage,
.workbench-card:fullscreen .drum-kit-stage {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(540px, 84vh, 880px) !important;
  margin: auto 0 !important;
}

@media (max-height: 600px) {
  .workbench-card:fullscreen,
  .workbench-card:-webkit-full-screen,
  .workbench-card.is-fullscreen,
  .workbench-card.is-fallback-fullscreen {
    padding: max(0.25rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.25rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)) !important;
  }
  .workbench-card.is-fullscreen .piano-keyboard,
  .workbench-card:fullscreen .piano-keyboard {
    height: calc(100% - 24px) !important;
    max-height: calc(100% - 24px) !important;
    min-height: 0 !important;
  }
  .workbench-card.is-fullscreen .guitar-fretboard,
  .workbench-card:fullscreen .guitar-fretboard {
    height: 100% !important;
    max-height: calc(100% - 10px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }
  .workbench-card.is-fullscreen .violin-stage,
  .workbench-card:fullscreen .violin-stage {
    height: 100% !important;
    max-height: calc(100% - 10px) !important;
    min-height: 0 !important;
  }
  .workbench-card.is-fullscreen .xylophone-frame,
  .workbench-card:fullscreen .xylophone-frame {
    height: 100% !important;
    max-height: calc(100% - 10px) !important;
    min-height: 0 !important;
  }
  .workbench-card.is-fullscreen .drum-kit-stage,
  .workbench-card:fullscreen .drum-kit-stage {
    height: 100% !important;
    max-height: calc(100% - 10px) !important;
    min-height: 0 !important;
  }
}

.workbench-card.force-landscape .piano-keyboard {
  height: calc(100% - 24px) !important;
  max-height: calc(100% - 24px) !important;
  min-height: 0 !important;
}

.workbench-card.force-landscape .guitar-fretboard {
  height: 100% !important;
  max-height: calc(100% - 10px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

.workbench-card.force-landscape .violin-stage {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto 0 !important;
  height: 100% !important;
  max-height: calc(100% - 10px) !important;
  min-height: 0 !important;
}

.workbench-card.force-landscape .xylophone-frame {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto 0 !important;
  height: 100% !important;
  max-height: calc(100% - 10px) !important;
  min-height: 0 !important;
}

.workbench-card.force-landscape .drum-kit-stage {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: calc(100% - 10px) !important;
  min-height: 0 !important;
  margin: auto 0 !important;
}

.workbench-card.is-fullscreen .piano-key.white-key,
.workbench-card:fullscreen .piano-key.white-key,
.workbench-card.force-landscape .piano-key.white-key {
  padding-bottom: 12px !important;
}

.workbench-card.is-fullscreen .piano-key.black-key,
.workbench-card:fullscreen .piano-key.black-key,
.workbench-card.force-landscape .piano-key.black-key {
  padding-bottom: 8px !important;
}

.workbench-card.is-fullscreen .key-note-label,
.workbench-card:fullscreen .key-note-label,
.workbench-card.force-landscape .key-note-label {
  font-size: clamp(0.72rem, 1.1vw, 0.88rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  margin-bottom: 2px !important;
}

.workbench-card.is-fullscreen .key-shortcut-label,
.workbench-card:fullscreen .key-shortcut-label,
.workbench-card.force-landscape .key-shortcut-label {
  font-size: clamp(0.62rem, 0.9vw, 0.74rem) !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  opacity: 0.85 !important;
}
