/* ============================================
   ORBIT PLAYER — Styles (extracted from monolithic index.html)
   Glassmorphism / Cosmic / Hi-Fi aesthetic
   ============================================ */

:root {
  --grain-opacity: .07;
  --scanline-opacity: .045;
  --vignette-strength: .72;
  --jestr-blue: #2D5BFF;
  --jestr-green: #00C896;
  --jestr-purple: #7B2FFF;
  --jestr-red: #E8003D;
  --baby-blue: #7EC8E3;
  --win-bg: rgba(8,5,22,.62);
  --win-border: rgba(150,100,255,.28);
  --win-shadow: 0 8px 48px rgba(0,0,0,.7),0 0 0 1px rgba(45,91,255,.07),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(0,0,0,.3);
  --win-radius: 18px;
  --mob-dock-h: 70px;
  --mob-player-h: 190px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow: hidden; width: 100%; height: 100%; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: #06040f; color: #e9e1de; }

#space-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(60,20,120,.55) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 20% 70%, rgba(0,80,180,.35) 0%, transparent 65%),
              radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0,160,120,.2) 0%, transparent 60%), #06040f;
}
#stars-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.grain-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift .1s steps(1) infinite; mix-blend-mode: overlay;
}
@keyframes grain-shift { 0%{transform:translate(0,0)} 20%{transform:translate(-2px,1px)} 40%{transform:translate(2px,-1px)} 60%{transform:translate(-1px,2px)} 80%{transform:translate(1px,-2px)} 100%{transform:translate(0,0)} }

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 199;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,180,.018) 2px, rgba(0,255,180,.018) 3px);
}
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 198;
  background: radial-gradient(ellipse at center, transparent 32%, rgba(3,2,10,var(--vignette-strength)) 100%);
}

.phosphor { text-shadow: 0 0 8px rgba(0,200,150,.4), 0 0 2px rgba(0,200,150,.2); }

.planet-glow {
  filter: blur(55px);
  background: radial-gradient(circle, var(--jestr-purple) 0%, var(--jestr-blue) 60%, var(--jestr-green) 100%);
  animation: ppulse 9s infinite alternate; opacity: .7;
}
@keyframes ppulse { 0%{transform:scale(1);opacity:.6} 100%{transform:scale(1.08);opacity:.82} }

.ring-far { animation: ring-expand 12s linear infinite; }
.ring-near { animation: ring-expand 9s linear infinite 1.5s; }
@keyframes ring-expand { 0%{transform:scale(.4);opacity:.6} 80%{opacity:.1} 100%{transform:scale(1.6);opacity:0} }

@keyframes vhs-flicker { 0%,96%,100%{opacity:1} 97%{opacity:.88} 98%{opacity:1} 99%{opacity:.92} }
.vhs-flicker { animation: vhs-flicker 5s infinite; }

.tape-counter {
  font-variant-numeric: tabular-nums; letter-spacing: .15em; font-size: 9px;
  color: rgba(0,200,150,.65); font-weight: 700; text-transform: uppercase;
}

/* Hide native scrollbars for the gallery (we use custom one below) */
#gallery-win .win-body {
  scrollbar-width: none;
}
#gallery-win .win-body::-webkit-scrollbar {
  display: none;
}

/* ============ CUSTOM GALLERY SCROLLBAR (always visible, thick, no fading) ============ */
#gallery-win .win-body {
  position: relative;
}

.custom-scrollbar {
  position: absolute;
  top: 8px;
  right: 4px;
  bottom: 8px;
  width: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  z-index: 10;
  pointer-events: auto;
  display: block; /* always present */
}

.custom-scrollbar-thumb {
  position: absolute;
  left: 2px;
  right: 2px;
  background: linear-gradient(var(--jestr-purple), var(--jestr-blue));
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  min-height: 40px;
  cursor: grab;
  transition: background 0.1s;
}

.custom-scrollbar-thumb:hover {
  background: linear-gradient(var(--jestr-blue), var(--jestr-green));
  border-color: rgba(255,255,255,0.4);
}

