/* Lil Cracked Out Drums as a rack module (2026-11-01). Copyright (C) 2026 The Groovemaster. GPL-3.0-or-later.
   A faceplate screwed to rack rails, one rack row tall when folded (like the modules in the rack above). */
.gmdock.dm.dm-rackmod{--rail:14px;position:relative;padding:calc(var(--rail) + 8px) 18px calc(var(--rail) + 8px);border-top:0;
 background:
  repeating-linear-gradient(90deg,#141518 0 9px,transparent 9px 15px) 0 calc(var(--rail)/2 - 1px)/100% 3px no-repeat,
  repeating-linear-gradient(90deg,#141518 0 9px,transparent 9px 15px) 0 calc(100% - var(--rail)/2 + 2px)/100% 3px no-repeat,
  linear-gradient(180deg,#4a4d53,#2d2f34 55%,#1f2124) 0 0/100% var(--rail) no-repeat,
  linear-gradient(180deg,#4a4d53,#2d2f34 55%,#1f2124) 0 100%/100% var(--rail) no-repeat,
  #0b0c0e;
 display:flex;flex-direction:column;min-height:380px;box-sizing:border-box}
/* the faceplate */
.dm-rackmod::before{content:"";position:absolute;left:8px;right:8px;top:calc(var(--rail) - 4px);bottom:calc(var(--rail) - 4px);border-radius:3px;z-index:0;pointer-events:none;
 background:repeating-linear-gradient(90deg,rgba(255,255,255,.012) 0 1px,transparent 1px 3px),linear-gradient(180deg,#2c2f38 0%,#22242c 40%,#1a1b21 100%);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.07),inset 0 -1px 0 rgba(0,0,0,.6),0 0 0 1px #08090a,0 6px 16px rgba(0,0,0,.45)}
.dm-rackmod>*{position:relative;z-index:1}
.dm-rackmod>.gm-screw{position:absolute;z-index:3}
.dm-rackmod>.gm-screw-l,.dm-rackmod>.gm-screw-r{top:calc(var(--rail) - 1px)}
.dm-rackmod>.gm-screw-l,.dm-rackmod>.dm-scr-l{left:13px}.dm-rackmod>.gm-screw-r,.dm-rackmod>.dm-scr-r{right:13px}
.dm-rackmod>.dm-scr-b{top:auto;bottom:calc(var(--rail) - 1px)}
.dm-rackmod.gm-hidden{background:var(--c-surface-1,#131416);padding:0!important;height:auto!important;min-height:0!important}.dm-rackmod.gm-hidden::before{display:none}
.dm-rackmod.gm-mod-sel::before{box-shadow:inset 0 0 0 1px rgba(255,70,70,.85),inset 0 0 18px rgba(255,60,60,.12),0 0 0 1px #08090a}
.dm-rackmod.gm-mod-sel{box-shadow:none}
/* engraved title, like the rack's module names */
.dm-rackmod .dm-title{display:inline-flex;align-items:center;gap:6px;font:600 17px/1 var(--sans,system-ui);letter-spacing:.14em;text-transform:uppercase;color:#eceae6;text-shadow:0 1px 0 rgba(0,0,0,.7)}
.dm-rackmod .dm-title .gm-maker{font:600 10px var(--mono,monospace);letter-spacing:.08em;text-transform:lowercase;color:#ffb347}
.dm-rackmod .gd-head{gap:6px 10px;padding:0 6px}
.dm-rackmod .gd-b,.dm-rackmod .gd-handle{height:30px;font-size:12px}.dm-rackmod .gd-ico{width:30px}
.dm-rackmod .gd-sel{height:30px;font-size:12px;max-width:170px;background:#16171c}
.dm-rackmod .dm-lock{background:#121318;border-color:#30333b}
.dm-banks{gap:6px;padding:2px;border-radius:9px;background:#121318;border:1px solid #30333b}
.dm-bank{width:28px;height:26px;border-radius:6px;border:1px solid transparent;background:transparent;color:#c9ced6;font:600 12px var(--mono,monospace);cursor:pointer}
.dm-bank:hover{color:#ffd08a}
.dm-bank.dm-empty{color:#6f7680}
.dm-bank[aria-pressed=true]{background:radial-gradient(circle at 50% 35%,#ffd590,#e8902e 60%,#8a4a14);color:#2a1606;border-color:#ffcf86;box-shadow:0 0 10px rgba(255,160,60,.45)}
.dm-bank.dm-q{animation:dmq .5s steps(2) infinite;border-color:#ffb347}
@keyframes dmq{50%{background:rgba(255,179,71,.28)}}
.dm-banks .dm-copy{height:26px;border-radius:6px;margin-left:2px}
.dm-exp{margin-left:auto}
/* body: grid + master column */
.dm-rackmod .gd-body{flex:1 1 auto;display:flex;flex-direction:column;margin-top:10px;padding:0 6px}
.dm-main{flex:1 1 auto;display:grid;grid-template-columns:minmax(0,1fr) 84px;gap:14px;min-height:0}
.dm-rackmod .dm-grid{gap:5px;justify-content:space-between}
.dm-rackmod .dm-row{grid-template-columns:108px 30px 26px minmax(0,1fr);gap:6px;flex:1 1 0}
.dm-rackmod .dm-lane{display:flex;align-items:center;gap:4px;height:100%;min-height:26px;background:#16171c;border-color:#30333b;color:#dcdad5;letter-spacing:.02em}
.dm-lane .dm-ln{overflow:hidden;text-overflow:ellipsis}
.dm-lane .dm-us{color:#ffb347;font-size:9px;margin-left:auto}
.dm-rackmod .dm-lm{height:100%;min-height:26px}
.dm-lk{display:flex;align-items:center;justify-content:center}
.dm-lk .gk-mini .gk-dial{width:28px;height:28px}.dm-lk .gk-l,.dm-master .gk-v{display:none}
.dm-master .gk-v{display:block}
.dm-rackmod .dm-steps{gap:4px;height:100%}
.dm-rackmod .dm-st{height:100%;min-height:24px;border-radius:4px;border:1px solid #2b2e35;background:linear-gradient(180deg,#1f2228,#16181c);box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.dm-rackmod .dm-steps .dm-st:nth-child(4n+1){margin-left:0}
.dm-rackmod .dm-st.q{background:linear-gradient(180deg,#262a31,#1b1d22)}
.dm-rackmod .dm-st.on{background:radial-gradient(circle at 50% 38%,#f6c27a,#c77a2a 62%,#6e3a10);border-color:#d38a3a;box-shadow:0 0 6px rgba(255,150,50,.28)}
.dm-rackmod .dm-st.acc{background:radial-gradient(circle at 50% 38%,#fff0cf,#ffb347 50%,#b8661e);border-color:#ffe2a8;box-shadow:0 0 12px rgba(255,170,70,.6)}
.dm-rackmod .dm-st.ph{box-shadow:inset 0 0 0 2px rgba(255,236,200,.85),0 0 8px rgba(255,220,170,.25)}
.dm-rackmod .dm-st.on.ph,.dm-rackmod .dm-st.acc.ph{filter:brightness(1.25)}
.dm-tools{display:none;align-items:center;gap:4px;min-width:0}
.dm-snm{font-size:10px;color:#8a919c;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-user .dm-snm{color:#ffd08a}.dm-unload{display:none}.dm-user .dm-unload{display:inline-block}
.dm-row.dm-drop{outline:2px dashed #ffb347;outline-offset:2px;border-radius:6px;background:rgba(255,179,71,.06)}
.dm-rackmod.dm-dropon::before{box-shadow:inset 0 0 0 2px rgba(255,179,71,.6),0 0 0 1px #08090a}
.dm-master{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:6px;padding:4px 0;border-left:1px solid rgba(255,255,255,.05)}
.dm-master .gk{width:76px}.dm-master .gk-dial{width:46px;height:46px}.dm-master .gk-l{color:#dcdad5;font-size:11px;letter-spacing:.06em;text-transform:uppercase}
.dm-master .dm-clr{height:26px}
.dm-rackmod .dm-foot{margin-top:8px;gap:6px 14px}
.dm-msg{color:#ffd08a;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dm-msg.bad{color:#ffb3a8}
/* expanded: big pads + sample tools per lane */
.dm-rackmod.gd-expanded .dm-row{grid-template-columns:120px 32px 28px minmax(0,1fr) 190px;flex:0 0 auto}
.dm-rackmod.gd-expanded .dm-st,.dm-rackmod.gd-expanded .dm-lane,.dm-rackmod.gd-expanded .dm-lm{min-height:44px}
.dm-rackmod.gd-expanded .dm-tools{display:flex}
.dm-rackmod.gd-expanded .dm-main{grid-template-columns:minmax(0,1fr) 92px}
.dm-rackmod.gd-compact>.gd-body{display:flex}
@media (min-width:761px){.gmdock.dm.dm-rackmod.gd-compact{height:380px}}
@media (max-width:760px){
 .gmdock.dm.dm-rackmod{padding:calc(var(--rail) + 6px) 12px;min-height:0}
 .dm-rackmod .dm-title{font-size:14px;letter-spacing:.1em}
 .dm-rackmod .dm-lockt{display:none}
 .dm-main{grid-template-columns:minmax(0,1fr);gap:8px}
 .dm-master{flex-direction:row;justify-content:flex-start;border-left:0;border-top:1px solid rgba(255,255,255,.05);padding-top:6px}
 .dm-master .gk{width:64px}.dm-master .gk-dial{width:38px;height:38px}
 .dm-rackmod .dm-row{grid-template-columns:52px 26px 22px minmax(0,1fr);gap:3px}
 .dm-rackmod .dm-lane{font-size:10px;padding:0 4px;min-height:30px}
 .dm-lk .gk-mini .gk-dial{width:24px;height:24px}
 .dm-rackmod .dm-steps{gap:2px}.dm-rackmod .dm-st{min-height:28px;border-radius:3px}
 .dm-rackmod .gd-sel{max-width:112px}
 .dm-rackmod.gd-expanded .dm-row{grid-template-columns:52px 26px 22px minmax(0,1fr)}
 .dm-rackmod.gd-expanded .dm-tools{grid-column:1/-1;justify-content:flex-end}
 .dm-rackmod.gd-expanded .dm-st,.dm-rackmod.gd-expanded .dm-lane,.dm-rackmod.gd-expanded .dm-lm{min-height:36px}
 .dm-rackmod .gd-head .gd-handle .pl{display:none}
}
.dm-ls,.dm-ci{display:none}
@media (max-width:760px){
 .dm-ln{display:none}.dm-ls{display:inline}
 .dm-copy .pl{display:none}.dm-copy .dm-ci{display:inline}.dm-banks .dm-copy{padding:0 7px}
 .dm-rackmod .dm-kitw .gd-sel{max-width:98px}.dm-rackmod .dm-pat{max-width:132px}
 .dm-rackmod .gd-head{gap:6px}
 .dm-rackmod .gd-head{padding:4px 6px 8px}
 .dm-rackmod .gd-head .gd-b,.dm-rackmod .gd-head .gd-handle,.dm-rackmod .gd-head .gd-sel{height:44px;min-height:44px}
}
@media (max-width:760px){.dm-rackmod .dm-foot:has(.dm-msg:not(:empty)) .gd-note:not(.dm-msg){display:none}.dm-rackmod .dm-foot{min-height:36px}
 .dm-rackmod .dm-steps{gap:3px}.dm-rackmod .dm-st{min-height:34px;border-radius:4px}
 .dm-rackmod .dm-lane{font-size:10px;padding:0 4px;min-height:34px}
 .dm-rackmod.gd-expanded .dm-st,.dm-rackmod.gd-expanded .dm-lane,.dm-rackmod.gd-expanded .dm-lm{min-height:38px}
 .dm-rackmod .dm-foot{padding-bottom:10px}
 .dm-rackmod .dm-kitw .gd-sel,.dm-rackmod .gd-sel{min-height:44px}
 .dm-rackmod .dm-pat{min-height:44px}
 .gmdock.dm.dm-rackmod{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px));margin-bottom:8px}}
