.drum-panel {
  --drum-panel-radius: clamp(15px, 1.5vw, 26px);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr; justify-items: center;
  gap: clamp(12px, 2.4svh, 34px);
  min-height: 100svh;
  padding: clamp(13px, 2.8svh, 42px) clamp(16px, 5vw, 110px) clamp(32px, 8svh, 96px);
  background: radial-gradient(ellipse at 50% 54%, #fff6e6, #fff1db 23%, transparent 62%),
    radial-gradient(ellipse at 87% 87%, #e7a38580, transparent 50%),
    linear-gradient(144deg, #f6dfc6, #f9e7cd 48%, #efbf9c);
}
.drum-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(110deg, #7e4c2505 0 1px, transparent 1px 5px);
}
.drum-header { justify-self: stretch }
.drum-title {
  margin: .24em 0 0; font-size: clamp(31px, 7vmin, 87px); font-weight: 760;
  letter-spacing: .14em; text-indent: .14em; text-align: center;
}
.drum-floor {
  display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center;
  min-height: 0; width: 100%;
}
.drum-record-controls {
  --action-width: 280px;
  margin: .2em 0 .4em; padding: .24em .62em; white-space: nowrap;
}
#drum-record-speed-value { min-width: 10ch; text-align: right; font-variant-numeric: tabular-nums }
.drum-orbit {
  --record-size: min(40%, clamp(88px, 25vmin, 225px));
  position: relative; width: min(100%, 900px, 113svh);
  height: clamp(210px, 54svh, 670px);
  background: radial-gradient(ellipse at center, #fffdf22e, transparent 66%);
}
#drum-ring { position: absolute; inset: 0; display: block; width: 100%; height: 100% }
.drum-lab-mark {
  --label-diameter: 46%;
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; pointer-events: none;
  width: var(--record-size); aspect-ratio: 1;
  border: 1px solid #bb885e; border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fff5e7 var(--label-diameter),
      #d3ad89 calc(var(--label-diameter) + 1%), transparent calc(var(--label-diameter) + 2%)),
    conic-gradient(from 34deg, #ffffff00, #ffedd678 13%, #ffffff00 32%, #68392325 61%, #ffe7c583 76%, #ffffff00 92%),
    repeating-radial-gradient(circle, #a9705118 0 1px, transparent 1px 3px),
    #e9c5a3;
  box-shadow: 0 10px 25px #91553533, inset 0 0 0 3px #fff4e170, inset 0 0 0 7px #bf8b604d;
}
.drum-record-rotor {
  position: absolute; inset: 0;
  transform-origin: center;
  will-change: transform;
}
.drum-record-scratch {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: var(--diameter); aspect-ratio: 1;
  color: #79503a; opacity: var(--strength);
  background: conic-gradient(from var(--start), transparent 0deg, currentColor var(--peak), transparent var(--end));
  mask-image: radial-gradient(circle closest-side, transparent calc(100% - 1.6px), #000 calc(100% - .7px), transparent 100%);
}
.drum-record-scratch:nth-child(1) { --diameter: 58%; --start: 216deg; --peak: 6deg; --end: 18deg; --strength: .21 }
.drum-record-scratch:nth-child(2) { --diameter: 73%; --start: 34deg; --peak: 13deg; --end: 49deg; --strength: .19 }
.drum-record-scratch:nth-child(3) { --diameter: 77%; --start: 68deg; --peak: 3deg; --end: 12deg; --strength: .12 }
.drum-record-scratch:nth-child(4) { --diameter: 88%; --start: 310deg; --peak: 17deg; --end: 31deg; --strength: .26 }
.drum-record-rotor img {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: var(--label-diameter); height: var(--label-diameter); object-fit: contain; border-radius: 50%;
}
.drum-tonearm {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: var(--record-size); aspect-ratio: 1; pointer-events: none;
}
.drum-tonearm-pivot {
  position: absolute; left: -25%; top: 20%; translate: -50% -50%;
  width: 22%; aspect-ratio: 1; border: 1px solid #a47755; border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, #fff4df 3%, #e4ba90 28%, #a77654 32%,
    #f2caa4 38%, #bb8967 54%, #744e3d 58%, #cc9a73 68%, #805744 85%);
  box-shadow: 0 .18em .48em #6d443e49;
}
.drum-tonearm-swing {
  position: absolute; top: 20%; left: -25%; width: 56%; height: 7%;
  margin-top: -3.5%; transform-origin: left center; transform: rotate(91deg);
  transition: transform .55s cubic-bezier(.28,.69,.3,1) .14s;
}
.drum-tonearm-bar {
  position: absolute; inset: 22% 7% 22% 0; transform-origin: left center;
  transform: perspective(260px) rotate(-7deg) rotateY(-14deg);
  border-radius: 999px;
  background: linear-gradient(180deg,#754e3a,#fef0d0 29%,#d9ae84 48%,#9a694e 78%,#714b36);
  box-shadow: .12em .22em .34em #65433157;
  transition: transform .24s ease, box-shadow .24s ease;
}
.drum-tonearm-bar::before {
  content: ""; position: absolute; left: -17%; top: -62%; width: 30%; height: 224%;
  border-radius: 32% 29% 32% 29%; border: 1px solid #805944;
  background: linear-gradient(180deg,#f6d4ac,#b17e59 47%,#735043 79%,#aa7959);
}
.drum-tonearm-head {
  position: absolute; right: -14%; top: -75%; width: 24%; height: 250%; transform: rotate(-19deg);
  border-radius: 20% 30% 36% 21%; border: 1px solid #573b31;
  background: repeating-linear-gradient(90deg,transparent 0 14%,#f9d3a32f 15% 18%),
    linear-gradient(180deg,#9c7561,#62473d 50%,#4b342d 53%,#754c3d);
  box-shadow: inset 0 1px #ffe1b97d;
}
.drum-tonearm-head::after {
  content: ""; position: absolute; right: -18%; top: 38%; width: 25%; height: 29%;
  border-radius: 0 80% 80% 0; background: linear-gradient(90deg,#7d4d39,#edb894);
}
.drum-orbit[data-arm-down] .drum-tonearm-swing { transform: rotate(46deg); transition-delay: 0s }
.drum-orbit[data-arm-down] .drum-tonearm-bar {
  transform: perspective(260px) rotate(0deg) rotateY(0deg);
  box-shadow: 0 .06em .11em #65433154; transition-delay: .46s;
}
.drum-bouquet {
  --flower-size: clamp(58px, 13.5vmin, 138px);
  position: absolute; top: 50%; left: 50%; width: var(--flower-size); height: calc(var(--flower-size) * 1.17);
  translate: -50% -50%; pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 .32em .42em #793f3650);
}
.bouquet-stems {
  position: absolute; left: 22%; top: 24%; width: 63%; height: 64%; rotate: -3deg;
  background: repeating-linear-gradient(104deg, #395743 0 6%, #759069 7% 11%, #516947 12% 17%);
  clip-path: polygon(0 0, 96% 0, 62% 100%, 39% 97%);
}
.bouquet-wrap { position: absolute; inset: 28% 7% 0; border-radius: 12% 11% 7% 6% }
.bouquet-wrap-back {
  background: linear-gradient(139deg, #fff2d7 7%, #ebba85 34%, #f9e0bd 58%, #dca477 81%);
  clip-path: polygon(0 18%, 23% 9%, 37% 0, 68% 14%, 94% 3%, 100% 37%, 71% 67%, 63% 96%, 40% 100%, 31% 71%);
}
.bouquet-wrap-front {
  background: linear-gradient(121deg, #fff0d6 3% 32%, #d29a75 44%, #f6d5ae 46% 67%, #ffecd2 71%, #e2aa83 86%);
  clip-path: polygon(1% 34%, 35% 44%, 65% 39%, 96% 27%, 79% 62%, 65% 78%, 63% 95%, 42% 100%, 36% 77%, 20% 66%);
}
.bouquet-foliage { position: absolute; inset: 0 }
.bouquet-foliage i {
  position: absolute; top: 18%; left: 13%; width: 26%; height: 37%; transform-origin: 80% 90%;
  rotate: -55deg; border-radius: 90% 6% 85% 9%;
  background: linear-gradient(117deg, #a9ad75, #547052 60%, #355946);
}
.bouquet-foliage i:nth-child(2) { left: 58%; top: 7%; rotate: 50deg; width: 24%; height: 35% }
.bouquet-foliage i:nth-child(3) { left: 7%; top: 39%; rotate: -68deg; width: 25%; height: 25% }
.bouquet-foliage i:nth-child(4) { left: 70%; top: 33%; rotate: 54deg; width: 22%; height: 29% }
.bouquet-blooms { position: absolute; inset: 0 }
.bouquet-bloom {
  position: absolute; top: var(--bloom-y); left: var(--bloom-x); width: var(--bloom-size); aspect-ratio: 1;
  transform: translate(-50%,-50%) rotate(var(--bloom-turn));
}
.bouquet-bloom i {
  position: absolute; top: 4%; left: 30%; width: 40%; height: 48%; border-radius: 65% 59% 58% 61%;
  transform-origin: 50% 96%; rotate: var(--petal-turn);
  background: linear-gradient(158deg, var(--petal-light) 7%, var(--petal-fill) 64%, var(--petal-dark));
  box-shadow: inset 0 0 0 1px #fff9e33a;
}
.bouquet-bloom b {
  position: absolute; inset: 37%; border-radius: 50%;
  background: radial-gradient(circle at 37% 30%, #ffe3a1 7%, #e5a35e 42%, #a9563b 80%);
  box-shadow: 0 1px 3px #703b35a0;
}
.bouquet-tie {
  position: absolute; top: 77%; left: 43%; width: 25%; height: 10%; rotate: -9deg;
  border-radius: 42%; background: linear-gradient(#c75d5c,#9b494e); box-shadow: 0 2px 3px #7e3a4070;
}
.bouquet-tie i {
  position: absolute; right: 52%; top: -62%; width: 86%; height: 124%; border: .3em solid #bd5756;
  border-radius: 68% 54% 16% 61%; rotate: 25deg;
}
.bouquet-tie i + i { right: auto; left: 48%; border-radius: 54% 68% 61% 16%; rotate: -25deg }
.drum-player {
  width: min(100%, 640px); padding: .75em clamp(9px, 2vw, 22px) .85em;
  border: 1px solid #ba84595e; border-radius: var(--drum-panel-radius); background: #fff8edeb;
  box-shadow: 0 8px 26px #864d2220; color: #593626;
}
.drum-status {
  margin: 0 0 .55em; color: #804b32; text-align: center;
  font-size: clamp(13px, 1.9vmin, 17px); font-weight: 690;
}
.drum-player-row { display: flex; align-items: center; gap: .55em }
.drum-player-row button, .drum-player-row select { font-size: clamp(12px, 1.8vmin, 16px) }
.drum-play {
  display: inline-flex; align-items: center; justify-content: center; gap: .36em;
  min-width: 8em; white-space: nowrap;
}
.drum-play svg { width: 1.22em; height: 1.22em }
.drum-play:not([data-playing]) .drum-pause-icon, .drum-play[data-playing] .drum-play-icon { display: none }
.drum-track { position: relative; flex: 1; min-width: 0; font-size: clamp(12px, 1.8vmin, 16px) }
.drum-track select {
  appearance: none; display: block; width: 100%; padding: .65em 1.85em .65em .65em;
  color: transparent; background: #fff9ee; border: 1px solid var(--line); border-radius: 8px;
}
.drum-track option { color: #593626 }
.drum-track::after {
  content: ""; position: absolute; right: .8em; top: 50%; width: .42em; height: .42em;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.drum-track-title {
  position: absolute; inset-inline: .65em 1.85em; top: 50%; translate: 0 -50%; pointer-events: none;
}
#drum-import, #drum-native, #drum-native-stop { white-space: nowrap }
#drum-native { grid-column: -2; justify-self: end; font-weight: 680 }
#drum-native[aria-pressed="true"] { background: #f7e1cc; border-color: #b97b57 }
.drum-title-viewport { min-width: 0; overflow: hidden; white-space: nowrap }
.drum-title-viewport > span { display: block; width: max-content }
.drum-native-title { color: #754935; font-size: clamp(12px, 1.8vmin, 16px) }
@media (forced-colors: active) {
  .drum-track select { appearance: auto; color: FieldText; padding-inline-end: .65em; text-overflow: ellipsis }
  .drum-track::after, .drum-track-title { display: none }
}
.drum-player-sliders { margin-top: .7em; color: #784d38; font-size: clamp(10px, 1.65vmin, 14px) }
.drum-time { flex: none; min-width: 6.5em; font-variant-numeric: tabular-nums; white-space: nowrap }
.drum-timeline { flex: 1; min-width: 0 }
.drum-volume { display: flex; align-items: center; gap: .4em; width: min(31%, 140px); white-space: nowrap }
.drum-player input[type="range"] { min-width: 0; width: 100%; margin: 0; accent-color: #b9633e }
@media (max-width: 480px) {
  .drum-play { min-width: 6.4em }
  .drum-orbit { width: 100%; height: min(50svh, 420px) }
}

.drum-layout {
  --drum-game-width: clamp(290px, 56svh, 620px);
  display: grid; grid-template-columns: min(46%, var(--drum-game-width)) minmax(0, 1fr);
  gap: clamp(14px, 2.6vw, 46px); width: min(100%, 1660px);
}
.drum-game {
  display: grid; grid-template-rows: auto minmax(clamp(145px, 34svh, 300px), 1fr) auto;
  justify-items: center; min-width: 0; min-height: 0;
}
.drum-game .drum-orbit { height: 100%; max-height: 590px }
.drum-transport { justify-content: center; flex-wrap: wrap }
.drum-source {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; margin-top: .6em;
}
.drum-source:has(#drum-native[aria-pressed="true"]) { grid-template-columns: minmax(0, 1fr) auto }
.drum-skip { display: grid; place-items: center; padding: .38em .55em }
.drum-skip svg { width: 1.25em; height: 1.25em; fill: currentColor }
.drum-lyrics {
  min-width: 0; position: relative; isolation: isolate;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  min-height: 280px;
  padding: clamp(13px, 2.4vw, 38px); border: 1px solid #fff3df99;
  border-radius: var(--drum-panel-radius); overflow: hidden;
  background: radial-gradient(ellipse at 98% 92%, #b7504a70, transparent 63%),
    radial-gradient(ellipse at 8% 12%, #ffd4a977, transparent 69%),
    linear-gradient(139deg, #b66e50, #874736 64%, #62372f);
  box-shadow: 0 12px 35px #8d4a3336; color: #fff9f0;
}
.drum-lyrics-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65em 1em; align-items: start }
.drum-lyrics-heading { min-width: 0 }
.drum-lyrics-heading h2 { font-size: clamp(14px, 2vmin, 22px); margin: 0; letter-spacing: .08em }
.drum-lyrics-heading p { margin: .34em 0 0; color: #fff1e0; font-size: clamp(11px, 1.5vmin, 17px); overflow-wrap: anywhere }
.drum-lyrics-actions { display: flex; flex-wrap: wrap; gap: .32em; margin-top: .45em }
.drum-lyrics-actions:not(:has(button:not([hidden]))) { display: none }
.drum-lyrics-actions button { font-size: clamp(10px, 1.5vmin, 14px); padding: .35em .56em; color: #fff9f0; background: #512a2466; border: 1px solid #fff2dc55; white-space: nowrap }
.drum-lyrics-actions button:hover:not(:disabled) { color: #fff; background: #512a24aa; border-color: #fff2dc99 }
.drum-lyrics-cover {
  position: relative; width: clamp(43px, 8.7vmin, 92px); aspect-ratio: 1; perspective: 360px;
}
.drum-cover-card { position: absolute; inset: 0; transform-style: preserve-3d }
.drum-cover-side {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  backface-visibility: hidden;
  border: 1px solid #fff3df62; border-radius: clamp(8px, 1.3vmin, 14px);
  background: #552c2566; color: #ffe2c9a8; box-shadow: 0 4px 12px #52292038;
}
.drum-cover-back { transform: rotateY(180deg) }
.drum-lyrics-cover svg { width: 47%; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round }
.drum-lyrics-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.drum-lyrics-status { align-self: center; justify-self: center; color: #ffecdc; font-size: clamp(14px, 2.4vmin, 23px); text-align: center }
.drum-lyrics.has-lines .drum-lyrics-status:not([hidden]) { position: absolute; bottom: .3em; right: 1em; font-size: 12px; z-index: 1 }
.drum-lyric-timing {
  position: absolute; z-index: 2; inset: auto 12px 8px;
  pointer-events: none; color: #fff5e6; transition: opacity .18s ease;
}
.drum-lyric-timing > * { pointer-events: auto }
.drum-lyric-timing summary {
  position: relative; display: grid; place-items: center; width: 32px; height: 30px; list-style: none;
  border: 1px solid #fff2dc55; border-radius: 7px; background: #62372f; cursor: pointer;
}
.drum-lyric-timing summary::-webkit-details-marker { display: none }
.drum-lyric-timing[open] summary::after {
  content: ""; position: absolute; inset: 0 -9px 0 100%;
}
.drum-lyric-timing summary svg {
  width: 18px; height: 18px; fill: #62372f; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round;
}
.drum-lyric-timing label {
  position: absolute; left: 40px; bottom: 0; width: min(300px, calc(100% - 40px)); min-height: 30px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) 8ch; align-items: center; gap: .55em;
  padding: .32em .65em; border: 1px solid #fff2dc55; border-radius: 7px; background: #62372f;
  font-size: clamp(11px, 1.5vmin, 14px); white-space: nowrap;
}
.drum-lyric-timing input { width: 100%; min-width: 0; margin: 0; accent-color: #f3bc83 }
.drum-lyric-timing label span:last-child { text-align: right; font-variant-numeric: tabular-nums }
@media (hover: hover) {
  .drum-lyric-timing:not([open], :hover, .is-visible, :has(:focus-visible)) { opacity: 0 }
}
.drum-lyrics-scroll {
  position: relative; min-width: 0; min-height: 0; overflow: hidden auto;
  contain: size; overflow-anchor: none; overscroll-behavior: contain; scrollbar-width: none;
  margin-top: .35em; mask-image: linear-gradient(transparent, black 11% 83%, transparent);
}
.drum-lyrics-scroll ol { margin: 0; padding: 0 .25em; list-style: none }
.drum-lyrics-scroll.is-synced ol { padding-block: min(20svh, 140px) }
.drum-lyric-line, .drum-lyric-break { translate: 0 var(--lyric-shift, 0px) }
.drum-lyric-line > *, .drum-lyric-break > div { opacity: var(--lyric-arrival, 1) }
.drum-lyric-line { padding: .28em 0; opacity: .57; transition: opacity .46s ease, transform .56s cubic-bezier(.22,.61,.36,1); transform-origin: center }
.drum-lyric-line.is-current { opacity: 1; transform: scaleY(1.085); text-shadow: 0 2px 13px #ffe0a86b }
.drum-lyrics-scroll:not(.is-browsing) .is-past {
  opacity: 0; pointer-events: none;
}
.drum-lyrics-scroll.is-browsing .is-past { opacity: .7 }
.drum-lyric-line button, .drum-lyric-line > div {
  display: block; width: 100%; min-width: 0; max-width: 100%; padding: .1em .2em;
  text-align: justify; text-align-last: start;
  font: inherit; font-size: clamp(18px, 3.1vmin, 36px); font-weight: 730;
  line-height: 1.16; white-space: pre-line; color: inherit; background: transparent; border: 0; overflow-wrap: anywhere;
}
.drum-lyric-original { display: block }
.drum-lyric-line button:hover:not(:disabled), .drum-lyric-line button:focus-visible { background: #fff3dc20; color: #fff }
.drum-lyric-line small { display: block; margin-top: .26em; color: #ffdfbd; font-size: .59em; font-weight: 550; line-height: 1.35 }
.drum-lyrics-scroll.hide-translations .drum-lyric-line small { display: none }
.drum-lyrics-scroll:not(.is-synced) .drum-lyric-line { opacity: .9 }
.drum-lyric-part {
  color: transparent;
  background: linear-gradient(90deg, #fffaf3 var(--lyric-fill, 0%), #ffdfc5 var(--lyric-fill, 0%));
  background-clip: text; -webkit-background-clip: text;
}
.drum-lyric-line.is-current .drum-lyric-part { text-shadow: none }
.drum-lyric-break {
  padding: .7em .2em; color: #fff6e9; opacity: .32;
  font-size: clamp(18px, 3.1vmin, 36px); transition: opacity .46s ease, transform .56s cubic-bezier(.22,.61,.36,1);
}
.drum-lyric-break.is-current { opacity: 1 }
.drum-lyric-break > div { display: flex; gap: .29em; align-items: center }
.drum-lyric-break i {
  width: .31em; aspect-ratio: 1; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 .36em #ffe3b576; transition: opacity .15s linear;
}

@media (max-width: 640px) {
  .drum-source { grid-template-columns: minmax(0, 1fr) auto }
  .drum-source .drum-track { grid-column: 1 / -1 }
}
@media (max-width: 740px) and (orientation: portrait) {
  .drum-layout { grid-template-columns: minmax(0, 1fr) }
  .drum-game { grid-template-rows: auto auto auto }
  .drum-floor { grid-template-rows: auto auto }
  .drum-game .drum-orbit { height: min(34svh, 320px) }
  .drum-lyrics { min-height: min(56svh, 480px); height: min(58svh, 500px) }
}
@media (prefers-reduced-motion: reduce) {
  .drum-title-viewport > span { width: auto; overflow: hidden; text-overflow: ellipsis }
  .drum-lyric-timing { transition: none }
  .drum-tonearm-swing, .drum-tonearm-bar { transition: none }
  .drum-lyric-line, .drum-lyric-break, .drum-lyric-break i { transition: none }
}
