/* GOONS - djembé (/play/djembe) : shared/js/goons-djembe.js */

.app-hero--instrument { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 10px 0 56px; }
.app-hero--instrument h1 { margin: 14px 0 10px; font-size: clamp(30px, 4vw, 46px); }
.app-hero--instrument .lede { max-width: 110ch; margin: 0 0 16px; font-size: 16px; line-height: 1.6; }
.app-hero--instrument .app-hero-actions { margin-bottom: 18px; }

.dj {
    --dj-orange: #f39a3b;
    --dj-green: #3fbf6f;
    --dj-gold: #f2cf6b;
    --dj-ink: #f6eee2;
    --dj-mute: #bfae96;
    display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 14px 24px;
    margin: 22px 0 8px; padding: 18px; border-radius: 20px; color: var(--dj-ink);
    background:
        radial-gradient(70% 70% at 15% 30%, rgba(243, 154, 59, .18), transparent 70%),
        radial-gradient(60% 60% at 90% 90%, rgba(63, 191, 111, .12), transparent 70%),
        #160d07;
    box-shadow: inset 0 0 0 1px rgba(242, 207, 107, .2), 0 24px 50px -22px rgba(0, 0, 0, .8);
    user-select: none; -webkit-user-select: none;
}
.dj:empty { min-height: 470px; }
.dj :where(button, select) { font: inherit; color: inherit; }
.dj :where(button) { cursor: pointer; }
.dj button:focus-visible, .dj select:focus-visible, .dj input:focus-visible { outline: 2px solid var(--dj-gold); outline-offset: 2px; }
.dj-drum { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; touch-action: none; -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .55)); }
.dj-zone { cursor: pointer; }
.dj-zone:hover { fill: rgba(243, 154, 59, .1); }
.dj-zlab { pointer-events: none; font: 800 11.5px/1 'Inter', system-ui, sans-serif; fill: #5a4428; letter-spacing: .04em; }
.dj-ripple { fill: none; stroke: var(--dj-orange); stroke-width: 0; opacity: 0; pointer-events: none; }
.dj-ripple.is-hit { animation: dj-ripple .4s ease-out; }
@keyframes dj-ripple { 0% { stroke-width: 9; opacity: 1; } 100% { stroke-width: 1; opacity: 0; } }
.dj-rattles { opacity: 0; transition: opacity .2s; }
.dj-drum.has-rattle .dj-rattles { opacity: 1; }
.dj-side { display: grid; gap: 10px; }
.dj-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 240, 220, .05); }
.dj select {
    appearance: none; -webkit-appearance: none; padding: 9px 32px 9px 12px; border: 0; border-radius: 10px;
    background: rgba(0, 0, 0, .35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23f39a3b'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-size: 14px; font-weight: 700; color: var(--dj-ink);
}
.dj select option { background: #24160c; }
.dj-play { border: 0; border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 800; background: var(--dj-orange); color: #2a1406; }
.dj-play[aria-pressed=true] { background: var(--dj-gold); }
.dj-tog { position: relative; border: 0; border-radius: 10px; padding: 9px 14px 9px 28px; font-size: 14px; font-weight: 700; background: rgba(0, 0, 0, .35); }
.dj-tog::before { content: ''; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #4d3c2c; }
.dj-tog[aria-pressed=true]::before { background: var(--dj-green); box-shadow: 0 0 8px var(--dj-green); }
.dj-tempo { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--dj-mute); }
.dj-tempo input { width: 110px; accent-color: var(--dj-orange); }
.dj-tempo output { min-width: 64px; color: var(--dj-ink); font-variant-numeric: tabular-nums; }
.dj-grid { display: grid; grid-template-columns: 74px repeat(var(--dj-cols, 16), minmax(0, 1fr)); gap: 4px; align-items: center; }
.dj-lane { font-size: 12px; font-weight: 700; color: var(--dj-mute); }
.dj-lane.is-muted { text-decoration: line-through; }
.dj-cell { position: relative; display: grid; place-items: center; height: 34px; border-radius: 7px; background: rgba(0, 0, 0, .3); font-size: 12px; font-weight: 800; }
.dj-cell.is-beat::before { content: ''; position: absolute; top: -5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--dj-mute); }
.dj-cell.is-b { background: #7a3e14; color: #fff; }
.dj-cell.is-t { background: var(--dj-orange); color: #2a1406; }
.dj-cell.is-s { background: var(--dj-gold); color: #2a1406; }
.dj-cell.is-o { background: #2f6b46; color: #fff; }
.dj-cell.is-x { background: #24402f; color: #cfe8d8; }
.dj-cell.is-bell { background: rgba(255, 255, 255, .16); color: #fff; }
.dj-cell.is-muted { opacity: .35; }
.dj-cell.is-now { box-shadow: 0 0 0 2px #fff; }
.dj-info { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--dj-mute); }
.dj-info b { color: var(--dj-orange); }
.dj-hint { grid-column: 1 / -1; margin: 0; font-size: 13.5px; color: var(--dj-mute); }
@media (max-width: 900px) { .dj { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
    .dj { padding: 12px 10px; gap: 10px; border-radius: 16px; }
    .dj-drum { max-width: 280px; }
    .dj-grid { grid-template-columns: 52px repeat(var(--dj-cols, 16), minmax(0, 1fr)); gap: 2px; }
    .dj-cell { height: 28px; font-size: 10px; border-radius: 5px; }
    .dj-lane { font-size: 10.5px; }
    .dj-tempo input { width: 90px; }
    .dj:empty { min-height: 900px; }
}
@media (prefers-reduced-motion: reduce) { .dj-ripple.is-hit { animation: none; } }
