/* ── Control Panel ── dark glass theme ── */

/* Toggle button */
.panel-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 201;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px 0 0 8px;
  background: rgba(6, 14, 6, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #7FFF00;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
  line-height: 1;
}
.panel-toggle {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}
.panel-toggle:hover {
  background: rgba(6, 14, 6, 0.9);
  opacity: 1;
  text-shadow: 0 0 12px rgba(127, 255, 0, 0.6), 0 0 24px rgba(127, 255, 0, 0.3);
}
.panel-toggle.open { right: 320px; }

/* Panel container */
.panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 200;
  width: 320px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(6, 14, 6, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(127, 255, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  color: #b0c8a0;
  scrollbar-width: thin;
  scrollbar-color: rgba(127, 255, 0, 0.2) transparent;
}
.panel.open { transform: translateX(0); }
.panel::-webkit-scrollbar { width: 5px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: rgba(127, 255, 0, 0.2); border-radius: 3px; }

/* Header */
.panel-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(127, 255, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(6, 14, 6, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1;
}
.panel-header-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #7FFF00;
  opacity: 0.7;
}
.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.panel-header-key {
  font-size: 10px;
  color: #9370DB;
  opacity: 0.5;
  letter-spacing: 0.05em;
  margin-left: 4px;
}

/* Panel header mushroom decoration */
.panel-header::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 14px;
  width: 60px;
  height: 12px;
  pointer-events: none;
  opacity: 0.25;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%237FFF00' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23556B2F' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23ADFF2F' opacity='0.5'/%3E%3C/svg%3E") no-repeat 0% 100% / 10px auto,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%239370DB' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23663399' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23DA70D6' opacity='0.5'/%3E%3C/svg%3E") no-repeat 50% 80% / 8px auto,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%237FFF00' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23556B2F' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23ADFF2F' opacity='0.5'/%3E%3C/svg%3E") no-repeat 100% 100% / 7px auto;
  z-index: 2;
}

/* Icon buttons (header) */
.panel-icon-btn {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(127, 255, 0, 0.12);
  border-radius: 4px;
  background: rgba(127, 255, 0, 0.04);
  color: #7FFF00;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  opacity: 0.6;
  line-height: 1;
  padding: 0;
}
.panel-icon-btn:hover {
  background: rgba(127, 255, 0, 0.12);
  border-color: rgba(127, 255, 0, 0.3);
  opacity: 1;
}
.panel-icon-btn.active {
  background: rgba(147, 112, 219, 0.15);
  border-color: rgba(147, 112, 219, 0.4);
  color: #DA70D6;
  opacity: 1;
}

/* Record button states */
.panel-rec-btn {
  color: #ff4444;
  border-color: rgba(255, 68, 68, 0.15);
}
.panel-rec-btn:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: rgba(255, 68, 68, 0.3);
}
.panel-rec-btn.recording {
  background: rgba(255, 68, 68, 0.2);
  border-color: rgba(255, 68, 68, 0.5);
  color: #ff4444;
  opacity: 1;
  animation: recBlink 1s ease-in-out infinite;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Group */
.panel-group {
  border-bottom: 1px solid rgba(127, 255, 0, 0.06);
}
.panel-group-head {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  gap: 8px;
}
.panel-group-head:hover { background: rgba(127, 255, 0, 0.03); }
.panel-group-chevron {
  font-size: 9px;
  color: #7FFF00;
  opacity: 0.4;
  transition: transform 0.2s;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}
.panel-group.collapsed .panel-group-chevron { transform: rotate(-90deg); }
.panel-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7FFF00;
  opacity: 0.6;
  flex: 1;
}
.panel-group-body {
  padding: 2px 14px 10px;
}
.panel-group.collapsed .panel-group-body { display: none; }

/* Row — one control */
.panel-row {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 4px;
  gap: 8px;
}
.panel-label {
  flex: 0 0 auto;
  min-width: 70px;
  max-width: 100px;
  font-size: 11px;
  color: #8ea880;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slider */
.panel-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.panel-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(127, 255, 0, 0.1);
  outline: none;
}
.panel-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7FFF00;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px rgba(127, 255, 0, 0.3);
}
.panel-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7FFF00;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px rgba(127, 255, 0, 0.3);
}
.panel-slider-val {
  min-width: 36px;
  text-align: right;
  font-size: 10px;
  color: #9370DB;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.panel-slider-val:hover {
  color: #DA70D6;
  text-decoration: underline dotted;
}