.custom-scrollbar-thumb:active {
  cursor: grabbing;
  box-shadow: 0 0 8px rgba(123,47,255,0.6);
}

/* ============ WINDOW CHROME ============ */
.win {
  position: fixed; z-index: 300;
  background: var(--win-bg);
  backdrop-filter: blur(40px) saturate(1.8) brightness(1.05);
  -webkit-backdrop-filter: blur(40px) saturate(1.8) brightness(1.05);
  border: 1px solid var(--win-border);
  border-radius: var(--win-radius);
  box-shadow: var(--win-shadow);
  user-select: none; overflow: hidden;
  display: flex; flex-direction: column;
}
.win::before {
  content: "";
  position: absolute; inset: 0; border-radius: var(--win-radius); pointer-events: none;
  background:
    radial-gradient(circle 18px at 0% 0%, rgba(126,200,227,.25) 0%, transparent 70%),
    radial-gradient(circle 18px at 100% 0%, rgba(126,200,227,.25) 0%, transparent 70%),
    radial-gradient(circle 18px at 0% 100%, rgba(126,200,227,.25) 0%, transparent 70%),
    radial-gradient(circle 18px at 100% 100%, rgba(126,200,227,.25) 0%, transparent 70%);
  opacity: .6; transition: opacity .3s; z-index: 0;
}
.win:hover::before { opacity: 1; }

.win-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px 8px;
  border-bottom: 1px solid rgba(150,100,255,.12);
  cursor: grab; flex-shrink: 0; position: relative; z-index: 2;
}
.win-bar:active { cursor: grabbing; }
.win-bar-left { display: flex; align-items: center; gap: 6px; }
.win-bar-right { display: flex; align-items: center; gap: 4px; }

.win-title {
  font-size: 8px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(0,200,150,.65);
}

.win-close {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(232,0,61,.18);
  border: 1px solid rgba(255,255,255,.07);
  border-top-color: rgba(255,255,255,.12); border-left-color: rgba(255,255,255,.10);
  border-bottom-color: rgba(0,0,0,.35); border-right-color: rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(232,0,61,.5);
  transition: background .15s, color .15s, box-shadow .12s, transform .08s, border-color .12s;
  box-shadow: 0 2px 4px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
}
.win-close:hover { background: rgba(232,0,61,.45); color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.5), 0 0 12px rgba(232,0,61,.45); }
.win-close:active { transform: scale(.9) translateY(1px); }

/* ── Resize handles ── */
.win-resize { position: absolute; z-index: 10; opacity: 0; }
.win-resize.nw { top: 0; left: 0; width: 20px; height: 20px; cursor: nw-resize; }
.win-resize.ne { top: 0; right: 0; width: 20px; height: 20px; cursor: ne-resize; }
.win-resize.sw { bottom: 0; left: 0; width: 20px; height: 20px; cursor: sw-resize; }
.win-resize.se { bottom: 0; right: 0; width: 20px; height: 20px; cursor: se-resize; }
.win-resize.n { top: 0; left: 20px; right: 20px; height: 6px; cursor: n-resize; }
.win-resize.s { bottom: 0; left: 20px; right: 20px; height: 6px; cursor: s-resize; }
.win-resize.e { top: 20px; right: 0; width: 4px; bottom: 20px; cursor: e-resize; }
.win-resize.w { top: 20px; left: 0; width: 6px; bottom: 20px; cursor: w-resize; }

.win-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Small right padding on the main scroll lists to keep content from touching the scrollbar */
#sidebar-tracklist {
  padding-right: 6px;
}

#player-win { min-height: 270px; min-width: 360px; }

/* Song Detail Window polish */
#song-detail-win .win-body {
  font-family: inherit;
}
#song-detail-win h2 {
  font-style: italic;
  letter-spacing: -0.02em;
}

/* Toast */
#app-toast {
  transition: opacity 0.2s ease;
}
#player-win .win-body { overflow-y: auto; }

