@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
*,*::before,*::after{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins',sans-serif;
}
button{
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}
html,body{min-height: 100vh;}
body{
    background: #F4F1EB;
    color: #1A1714;
    font-family: 'DM Sans',system-ui,sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing:antialised;
    overflow-x: hidden;
}
#disco-canvas{
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity .6s;
}
#disco-canvas.on{
    opacity: 1;
}

#root{
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 960px;
    margin: 0 auto;
    padding: 36px 28px 48px;
    gap: 28px;
}

.hd{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.logo-name{
    font-family: 'Cormorant Garamond',serif;
    font-size: 38px;
    font-weight: 600;
    letter-spacing: -1.5px;
    line-height: 1;
    color:#1A1714;
}

.logo-name em{
    font-style: italic;
    color: #22C55E;
}
.logo-sub{
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #A8A29C ;
    margin-top: 5px;
}

.hd-controls{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 4px;
}

.toggle-wrap{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.toggle-label{
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #A8A29C;
    font-family: 'DM Sans',sans-serif;
}

.toggle-track{
    position: relative;
    width: 48px;
    height: 26px;
    background:#EAE6DC;
    border-radius: 14px;
    border: 1.5px solid #C5C0B5;
    cursor: pointer;
    transition: background .22s,border-color .22s;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.10), inset -1px -1px 3px rgba(255,255,255,0.8);
}
.toggle-track::after{
    content: '';
    position: absolute;
    top: 3px;
    left:3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.20);
    transition: transform .22s cubic-bezier(.34,1.56,.64,1),
    background .22s;
}

.toggle-track.on{
    background:#22C55E;
    border-color: #16A34A;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.12), 0 0 0 3px rgba(34,197,94,0.15);
}

.toggle-track.on::after{
    transform: translateX(22px);
    background: #fff; 
}

.toggle-track.disco-on{
    border-color: #9333EA;
    animation: disco-track .5s infinite alternate;
}

.toggle-track.disco-on::after{
    transform: translateX(22px);
}

@keyframes disco-track{
    0%{
       background: #F43F5E;
       box-shadow: inset 1px 1px 3px rgba(0,0,0,.12), 0 0 0 3px rgba(244,63,94,.2); 
    }
    25%{
        background: #F97316;
        box-shadow: inset 1px 1px 3px rgba(0,0,0,.12), 0 0 0 3px rgba(249,115,22,.2);
    }
     50%{
        background: #A855F7;
        box-shadow: inset 1px 1px 3px rgba(0,0,0,.12), 0 0 0 3px rgba(168,85,247,.2);
    }
     75%{
        background: #3B82F6;
        box-shadow: inset 1px 1px 3px rgba(0,0,0,.12), 0 0 0 3px rgba(59,130,246,.2);
    }
    100%{
        background: #10B981; 
        box-shadow: inset 1px 1px 3px rgba(0,0,0,.12), 0 0 0 3px rgba(16,185,129,.2);
    }
}