/* Inline number edit for slider values */
.panel-slider-edit {
  width: 50px;
  padding: 2px 4px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  background: rgba(6, 14, 6, 0.9);
  border: 1px solid rgba(127, 255, 0, 0.3);
  border-radius: 3px;
  color: #9370DB;
  outline: none;
  text-align: right;
  -moz-appearance: textfield;
}
.panel-slider-edit::-webkit-inner-spin-button,
.panel-slider-edit::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Toggle */
.panel-toggle-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}
.panel-switch {
  position: relative;
  width: 34px;
  height: 18px;
  cursor: pointer;
}
.panel-switch input { display: none; }
.panel-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: rgba(127, 255, 0, 0.1);
  transition: background 0.2s;
}
.panel-switch input:checked + .panel-switch-track {
  background: rgba(127, 255, 0, 0.35);
}
.panel-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #556B2F;
  transition: transform 0.2s, background 0.2s;
}
.panel-switch input:checked ~ .panel-switch-knob {
  transform: translateX(16px);
  background: #7FFF00;
}

/* Color picker */
.panel-color {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 22px;
  border: 1px solid rgba(127, 255, 0, 0.15);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  padding: 0;
}
.panel-color::-webkit-color-swatch-wrapper { padding: 1px; }
.panel-color::-webkit-color-swatch { border: none; border-radius: 2px; }
.panel-color::-moz-color-swatch { border: none; border-radius: 2px; }