/* ============ ANALOG BUTTONS ============ */
.ctrl-btn, .taskbar-btn, .m-tab {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-top-color: rgba(255,255,255,.12);
  border-left-color: rgba(255,255,255,.10);
  border-bottom-color: rgba(0,0,0,.35);
  border-right-color: rgba(0,0,0,.2);
  border-radius: 8px; cursor: pointer; padding: 5px;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, box-shadow .12s, transform .07s, border-color .12s, color .12s;
  backdrop-filter: blur(8px); color: var(--baby-blue);
  box-shadow: 0 2px 4px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
}
.ctrl-btn:hover, .taskbar-btn:hover, .m-tab:hover { background: rgba(126,200,227,.12); box-shadow: 0 3px 8px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.10); }
.ctrl-btn:active, .taskbar-btn:active, .m-tab:active {
  transform: scale(.95) translateY(1px); background: rgba(0,0,0,.18);
  border-top-color: rgba(0,0,0,.3); border-left-color: rgba(0,0,0,.2);
  border-bottom-color: rgba(255,255,255,.06);
  box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 2px 4px rgba(0,0,0,.35);
}
.ctrl-btn.active-state, .taskbar-btn.win-open, .m-tab.active {
  background: rgba(10,6,30,.70);
  border-top-color: rgba(0,0,0,.45); border-left-color: rgba(0,0,0,.35);
  border-bottom-color: rgba(255,255,255,.08);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.55), inset 0 1px 2px rgba(0,0,0,.35);
  transform: translateY(1px); color: rgba(200,180,255,.96);
}

.play-btn {
  background: linear-gradient(135deg, var(--jestr-purple), var(--jestr-blue));
  box-shadow: 0 0 22px rgba(123,47,255,.55), 0 3px 8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.22);
  transition: box-shadow .15s, transform .08s; border: none; cursor: pointer;
}
.play-btn:hover { box-shadow: 0 0 34px rgba(45,91,255,.75), 0 3px 12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.25); }
.play-btn:active { transform: scale(.93) translateY(1px); }

/* Player transport controls row - prevent clipping, good touch targets */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

/* ============ SCRUBBERS ============ */
.progress-wrap {
  position: relative; height: 22px; display: flex; align-items: center;
  cursor: pointer; flex: 1; user-select: none; -webkit-user-select: none; touch-action: none;
}
.progress-track-bg {
  position: absolute; left: 0; right: 0; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,.1); transition: height .12s;
}
.progress-fill-bar {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--jestr-purple), var(--jestr-blue), var(--jestr-green));
  pointer-events: none;
}
.progress-thumb {
  position: absolute; top: 50%; transform: translate(-50%,-50%); width: 14px; height: 14px;
  border-radius: 50%; background: #fff; pointer-events: none; opacity: 0; transition: opacity .15s, transform .1s;
  z-index: 2; box-shadow: 0 0 0 3px rgba(123,47,255,.5), 0 2px 8px rgba(0,0,0,.6);
}
.progress-wrap:hover .progress-thumb, .progress-wrap.dragging .progress-thumb { opacity: 1; }
.progress-wrap:hover .progress-track-bg, .progress-wrap:hover .progress-fill-bar,
.progress-wrap.dragging .progress-track-bg, .progress-wrap.dragging .progress-fill-bar { height: 5px; }
.progress-wrap.dragging .progress-thumb { transform: translate(-50%,-50%) scale(1.2); }

/* ============ VOLUME ============ */
.vol-row {
  display: flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; padding: 5px 10px;
}
#vol-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0; cursor: pointer;
  border-radius: 8px; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
#vol-icon { font-size: 14px; color: rgba(0,200,150,.65); pointer-events: none; transition: color .2s; }
#vol-icon.muted { color: var(--jestr-red) !important; text-shadow: 0 0 8px rgba(232,0,61,.5); }