.vol-wrap{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.vol-label{
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #A8A29C;
}
.vol-row{
    display: flex;
    align-items: center;
    gap: 8px;
}
.vol-icon{
    width: 14px;
    height: 14px;
    opacity: 0.45;
    flex-shrink: 0;
}

input[type=range]{
  -webkit-appearance: none;
   appearance: none;
   width: 88px;
   height: 4px;
   border-radius: 4px;
   background: linear-gradient(to right, #22C55E 0%, #22C55E var(--pct, 80%), #C5C0B5 var(--pct, 80%));
   outline: none;
   cursor: pointer;
   box-shadow: inset 1px 1px 3px rgba(0,0,0,.10);
}

input[type=range]::-webkit-slider-thumb{
  -webkit-appearance: none; 
  width: 18px; 
  height: 18px; 
  border-radius: 50%;
  background: #FDFCF9;
  border: 2px solid #C5C0B5;
  box-shadow: 2px 2px 5px rgba(0,0,0,.18), -1px -1px 3px rgba(255,255,255,.9);
  transition: border-color .15s, box-shadow .15s;
}
input[type=range]:hover::-webkit-slider-thumb{
  border-color: #22C55E;
  box-shadow: 2px 2px 5px rgba(0,0,0,.18), -1px -1px 3px rgba(255,255,255,.9), 0 0 0 3px rgba(34,197,94,.18);
}
.vol-val{
    font-size: 10px;
    font-weight: 600;
    font-family: 'Courier New',monospace;
    color: #6B6660;
    min-width: 26px;
    text-align: right;
}

.piano-card{
    background: #FDFCF9;
    border: 1px solid #DDD8CE;
    border-radius: 26px;
    padding: 28px 28px 40px;
    position: relative;
    box-shadow: 6px 6px 18px rgba(180,174,162,.55), -3px -3px 10px rgba(255,255,255,.85), inset 0 1px 0 rgba(255,255,255,.85);
    overflow: visible;
}

.piano-card::before{
    content: '';
    position: absolute;
    top: -13px;
    left: 5%;
    right: 5%;
    height: 13px;
    background: linear-gradient(180deg, #C9A96E 0%, #A8844A 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -3px 10px rgba(0,0,0,.18),0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.25),inset 0 -1px 0 rgba(0,0,0,.2);
}
.piano-brand{
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px; 
  font-weight: 600; 
  letter-spacing: 7px;
  text-transform: uppercase; 
  color: #A8A29C;
  text-align: center; 
  margin-bottom: 18px;
  display: block;
  background: linear-gradient(135deg,#C9912E 0%,#8B6120 50%,#C9912E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.keys-wrap{
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
    padding-top: 8px;
    user-select: none;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg,#2C2520 0%,#1E1A16 50%,#161210 100%);
    border-radius: 0 0 14px 14px;
    box-shadow: inset 0 5px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(0,0,0,.5);
    border-left: 1px solid rgba(0,0,0,.3);
    border-right: 1px solid rgba(0,0,0,.3);
    border-bottom: 2px solid rgba(0,0,0,.35);
}

.keys-inner{
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 6px;
    width: 100%;
}
.key{
    position: relative;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    transition: transform 0.07s ease, filter 0.07s ease;
    will-change: transform;
    flex-shrink: 0;
}

.key span{
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity 0.18s, color 0.18s;
    white-space: nowrap;
    font-family: 'DM Mono', monospace;
}

.key.hide-labels span{
    opacity: 0 ! important;
}
.piano-keys{
    display: flex;
    list-style: none;
    margin-top: 40px;
}

.key.white{
    width: 48px;
    height: 188px;
    z-index: 1;
    margin-right: 3px;
    background: linear-gradient(180deg,#FEFEFE 0%, #F8F5EE 70%, #F0ECE4 100%);
    border: 1px solid #D4D0C8;
    border-top: none;
    box-shadow: 2px 4px 0 #C8C4BC,
    4px 7px 12px rgba(0,0,0,.13),
    inset 0 -4px 0 rgba(0,0,0,.06),
    inset 0 1px 0 rgba(255,255,255,0.95);
}

.key.white span{
    color: #BDB8B0;
}

.key.white:hover{
    background: linear-gradient(180deg,#fff 0%, #FAF8F3 70%, #EDE9E1 100%);
    box-shadow:2px 4px 0 #C8C4BC,
    4px 9px 16px rgba(0,0,0,.16),
    inset 0 -4px 0 rgba(0,0,0,.06),
    inset 0 1px 0 rgba(255,255,255,0.95);
}

.key.white.pressed,.key.white.active{
    background: linear-gradient(180deg,#22C55E 0%, #1DAF53 100%) !important;
    transform: translateY(3px) scaleY(.985);
    transform-origin: top;
    box-shadow: 1px 1px 0 #17923F,
    2px 3px 6px rgba(0,0,0,.2),
    inset 0 3px 6px rgba(0,0,0,.15) !important;
}
.key.white.pressed span,
.key.white.active span{
    color: rgba(255,255,255,.75) !important; 
    opacity: 1 !important; 
}

.key.black{
    width: 32px;
    height: 116px;
    z-index: 2;
    margin-left: -18px;
    margin-right: -16px;
    background: linear-gradient(180deg, #2C3A48 0%,  #1E2832 40%, #141C24 100%);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 0 #0D1218,
    0 10px 18px rgba(0,0,0,.45),
    inset 0 2px 0 rgba(255,255,255,0.10),
    inset 0 -3px 0 rgba(0,0,0,.4);
}
.key.black span{
    color: rgba(255,255,255,.2);;
}

.key.black:hover {
  background: linear-gradient(180deg, #38495A 0%, #273545 40%, #1A2430 100%);
}

.key.black.pressed span,
.key.black.active span{
    color: rgba(255,255,255,0.6) !important;
    opacity: 1 !important;
}

.key::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: rgba(255,255,255,.3);
  transition: opacity .12s;
}

.key.pressed::after{
    opacity: 1;
}

.bottom{
    display: flex;
    flex-direction: column;
    gap: 14px;
}


.rec-bar{
    background: #FDFCF9;
    border: 1px solid #DDD8CE;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: 4px 4px 14px rgba(180,174,162,.55), -2px -2px 8px rgba(255,255,255,.85);
}

.rec-top{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px 12px;
    border-bottom: 1px solid #DDD8CE;
    background: #EAE6DC;
}

.reel{
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid #C5C0B5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FDFCF9;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,.10);
    position: relative;
    overflow: hidden;
}
.reel::before {
  content: '';
  position: absolute; inset: 5px; border-radius: 50%;
  background: #EAE6DC; border: 2px solid #DDD8CE;
}
.reel::after {
  content: '';
  position: absolute; inset: 10px; border-radius: 50%;
  background: #C5C0B5;
}

.reel.spinning::before{
    animation: spin 1.2s linear infinite;
}
@keyframes spin{to{transform: rotate(360deg);}}

.rec-status-group{
    flex: 1;
    min-width: 0;
}
.rec-status-line{
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1px;
}
.rec-led{
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #A8A29C;
    flex-shrink: 0;
    transition: background 0.2s;
    box-shadow: inset 0 1px 1px rgba(59,130,246,.5);
}

.rec-led.recording{
    background: #EF4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.2), inset 0 1px 1px rgba(255,255,255,0.4);
    animation: led-pulse 1s ease-in-out infinite;
}

.rec-led.done{
    background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.18),inset 0 1px 1px rgba(255,255,255,0.4);
}

@keyframes led-pulse { 0%,100%{opacity:1} 50%{opacity:.25} }

.rec-state-text{
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #6B6660;
}

.rec-clock{
    font-size: 10px;
    color: #A8A29C;
    font-weight: 400;
    margin-left: 2px;
    font-family: 'DM Sans',sans-serif;
    letter-spacing: 0.5px;
}

.rec-actions{
    display: flex;
    align-items: stretch;
    gap: 0;
}

.act{
    flex: 1;
    padding: 13px 8px;
    font-size: 10px; 
    font-weight: 600; 
    letter-spacing: 1px; 
    text-transform: uppercase;
    border: none; 
    border-right: 1px solid  #DDD8CE;
    background: #FDFCF9; 
    color: #6B6660;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 5px;
    transition: background .14s, color .14s;
    cursor: pointer; 
    position: relative; 
    overflow: hidden;
}

.act:last-child{
    border-right: none;
}
.act:disabled{
    opacity: 0.3;
    cursor: not-allowed;
}
.act:not(:disabled):hover{
    background: #EAE6DC;
    color: #1A1714;
}
.act:not(:disabled):active{
    background: #F4F1EB;
}

.act-icon{
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.14s;
}

.act-rec .act-icon{
    background: #FEF2F2; 
    border: 1.5px solid #FCA5A5; 
    color: #DC2626;
}
.act-play .act-icon{
    background: #F0FDF4; 
    border: 1.5px solid #86EFAC; 
    color: #16A34A;
}
.act-save .act-icon{
    background: #EFF6FF; 
    border: 1.5px solid #93C5FD; 
    color: #2563EB;
}
.act-rec:not(:disabled):hover .act-icon{
    background: #EF4444;
    border-color: #EF4444;
    color: #fff;
}
.act-play:not(:disabled):hover .act-icon{ 
    background: #22C55E; 
    border-color: #22C55E; 
    color: #fff; 
}
.act-save:not(:disabled):hover .act-icon{
    background: #3B82F6; 
    border-color: #3B82F6; 
    color: #fff;
}

.act-rec.on .act-icon{
    background: #EF4444; 
    border-color: #DC2626; 
    color: #fff;
}
.act-rec.on{
    color: #B91C1C;
}
.act-icon svg{
    width: 13px;
    height: 13px;
}

.pb-strip {
  width: 100%; 
  display: flex; 
  align-items: center; 
  gap: 10px;
  padding: 0 20px;
  overflow: hidden; 
  max-height: 0; 
  opacity: 0;
  transition: max-height .3s, opacity .25s, padding .3s;
  border-top: 0px solid #DDD8CE;
}
.pb-strip.on {
  max-height: 36px; 
  opacity: 1;
  padding: 10px 20px;
  border-top: 1px solid #DDD8CE;
}
.pb-rail{
    flex: 1;
    height: 3px;
    background: #EAE6DC;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,.08);
}
.pb-fill{
    height: 100%;
    background: #3B82F6;
    width: 0;
    border-radius: 3px;
    transition: width 0.08s linear;
}
.pb-t{
    font-size: 10px;
    font-family: 'Courier New',monospace;
    font-weight: 600;
    color: #A8A29C;
    white-space: nowrap;
}

.save-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 10px;
}

.saved-title {
  font-size: 11px; 
  font-weight: 500; 
  color: #6B6660;
  font-family: 'Cormorant Garamond', serif; 
  letter-spacing: .5px;
}

.clr-btn{
  font-size: 10px; 
  font-weight: 500; 
  color: #A8A29C;
  text-decoration: underline; 
  text-underline-offset: 3px;
  transition: color .15s;
}

.clr-btn:hover{
  color: #EF4444;
}
.recs-list{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty{
     text-align: center; 
    padding: 28px 20px; 
    border-radius: 16px;
    background: #FDFCF9; 
    border: 1px solid #DDD8CE;
    box-shadow: 2px 2px 8px rgba(180,174,162,.55), -1px -1px 4px rgba(255,255,255,.85);
}

.empty-icon{
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #EAE6DC;
    border: 1px solid #DDD8CE;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,.08);
}
.empty-icon svg{ 
    width: 16px; 
    height: 16px; 
    opacity: 0.4; 
}
.empty p {
    font-size: 13px;
    color: #6B6660;
    font-weight: 400;
    margin-bottom: 3px;
}
.empty span{
    font-size: 11px;
    color: #A8A29C;
}
.rec-item{
    background: #FDFCF9; 
    border: 1px solid #DDD8CE;
    border-radius: 16px; 
    padding: 13px 16px;
    display: flex; 
    align-items: center; 
    gap: 12px;
    transition: border-color .15s, box-shadow .15s;
    box-shadow: 2px 2px 8px rgba(180,174,162,.55), -1px -1px 4px rgba(255,255,255,.85);
}

.rec-item:hover{
    border-color: #C5C0B5;
}
.rec-item.playing{
    border-color: #3B82F6;
    background: #F8FBFF;
}
.rec-num{
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #EAE6DC;
    border: 1px solid #DDD8CE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #A8A29C;
    flex-shrink: 0;
    font-family: 'Courier New',monospace;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,.08);
}
.rec-info{
    flex: 1;
    min-width: 0;
}
.rec-name{
    font-size: 13px; 
    font-weight: 500; 
    color: #1A1714; 
    margin-bottom: 2px;
}

.rec-meta{ 
    font-size: 11px; 
    color: #A8A29C; 
}
.rec-btns{ 
    display: flex; 
    gap: 6px; 
}
.ri-btn{
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DDD8CE;
    background: #FDFCF9;
    color: #A8A29C;
    transition: all 0.13s;
    box-shadow: 1px 1px 4px rgba(180,174,162,.55), -1px -1px 2px rgba(255,255,255,.85);
}

.ri-btn svg{
    width: 13px;
    height: 13px;
}

.ri-btn:active{
    transform: scale(0.93);
    box-shadow: none;
}

.ri-play{
 color: #16A3A4;
 border-color: #86EFAC;
 background: #F0FDF4;
}
.ri-play:hover{
    background: #22C55E;
    border-color: #22C55E;
    color: #fff;
}

.ri-play.stop{
    background: #3B82F6;
    border-color: #2563EB;
    color: #fff;
}
.ri-del{
    color:#B91C1C;
    border-color: #FCA5A5;
    background: #FEF2F2;
}
.ri-del:hover{
    background: #EF4444;
    border-color: #EF4444;
    color: #fff;
}

footer{
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #DDD8CE;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hint-group{
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.hint-lbl{
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #A8A29C;
    margin-right: 4px;
}

.kbd{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    background: #FDFCF9;
    border: 1px solid #C5C0B5;
    border-bottom: 2.5px solid #C5C0B5;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
    font-family: 'Courier New',monospace;
    color: #6B6660;
    box-shadow: 1px 1px 3px rgba(180,174,162,.55);
}

#loader{
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #141210 0%, #1E1A16 50%, #0F0E0D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 28px;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

#loader.hidden{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo{
    font-family: 'Cormorant Garamond',serif;
    font-size: 52px;
    font-weight: 600;
    letter-spacing: -2px;
    color: #F0EDE6;
    line-height: 1;
}

.loader-logo em{
    font-style: italic;
    background: linear-gradient(135deg, #22C55E, #16A34A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
     background-clip: text;
}

.loader-sub{
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #F0BB55, #C08830, #F0BB55);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: -16px;
}

.loader-bars{
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 36px;
}

.loader-bars span{
    display: inline-block;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(to top, #22C55E, #86EFAC);
    animation: eqBar 0.9s ease-in-out infinite alternate;
}

.loader-bars span:nth-child(1){
    height: 12px;
    animation-duration: 0.7s;
}
.loader-bars span:nth-child(2){
  height: 28px;
  animation-delay: 0.1s;
  animation-duration: 0.9s;
}
.loader-bars span:nth-child(2){
  height: 28px;
  animation-delay: 0.1s;
  animation-duration: 0.9s;
}
.loader-bars span:nth-child(3){
  height: 36px;
  animation-delay: 0.2s;
  animation-duration: 0.6s;
}
.loader-bars span:nth-child(4){
  height: 22px;
  animation-delay: 0.05s;
  animation-duration: 0.8s;
}
.loader-bars span:nth-child(5){
  height: 18px;
  animation-delay: 0.15s;
  animation-duration: 1.0s;
}
.loader-bars span:nth-child(6){
  height: 30px;
  animation-delay: 0.25s;
  animation-duration: 0.75s;
}
.loader-bars span:nth-child(7){
  height: 14px;
  animation-delay: 0.08s;
  animation-duration: 0.65s;
}

@keyframes eqBar{
    from {
        transform: scaleY(0.2);
        opacity: 0.4;
    }
    to{
        transform: scaleY(1);
        opacity: 1;
    }
}
.loader-hint{
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 4px;
}

#rotate-overlay{
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: linear-gradient(135deg, #141210 0%, #1E1A16 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

@media(max-width:900px) and (orientation: portrait){
    #rotate-overlay{
        display: flex;
    }
}

.rotate-icon{
    width: 72px;
    height: 72px;
    border: 2px solid rgba(34, 197, 94, .4);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-items: center;
    animation: rotatePhone 2.2s ease-in-out infinite;
}

.rotate-icon svg{
    width: 36px;
    height: 36px;
    color: #22C55E;
}
.rotate-title{
    font-family: 'Cormorant Garamond',serif;
    font-size: 26px;
    font-weight: 600;
    color: #F0EDE6;
    letter-spacing: -0.5px;
}
.rotate-sub{
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}
.rotate-btn{
    margin-top: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    background: #22C55E;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
[data-theme="dark"] body{
    background: #0D0C0B;
    color: #EDE9E0;
}
[data-theme="dark"] .logo-name{color: #EDE9E0;}
[data-theme="dark"] .piano-card{ background: #1A1816; border-color: #2A2824;}
[data-theme="dark"] .rec-bar{ background: #1A1816; border-color: #2A2824;}
[data-theme="dark"] .rec-top{background: #222019; border-color: #2A2824; }
[data-theme="dark"] .track-pill{background: #222019; border-color: #2A2824; color: #8E897F; }
[data-theme="dark"] .upload-lbl{background: #222019; border-color: #38352F; color: #8E897F;}
[data-theme="dark"] .act{background: #1A1816; color: #8E897F; border-color: #2A2824;}
[data-theme="dark"] .act:not(:disabled):hover{background: #222019; color: #EDE9E0;}
[data-theme="dark"] .rec-item{background: #1A1816; border-color: #2A2824;}
[data-theme="dark"] .empty{background: #1A1816; border-color: #2A2824; }
[data-theme="dark"] .empty-icon{background: #222019; border-color: #2A2824;}
[data-theme="dark"] .ri-btn{background: #1A1816; border-color: #2A2824; color: #8E897F;}
[data-theme="dark"] .kbd{background: #1A1816; border-color: #38352F; color: #8E897F;}

@keyframes rotatePhone{
    0%,30%{
        transform: rotate(0deg);
    }
    60%,100%{
        transform: rotate(90deg);
    }
}
.rotate-btn:hover{
    background: #16A34A;
}

.backing-card{
    background: #FDFCF9;
    border: 1px solid #DDD8CE;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 4px 4px 14px rgba(180,174,162,0.55), -2px -2px 8px rgba(255,255,255,0.85);
}

.back-head{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid #DDD8CE;
    background: #EAE6DC;
}

.back-head-icon{
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FDFCF9;
    border: 1.5px solid #C5C0B5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B6660;
    flex-shrink: 0;
}

.back-head-icon svg{
    width: 13px;
    height: 13px;
}

.back-head-title{
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #6B6660;
    flex: 1;
}

.back-body{
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tracks-row{
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
}

.track-pill{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #EAE6DC;
    border: 1.5px solid #DDD8CE;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: #6B6660;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.track-pill:hover{
    border-color:  #22C55E;
    color:  #22C55E;
}

.track-pill.active{
    background:  #22C55E;
    border-color: #16A34A;
    color: #fff;
}
.track-pill.loading{
    opacity: 0.55;
    cursor: wait;
}

.pill-icon{
    width: 9px;
    height: 9px;
    flex-shrink: 0;
}

.upload-lbl{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: #EAE6DC;
    border: 1.5px dashed #C5C0B5;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: #A8A29C;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.upload-lbl:hover{
    border-color: #22C55E;
    color: #22C55E;
}

.upload-lbl svg{
    width: 12px;
    height: 12px;
}

.back-controls{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.back-play-btn{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #22C55E;
    border: 2px solid #16A34A;
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    transition: background 0.15s;
}

.back-play-btn:hover{
    background: #16A34A;
}

.back-play-btn:disabled{
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

.back-play-btn svg{
    width: 14px;
    height: 14px;
}

.back-prog{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.back-name{
    font-size: 12px;
    font-weight: 500;
    color: #1A1714;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.back-rail-row{
    display: flex;
    align-items: center;
    gap: 8px;
}
.back-rail{
    flex: 1;
    height: 3px;
    background: #EAE6DC;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.08);
}

.back-fill{
    height: 100%;
    background: #3B82F6;
    width: 0;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.back-time{
    font-size: 10px;
    font-family: 'DM Mono',monospace;
    font-weight: 500;
    color: #A8A29c;
    white-space: nowrap;
}

.back-vol-row{
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.back-vol-icon{
    width: 13px;
    height: 13px;
    opacity: 0.35;
    stroke: #6B6660;
}

.back-vol{
    width: 72px;
}

[data-theme="dark"] .backing-card{
    background: #1A1816;
    border-color: #2A2824;
}
[data-theme="dark"] .back-head{
    background: #222019;
    border-color: #2A2824;
}
[data-theme="dark"] .back-head-icon{
    background: #1A1816;
    border-color: #2A2824;
    color: #8E897F;
}
[data-theme="dark"] .back-name{
    color: #EDE9E0;
}

[data-theme="dark"] .back-rail{
    background: #222019;
}

[data-theme="dark"] .track-pill{
    background: #222019;
    border-color: #38352F;
    color: #8E897F;
}

[data-theme="dark"] .upload-lbl{
    background: #222019;
    border-color: #38352F;
    color: #8E897F;
}

.oct-nav{
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0 2px;
}

.oct-btn{
    width: 30px; height: 30px;
}
@media (max-width: 680px) {
  #root{ 
    padding: 20px 14px 36px; 
    gap: 20px; 
}
  .logo-name{ 
    font-size: 28px; 
}
  .piano-card{ 
    padding: 20px 12px 32px; 
}
  .keys-wrap{ 
    overflow-x: auto; 
    justify-content: flex-start; 
}
  .key.white{ 
    width: 40px; 
}
  .key.black{ 
    width: 26px; 
    margin-left: -15px; 
    margin-right: -13px; 
}
}
#disco-canvas{
    background: transparent !important;
}
/* [data-theme="dark"] #disco-canvas{

} */

@media(max-height:460px){
    #root{
        padding: 8px 12px 10px;
        gap: 8px;
    }
    .logo-name{font-size: 22px;}
    .piano-card{padding: 8px 8px 14px; border-radius: 16px;}
    .piano-card::before{height: 8px; top: -8px;}
    .piano-brand{
        font-size: 7px;
        letter-spacing: 4px;
        margin-bottom: 8px;
    }
    .back-body{padding: 7px 12px; gap: 7px;}
    .back-play-btn{
        width: 30px;
        height: 30px;
    }
    .rec-top{padding: 7px 12px 6px;}
    .rec-actions .act{ font-size: 9px;}
    .act-icon{
        width: 22px;
        height: 22px;
    }
    footer{
        display: none;
    }
}
@media(max-width:680px) and (orientation: landscape){
    #root{
        padding: 10px 12px 14px;
        gap: 10px;
    }
    .logo-name{font-size: 24px;}
    .logo-sub{font-size: 7px; letter-spacing: 3px;}
    .piano-card{padding: 10px 8px 16px; border-radius: 18px;}
    .piano-brand{font-size: 7px; margin-bottom: 8px;}
    .back-body{padding: 8px 12px; gap: 7px;}
    .track-pill{padding: 4px 9px; font-size: 10px;}
    .back-play-btn{width: 30px; height: 30px;}
    .rec-top{padding: 7px 12px;}
    .act-inner{padding: 8px 4px 7px; gap: 5px;}
    .act-icon{width: 22px; height: 22px;}
    footer{display: none;}
}

@media(max-width:1024px) and (orientation:landscape){
    #root{
        padding: 16px 18px 28px;
        gap: 16px;
    }
    .logo-name{
        font-size: 30px;
    }
    .piano-card{
        padding: 14px 12px 22px;
    }
}

/* Variable-based style additions and replacements */

.reel.spinning::before {
    animation: spin 1.2s linear infinite;
}

#loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #141210 0%, #1E1A16 50%, #0F0E0D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 28px;
    transition: opacity .7s ease, visibility .7s ease;
}

.upload-lbl {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: #EAE6DC;
    border: 1.5px dashed #C5C0B5;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: #A8A29C;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.piano-card {
    background: #FDFCF9;
    border: 1px solid #DDD8CE;
    border-radius: 26px;
    padding: 28px 28px 40px;
    position: relative;
    overflow: visible;
    box-shadow: 6px 6px 18px rgba(180,174,162,.55), -3px -3px 10px rgba(255,255,255,.85), inset 0 1px 0 rgba(255,255,255,.85);
}

.piano-card::before {
    content: '';
    position: absolute;
    top: -13px;
    left: 5%;
    right: 5%;
    height: 13px;
    background: linear-gradient(180deg,#C9A96E 0%,#A8844A 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -3px 10px rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.2);
}

.piano-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 7px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 18px;
    display: block;
    background: linear-gradient(135deg,#C9912E 0%,#8B6120 50%,#C9912E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.keys-wrap {
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
    user-select: none;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg,#2C2520 0%,#1E1A16 50%,#161210 100%);
    border-radius: 0 0 14px 14px;
    padding-top: 8px;
    box-shadow: inset 0 5px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(0,0,0,.5);
    border-left: 1px solid rgba(0,0,0,.3);
    border-right: 1px solid rgba(0,0,0,.3);
    border-bottom: 2px solid rgba(0,0,0,.35);
}

.keys-inner {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 6px;
    width: 100%;
}

.key {
    position: relative;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .07s ease, filter .07s ease;
    will-change: transform;
}

.key span {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity .18s, color .18s;
    white-space: nowrap;
    font-family: 'DM Mono', monospace;
}

.key.white {
    width: 44px;
    height: 182px;
    z-index: 1;
    margin-right: 2px;
    background: linear-gradient(180deg, #FFFEF8 0%, #F7F3EA 60%, #EDE8DC 100%);
    border-left: 1px solid #D4CFCA;
    border-right: 1px solid #D4CFCA;
    border-bottom: 1px solid #C8C3B8;
    border-top: none;
    border-radius: 0 0 7px 7px;
    box-shadow: 2px 0 0 rgba(0,0,0,.08), 0 6px 0 #C8C3B8, 0 8px 18px rgba(0,0,0,.13), inset 0 2px 3px rgba(255,255,255,.7), inset 0 -4px 6px rgba(0,0,0,.08);
    overflow: hidden;
}

.key.white span {
    color: #B8B2A8;
}

.key.white::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28%;
    background: linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.05) 100%);
    pointer-events: none;
    border-radius: 0 0 2px 2px;
}

.key.white:hover {
    filter: brightness(1.04);
    transform: translateY(1px);
}

.key.white.pressed, .key.white.active {
    background: linear-gradient(180deg, #22C55E 0%, #1DAF53 100%) !important;
    transform: translateY(4px) scaleY(.982);
    transform-origin: top;
    filter: none !important;
    box-shadow: 1px 0 0 rgba(0,0,0,.1), 0 1px 0 #17923F, 0 3px 8px rgba(0,0,0,.25), inset 0 4px 8px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.15) !important;
}

.key.white.pressed span, .key.white.active span {
    color: rgba(255,255,255,.85) !important;
    opacity: 1 !important;
}

.key.white.is-c::after {
    content: '';
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #C8C3B8;
    opacity: .7;
    pointer-events: none;
}

.key.black {
    width: 28px;
    height: 115px;
    z-index: 2;
    margin-left: -15px;
    margin-right: -13px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(180deg, #2A2A2C 0%, #1A1A1C 55%, #111113 100%);
    border: 1px solid rgba(0,0,0,.6);
    border-top: none;
    box-shadow: 0 6px 0 rgba(0,0,0,.6), 0 8px 20px rgba(0,0,0,.5), inset 0 2px 4px rgba(255,255,255,.12), inset 0 -3px 5px rgba(0,0,0,.4);
    overflow: hidden;
}

.key.black::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 35%;
    background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.0) 100%);
    border-radius: 0 0 4px 4px;
    pointer-events: none;
}

.key.black span {
    color: rgba(255,255,255,.22);
}

.key.black:hover {
    filter: brightness(1.15);
}

.key.black.pressed, .key.black.active {
    background: linear-gradient(180deg, #22C55E 0%, #18A34A 100%) !important;
    transform: translateY(3px);
    filter: none !important;
    box-shadow: 0 2px 0 #0F6B2E, 0 4px 10px rgba(0,0,0,.4), inset 0 3px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12) !important;
}

.key.black.pressed span, .key.black.active span {
    color: rgba(255,255,255,.85) !important;
    opacity: 1 !important;
}

.rec-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 10px;
    border-bottom: 1px solid #DDD8CE;
    background: linear-gradient(135deg, #EAE6DC 0%, #FDFCF9 100%);
}

.act {
    flex: 1;
    padding: 0;
    border: none;
    border-right: 1px solid #DDD8CE;
    background: #FDFCF9;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .08s;
}
.act:last-child { border-right: none; }
.act:disabled { opacity: .32; cursor: not-allowed; }
.act:not(:disabled):active { transform: scale(.97); }

.act-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 13px 8px 11px;
    width: 100%;
}

.act-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, box-shadow .15s;
    flex-shrink: 0;
}
.act-icon svg { width: 14px; height: 14px; }

.act-lbl {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.act-rec .act-icon {
    background: linear-gradient(135deg, #FF6B6B 0%, #E53E3E 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239,68,68,.38);
    border: none;
}
.act-rec .act-lbl { color: #DC2626; }
.act-rec:not(:disabled):hover { background: linear-gradient(180deg,#FFF5F5,#FEE2E2); }
.act-rec:not(:disabled):hover .act-icon { transform: scale(1.08); }

.act-rec.on .act-icon {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    border: none;
    animation: rec-pulse .9s ease-in-out infinite;
}
.act-rec.on .act-lbl { color: #B91C1C; }

@keyframes rec-pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(239,68,68,.25), 0 4px 14px rgba(239,68,68,.4); }
    50% { box-shadow: 0 0 0 8px rgba(239,68,68,.10), 0 4px 18px rgba(239,68,68,.5); }
}

.act-play .act-icon {
    background: linear-gradient(135deg, #4ADE80 0%, #16A34A 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34,197,94,.38);
    border: none;
}
.act-play .act-lbl { color: #16A34A; }
.act-play:not(:disabled):hover { background: linear-gradient(180deg,#F0FDF4,#DCFCE7); }
.act-play:not(:disabled):hover .act-icon { transform: scale(1.08); }

.act-save .act-icon {
    background: linear-gradient(135deg, #818CF8 0%, #4F46E5 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,.38);
    border: none;
}
.act-save .act-lbl { color: #4F46E5; }
.act-save:not(:disabled):hover { background: linear-gradient(180deg,#EEF2FF,#E0E7FF); }
.act-save:not(:disabled):hover .act-icon { transform: scale(1.08); }

[data-theme="dark"] .act-rec:not(:disabled):hover { background: rgba(239,68,68,.08); }
[data-theme="dark"] .act-play:not(:disabled):hover { background: rgba(34,197,94,.08); }
[data-theme="dark"] .act-save:not(:disabled):hover { background: rgba(99,102,241,.08); }
[data-theme="dark"] .act-rec .act-lbl { color: #FC8181; }
[data-theme="dark"] .act-play .act-lbl { color: #4ADE80; }
[data-theme="dark"] .act-save .act-lbl { color: #A5B4FC; }

.pb-fill {
    height: 100%;
    background: linear-gradient(90deg, #818CF8, #4F46E5);
    width: 0;
    border-radius: 3px;
    transition: width .08s linear;
}

.saved-title {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 1px;
    background: linear-gradient(135deg,#C9912E 0%,#8B6120 50%,#C9912E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rec-item.playing {
    border-color: #818CF8;
    background: rgba(99,102,241,.04);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.ri-play {
    background: linear-gradient(135deg, #4ADE80 0%, #16A34A 100%);
    color: #fff;
    border: none;
    box-shadow: 0 3px 10px rgba(34,197,94,.35);
}
.ri-play:hover { box-shadow: 0 4px 14px rgba(34,197,94,.48); transform: scale(1.06); }

.ri-play.stop {
    background: linear-gradient(135deg, #818CF8 0%, #4F46E5 100%);
    box-shadow: 0 3px 10px rgba(99,102,241,.38);
}

.ri-del {
    background: linear-gradient(135deg, #FCA5A5 0%, #EF4444 100%);
    color: #fff;
    border: none;
    box-shadow: 0 3px 10px rgba(239,68,68,.28);
}
.ri-del:hover { box-shadow: 0 4px 14px rgba(239,68,68,.42); transform: scale(1.06); }

.oct-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0 4px;
}

.oct-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EAE6DC;
    border: 1.5px solid #C5C0B5;
    color: #6B6660;
    transition: all .15s;
    flex-shrink: 0;
}
.oct-btn:hover { border-color: #22C55E; color: #22C55E; }
.oct-btn:disabled { opacity: .25; cursor: not-allowed; }
.oct-btn svg { width: 12px; height: 12px; }

.oct-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    font-family: 'DM Mono', monospace;
    color: #6B6660;
    min-width: 72px;
    text-align: center;
}

.oct-dots { display: flex; gap: 5px; align-items: center; }

.oct-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C5C0B5;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.oct-dot.active { background: #22C55E; transform: scale(1.3); }

/* Dynamic key sizing driven by index.js resizeKeys() */
.keys-wrap {
    height: calc(var(--wkh, 182px) + 16px);
}

.key span {
    font-size: var(--kfont, 8px);
}

.key.white {
    width: var(--wkw, 44px);
    height: var(--wkh, 182px);
    margin-right: var(--kgap, 2px);
}

.key.white.is-c::after {
    bottom: var(--cdot-bot, 24px);
}

.key.black {
    width: var(--bkw, 28px);
    height: var(--bkh, 115px);
    margin-left: var(--bkml, -15px);
    margin-right: var(--bkmr, -13px);
}

/* Final key color visibility overrides */
.key.white {
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F0E6 62%, #E8E2D5 100%);
    border-left: 1px solid #CFC9BC;
    border-right: 1px solid #CFC9BC;
    border-bottom: 1px solid #BDB6A7;
    box-shadow: 2px 0 0 rgba(0,0,0,.07), 0 6px 0 #BDB6A7, 0 8px 18px rgba(0,0,0,.16), inset 0 2px 3px rgba(255,255,255,.8), inset 0 -4px 6px rgba(0,0,0,.1);
}

.key.white span {
    color: #8B8477;
}

.key.black {
    background: linear-gradient(180deg, #2E3138 0%, #171A20 55%, #0A0C10 100%);
    border: 1px solid rgba(0,0,0,.7);
    border-top: none;
    box-shadow: 1px 0 0 rgba(255,255,255,.08), -1px 0 0 rgba(255,255,255,.05), 0 6px 0 rgba(0,0,0,.68), 0 10px 20px rgba(0,0,0,.58), inset 0 2px 4px rgba(255,255,255,.16), inset 0 -3px 5px rgba(0,0,0,.45);
}

.key.black span {
    color: rgba(255,255,255,.45);
}

[data-theme="dark"] .key.white {
    background: linear-gradient(180deg, #ECE6D9 0%, #D8D1C0 62%, #C6BEAB 100%);
    border-left: 1px solid #857D6F;
    border-right: 1px solid #857D6F;
    border-bottom: 1px solid #6F675A;
    box-shadow: 2px 0 0 rgba(0,0,0,.18), 0 6px 0 #6F675A, 0 8px 18px rgba(0,0,0,.42), inset 0 2px 3px rgba(255,255,255,.25), inset 0 -4px 6px rgba(0,0,0,.22);
}

[data-theme="dark"] .key.white span {
    color: #686155;
}

[data-theme="dark"] .key.black {
    background: linear-gradient(180deg, #242933 0%, #141922 55%, #080B11 100%);
    border: 1px solid rgba(0,0,0,.85);
    border-top: none;
    box-shadow: 1px 0 0 rgba(175,195,230,.12), -1px 0 0 rgba(175,195,230,.08), 0 6px 0 rgba(0,0,0,.72), 0 10px 22px rgba(0,0,0,.72), inset 0 2px 5px rgba(160,185,225,.18), inset 0 -3px 5px rgba(0,0,0,.5);
}

[data-theme="dark"] .key.black span {
    color: rgba(255,255,255,.58);
}