/* Color array row */
.panel-color-array {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

/* Select */
.panel-select {
  flex: 1;
  background: rgba(6, 14, 6, 0.8);
  border: 1px solid rgba(127, 255, 0, 0.15);
  border-radius: 4px;
  color: #b0c8a0;
  font-size: 11px;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
}
.panel-select:focus { border-color: rgba(127, 255, 0, 0.35); }
.panel-select option { background: #0a1a0a; color: #b0c8a0; }

/* Footer */
.panel-footer {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(127, 255, 0, 0.08);
  position: sticky;
  bottom: 0;
  background: rgba(6, 14, 6, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.panel-footer-row {
  display: flex;
  gap: 6px;
}
.panel-speed-row {
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(127, 255, 0, 0.06);
  margin-bottom: 2px;
}
.panel-speed-row .panel-label {
  min-width: auto;
  font-size: 10px;
}
.panel-btn {
  flex: 1;
  padding: 6px 0;
  border: 1px solid rgba(127, 255, 0, 0.15);
  border-radius: 4px;
  background: rgba(127, 255, 0, 0.04);
  color: #7FFF00;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.panel-btn:hover {
  background: rgba(127, 255, 0, 0.1);
  border-color: rgba(127, 255, 0, 0.3);
}
.panel-btn--accent {
  color: #FFD700;
  border-color: rgba(255, 215, 0, 0.15);
  background: rgba(255, 215, 0, 0.04);
}
.panel-btn--accent:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
}
.panel-btn--danger {
  color: #DA70D6;
  border-color: rgba(147, 112, 219, 0.15);
  background: rgba(147, 112, 219, 0.04);
}
.panel-btn--danger:hover {
  background: rgba(147, 112, 219, 0.1);
  border-color: rgba(147, 112, 219, 0.3);
}

/* Toast notification */
.panel-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10000;
  padding: 8px 20px;
  border-radius: 6px;
  background: rgba(6, 14, 6, 0.9);
  border: 1px solid rgba(127, 255, 0, 0.2);
  color: #7FFF00;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.panel-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Toast mushroom puffs */
.panel-toast::before,
.panel-toast::after {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 10px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease 0.1s;
}
.panel-toast::before { content: '\1F344'; left: 6px; }
.panel-toast::after { content: '\1F344'; right: 6px; }
.panel-toast.show::before,
.panel-toast.show::after { opacity: 0.6; }

/* Reduced motion: suppress panel mushroom animations */
@media (prefers-reduced-motion: reduce) {
  .panel-toggle:hover { text-shadow: none; }
  .panel-toast::before,
  .panel-toast::after { display: none; }
  .title::after { animation: none !important; opacity: 0.25; }
  .vignette::before,
  .vignette::after { animation: none !important; opacity: 0.10; }
  .back:hover::after { animation: none !important; opacity: 0.4; transform: translateY(-50%) rotate(0deg); }
}

/* ── Prev/Next navigation ── */
.panel-nav {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 199;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: panelNavIn 1s ease 1.5s forwards;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel.open ~ .panel-nav,
.panel-toggle.open ~ .panel-nav {
  right: 332px;
  top: 52px;
}

@keyframes panelNavIn {
  to { opacity: 1; }
}

.panel-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: rgba(6, 14, 6, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(127, 255, 0, 0.1);
  color: #7FFF00;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  opacity: 0.5;
}
.panel-nav-btn:hover {
  opacity: 1;
  background: rgba(127, 255, 0, 0.08);
  border-color: rgba(127, 255, 0, 0.25);
}

.panel-nav-indicator {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: #7FFF00;
  opacity: 0.4;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ── Effect page mushroom decorations ── */

/* Title mushroom — small SVG growing next to effect title */
.title::after {
  content: '';
  position: absolute;
  right: -28px;
  bottom: 0;
  width: 18px;
  height: 24px;
  pointer-events: none;
  opacity: 0;
  animation: titleMushroomIn 1s ease 2s forwards;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%237FFF00' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23556B2F' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23ADFF2F' opacity='0.5'/%3E%3Ccircle cx='25' cy='12' r='2' fill='%23ADFF2F' opacity='0.4'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 0 6px rgba(127, 255, 0, 0.3));
}

@keyframes titleMushroomIn {
  0% { opacity: 0; transform: scale(0.4) translateY(6px); }
  60% { opacity: 0.4; transform: scale(1.05) translateY(-1px); }
  100% { opacity: 0.35; transform: scale(1) translateY(0); }
}

/* Vignette corner mushrooms — subtle silhouettes in bottom corners */
.vignette::before,
.vignette::after {
  content: '';
  position: fixed;
  bottom: 8px;
  width: 60px;
  height: 40px;
  pointer-events: none;
  z-index: 6;
  animation: vignetteMushroomPulse 10s ease-in-out infinite;
}

.vignette::before {
  left: 10px;
  opacity: 0.12;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%237FFF00' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23556B2F' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23ADFF2F' opacity='0.5'/%3E%3C/svg%3E") no-repeat 0% 100% / 16px auto,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%239370DB' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23663399' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23DA70D6' opacity='0.5'/%3E%3C/svg%3E") no-repeat 70% 90% / 11px auto;
}

.vignette::after {
  right: 10px;
  opacity: 0.12;
  animation-delay: -5s;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%239370DB' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23663399' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23DA70D6' opacity='0.5'/%3E%3C/svg%3E") no-repeat 30% 100% / 14px auto,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%237FFF00' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23556B2F' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23ADFF2F' opacity='0.5'/%3E%3C/svg%3E") no-repeat 100% 85% / 10px auto;
}

@keyframes vignetteMushroomPulse {
  0%, 100% { opacity: 0.10; }
  50% { opacity: 0.15; }
}

/* Back link mushroom — tiny, appears on hover */
.back {
  position: relative;
}

.back::after {
  content: '';
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 12px;
  height: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50'%3E%3Cellipse cx='20' cy='20' rx='18' ry='16' fill='%237FFF00' opacity='0.9'/%3E%3Crect x='16' y='20' width='8' height='22' rx='3' fill='%23556B2F' opacity='0.8'/%3E%3Ccircle cx='13' cy='15' r='3' fill='%23ADFF2F' opacity='0.5'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 0 4px rgba(127, 255, 0, 0.3));
}

.back:hover::after {
  opacity: 0.6;
  animation: backMushroomWiggle 0.6s ease-in-out infinite;
}

@keyframes backMushroomWiggle {
  0%, 100% { transform: translateY(-50%) rotate(-10deg); }
  50% { transform: translateY(-50%) rotate(10deg); }
}

/* ── FPS counter ── */
.panel-fps {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(6, 14, 6, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(127, 255, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #7FFF00;
  opacity: 0.6;
  letter-spacing: 0.05em;
  pointer-events: none;
}

/* ── Recording indicator ── */
.recorder-indicator {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(40, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 68, 68, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  color: #ff4444;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.recorder-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4444;
  animation: recBlink 1s ease-in-out infinite;
}

/* ── Collab indicator ── */
.collab-indicator {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(20, 0, 40, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(147, 112, 219, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  color: #9370DB;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.collab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9370DB;
  animation: collabPulse 2s ease-in-out infinite;
}

@keyframes collabPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(147, 112, 219, 0.6); }
  50% { opacity: 0.4; box-shadow: 0 0 8px rgba(147, 112, 219, 0.3); }
}

/* Close button — hidden on desktop, shown on mobile */
.panel-close-btn { display: none; }

/* Backdrop overlay — hidden on desktop, active on mobile */
.panel-backdrop { display: none; }

/* ── Mobile breakpoint ── */
@media (max-width: 480px) {
  .panel {
    width: 100vw;
  }
  .panel-toggle {
    width: 44px;
    height: 44px;
    font-size: 20px;
    right: 8px;
    opacity: 0.85;
  }
  .panel-toggle.open {
    right: 100vw;
    opacity: 0;
    pointer-events: none;
  }
  .panel-close-btn {
    display: flex;
    font-size: 20px;
    opacity: 0.8;
  }
  .panel-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  .panel-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .panel-icon-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
  .panel-btn {
    min-height: 44px;
    font-size: 11px;
  }
  .panel-switch {
    width: 48px;
    height: 26px;
  }
  .panel-switch-knob {
    width: 22px;
    height: 22px;
  }
  .panel-switch input:checked ~ .panel-switch-knob {
    transform: translateX(22px);
  }
  .panel-switch-track {
    border-radius: 13px;
  }
  .panel-slider::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }
  .panel-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }
  .panel-row {
    min-height: 44px;
  }
  .panel-nav {
    right: 12px;
    top: auto;
    bottom: 12px;
  }
  .panel-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  /* Hide vignette corner mushrooms on mobile, shrink title mushroom */
  .vignette::before,
  .vignette::after { display: none; }
  .title::after { width: 14px; height: 18px; right: -20px; }
}