#vol-slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 4px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--jestr-green) 0%, var(--jestr-green) var(--vol-pct,80%), rgba(255,255,255,.12) var(--vol-pct,80%), rgba(255,255,255,.12) 100%);
  touch-action: none;
}
#vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0,200,150,.45), 0 2px 6px rgba(0,0,0,.6); transition: transform .1s;
}
#vol-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; cursor: pointer;
  border: none; box-shadow: 0 0 0 3px rgba(0,200,150,.45), 0 2px 6px rgba(0,0,0,.6);
}
#vol-slider:active::-webkit-slider-thumb { transform: scale(1.25); }
#vol-pct { width: 30px; flex-shrink: 0; text-align: right; font-size: 8px; }

/* ============ SEARCH ============ */
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(123,47,255,.2);
  border-radius: 10px; padding: 0 10px; height: 34px;
  transition: border-color .2s, box-shadow .2s;
}
.search-wrap:focus-within { border-color: rgba(123,47,255,.55); box-shadow: 0 0 0 3px rgba(123,47,255,.08); }
.search-wrap .material-symbols-outlined { font-size: 15px; color: rgba(110,104,117,.6); flex-shrink: 0; }
.search-wrap input {
  background: transparent !important; border: none !important; outline: none !important;
  color: #e9e1de; font-size: 11px; font-family: inherit; width: 100%; padding: 0;
}
.search-wrap input::placeholder { color: rgba(110,104,117,.45); }

/* ============ TRACK ITEMS ============ */
.track-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
  position: relative;
}
.track-item:hover { background: rgba(45,91,255,.07); }
.track-item.active { background: rgba(45,91,255,.12) !important; border-color: rgba(123,47,255,.3) !important; }
.track-item.active .track-title { color: #e9e1de !important; }
.track-item.active .track-artist { color: var(--jestr-green) !important; }
.track-item.is-dragging { opacity: .3; background: rgba(123,47,255,.06) !important; }

/* ── Drop line (constrained to tracklist) ── */
#drop-line {
  position: absolute; left: 0; right: 0; pointer-events: none; z-index: 9999;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--jestr-purple) 8%, var(--jestr-blue) 50%, var(--jestr-green) 92%, transparent 100%);
  box-shadow: 0 0 10px rgba(123,47,255,.9), 0 0 20px rgba(0,200,150,.5);
  border-radius: 999px; display: none;
}
#drop-line::before, #drop-line::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--jestr-purple); box-shadow: 0 0 8px var(--jestr-purple);
}
#drop-line::before { left: 4px; }
#drop-line::after { right: 4px; background: var(--jestr-green); box-shadow: 0 0 8px var(--jestr-green); }

/* Drag handle */
.drag-handle {
  cursor: grab; display: flex; align-items: center; flex-shrink: 0;
  padding: 6px 6px; margin: -2px; border-radius: 6px;
  color: rgba(150,100,255,.4); transition: color .15s, background .15s;
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
.drag-handle:hover { color: var(--jestr-purple); background: rgba(123,47,255,.14); }
.drag-handle.grabbing { cursor: grabbing; color: var(--jestr-purple); }

/* ============ GALLERY ============ */
.gallery-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; padding: 2px; }
.gallery-item {
  border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(123,47,255,.18); background: rgba(15,10,35,.5);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  aspect-ratio: 1/1;
}
.gallery-item:hover { transform: scale(1.03); box-shadow: 0 0 18px rgba(123,47,255,.4); border-color: rgba(123,47,255,.5); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============ IMAGE VIEWER WINDOW ============ */
#image-win { display: none; }
#image-win .win-body {
  align-items: center; justify-content: center; background: rgba(3,2,10,.5);
  padding: 10px; overflow: hidden; position: relative;
}
.img-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-top-color: rgba(255,255,255,.12);
  border-left-color: rgba(255,255,255,.10);
  border-bottom-color: rgba(0,0,0,.35);
  border-right-color: rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--baby-blue);
  box-shadow: 0 2px 4px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .18s, background .12s, box-shadow .12s, transform .07s, border-color .12s, color .12s;
  z-index: 5;
}
.img-nav.edge-visible { opacity: 1; pointer-events: auto; }
.img-nav-prev { left: 10px; }
.img-nav-next { right: 10px; }
.img-nav:hover { background: rgba(126,200,227,.12); box-shadow: 0 3px 8px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.10); }
.img-nav:active {
  transform: translateY(-50%) scale(.95);
  background: rgba(0,0,0,.18);
  border-top-color: rgba(0,0,0,.3);
  border-left-color: rgba(0,0,0,.2);
  border-bottom-color: rgba(255,255,255,.06);
  box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 2px 4px rgba(0,0,0,.35);
}
.img-nav-icon { font-size: 22px; }

@media (max-width: 767px) {
  .img-nav { width: 48px; height: 48px; }
  .img-nav-icon { font-size: 26px; }
}

/* ============ DESKTOP DOCK ============ */
#dock-win {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%);
  width: min(500px, 94vw); z-index: 400; border-radius: 14px;
}
#dock-win .win-body {
  flex-direction: row; align-items: center; justify-content: center;
  gap: 8px; padding: 6px 14px;
}
.dock-logo-wrap { display: flex; flex-direction: column; align-items: center; margin-right: 6px; flex-shrink: 0; }
.dock-logo-main { font-size: 15px; font-weight: 900; font-style: italic; color: var(--jestr-purple); letter-spacing: -.03em; }
.dock-logo-sub { font-size: 7px; font-weight: 700; letter-spacing: .25em; color: rgba(0,200,150,.5); text-transform: uppercase; }
.dock-divider { width: 1px; height: 30px; background: rgba(100,60,200,.2); margin: 0 4px; flex-shrink: 0; }

.taskbar-btn {
  flex-direction: column; align-items: center; gap: 3px;
  min-width: 60px; padding: 6px 10px; font-size: 9px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--baby-blue);
}
.taskbar-btn .material-symbols-outlined { font-size: 18px; }
.taskbar-dot {
  width: 4px; height: 4px; border-radius: 50%; background: var(--jestr-green);
  opacity: 0; box-shadow: 0 0 6px rgba(0,200,150,.8); transition: opacity .2s; margin-top: -1px;
}
.taskbar-btn.win-open .taskbar-dot { opacity: 1; }
.taskbar-btn.win-open .material-symbols-outlined {
  color: var(--jestr-green); text-shadow: 0 0 8px rgba(0,200,150,.4);
}

/* ============ MOBILE NAV DOCK ============ */
#mobile-dock {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: rgba(6,4,18,.92); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid rgba(123,47,255,.22);
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  align-items: center; justify-content: space-around;
}
.mob-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 18px; border-radius: 10px; cursor: pointer; flex: 1; max-width: 100px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-top-color: rgba(255,255,255,.13); border-left-color: rgba(255,255,255,.10);
  border-bottom-color: rgba(0,0,0,.38); border-right-color: rgba(0,0,0,.22);
  color: var(--baby-blue); font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  transition: background .12s, box-shadow .12s, transform .07s, color .12s, border-color .12s;
  box-shadow: 0 2px 5px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-tap-highlight-color: transparent;
}
.mob-btn .material-symbols-outlined { font-size: 22px; }
.mob-btn:active { transform: scale(.94) translateY(1px); }
.mob-btn.active {
  background: rgba(10,6,30,.78);
  border-top-color: rgba(0,0,0,.48); border-left-color: rgba(0,0,0,.36);
  border-bottom-color: rgba(255,255,255,.08);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.55); transform: translateY(1px); color: var(--jestr-green);
}
.mob-btn.active .mob-dot { opacity: 1; }
.mob-dot {
  width: 4px; height: 4px; border-radius: 50%; background: var(--jestr-green);
  opacity: 0; box-shadow: 0 0 6px rgba(0,200,150,.8); transition: opacity .2s;
}
.mob-btn.active .mob-dot { opacity: 1; }

/* ============ MOBILE LAYOUT ============ */
@media (max-width: 767px) {
  #dock-win { display: none; }
  #mobile-dock { display: flex; }
  #planet-bg { display: none; }

  #player-win {
    position: fixed !important; left: 0 !important; right: 0 !important;
    bottom: var(--mob-dock-h) !important; top: auto !important;
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    border-left: none !important; border-right: none !important; border-bottom: none !important;
  }
  #tracklist-win, #gallery-win {
    position: fixed !important; left: 0 !important; right: 0 !important; top: 0 !important;
    bottom: calc(var(--mob-dock-h) + var(--mob-player-h)) !important;
    width: 100% !important; max-width: 100% !important;
    border-radius: 0 !important; border-left: none !important; border-right: none !important; border-top: none !important;
  }
  /* IMAGE VIEWER: full screen on mobile */
  #image-win {
    position: fixed !important; left: 0 !important; top: 0 !important;
    width: 100vw !important; height: 100dvh !important;
    border-radius: 0 !important; z-index: 9000 !important;
  }
}

/* ============ TABLET / IPAD (768-1180px) ============ */
@media (min-width: 768px) and (max-width: 1180px) {
  .ctrl-btn, .taskbar-btn, .mob-btn, .win-close { min-width: 36px; min-height: 36px; }
  .ctrl-btn .material-symbols-outlined,
  .taskbar-btn .material-symbols-outlined,
  .mob-btn .material-symbols-outlined { font-size: 22px !important; }
  .win-title { font-size: 10px !important; }
  .win-bar { padding: 11px 14px 10px !important; }
  .win-close { width: 26px !important; height: 26px !important; font-size: 13px !important; }
  .track-title { font-size: 13px !important; }
  .track-artist { font-size: 10px !important; }
  .vol-row { padding: 7px 12px !important; }
  #vol-slider::-webkit-slider-thumb { width: 20px !important; height: 20px !important; }
  #vol-pct { font-size: 10px !important; }
  .taskbar-btn { font-size: 11px !important; padding: 8px 12px !important; min-width: 72px !important; }
  .taskbar-btn .material-symbols-outlined { font-size: 22px !important; }
  .mob-btn { padding: 10px 22px !important; font-size: 10px !important; }
  .mob-btn .material-symbols-outlined { font-size: 26px !important; }
  #fp-title { font-size: 13px !important; }
  #fp-artist { font-size: 10px !important; }
}

/* ============ BUTTON PRESS FIX (global) ============ */
.ctrl-btn, .taskbar-btn, .mob-btn {
  box-shadow: 0 3px 6px rgba(0,0,0,.45), 0 1px 0 rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.15); border-left-color: rgba(255,255,255,.12);
  border-bottom-color: rgba(0,0,0,.45); border-right-color: rgba(0,0,0,.28);
}
.ctrl-btn:active, .taskbar-btn:active, .mob-btn:active {
  transform: scale(.95) translateY(2px) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 3px 6px rgba(0,0,0,.4), inset 0 1px 2px rgba(0,0,0,.3) !important;
  border-top-color: rgba(0,0,0,.4) !important; border-left-color: rgba(0,0,0,.3) !important;
  border-bottom-color: rgba(255,255,255,.08) !important; border-right-color: rgba(0,0,0,.15) !important;
}
.win-close {
  box-shadow: 0 3px 6px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  border-top-color: rgba(255,255,255,.15); border-left-color: rgba(255,255,255,.12);
  border-bottom-color: rgba(0,0,0,.45); border-right-color: rgba(0,0,0,.28);
}
.win-close:active {
  transform: scale(.9) translateY(1px) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 3px 6px rgba(0,0,0,.4) !important;
  border-top-color: rgba(0,0,0,.4) !important; border-left-color: rgba(0,0,0,.3) !important;
  border-bottom-color: rgba(255,255,255,.08) !important; border-right-color: rgba(0,0,0,.15) !important;
}

/* Tablet tweak for dock */
@media (min-width: 768px) and (max-width: 1180px) {
  #dock-win { width: min(460px, 92vw) !important; }
}