html body #penlight-debug-slot { grid-column: 1 / -1; min-width: 0; width: 100%; }
html body #penlight-debug-slot #mikupass-penlight-dock-v4 {
  position: relative !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  pointer-events: auto !important;
}
html body #penlight-debug-slot #mikupass-penlight-dock-v4 .mpd-launcher {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  min-height: 38px !important;
  border-radius: 10px !important;
  padding: 7px 12px !important;
  writing-mode: horizontal-tb !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
}
html body #penlight-debug-slot #mikupass-penlight-dock-v4 .mpd-drawer {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: min(340px, 46dvh) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
html body #penlight-debug-slot #mikupass-penlight-dock-v4 .mpd-layout { display: none !important; }
html body #penlight-debug-slot #mikupass-penlight-dock-v4 .mpd-tabs { flex-wrap: wrap !important; }
html body #penlight-debug-slot #mikupass-penlight-dock-v4 .mpd-tabs button { min-width: 54px !important; }
html body #penlight-debug-slot #mikupass-penlight-dock-v4 .mpd-header { padding: 10px 10px 8px !important; }
html body #penlight-debug-slot #mikupass-penlight-dock-v4 .mpd-title { font-size: 14px !important; }
html body #penlight-debug-slot #mikupass-penlight-dock-v4 .mpd-close { padding: 5px 8px !important; font-size: 12px !important; }
#penlight-theme-controls {
  position: fixed;
  z-index: 10001;
  left: 50%;
  bottom: var(--ir-dock-bottom, 108px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: min(340px, calc(100vw - 24px));
  padding: 4px 7px;
  border: 1px solid var(--ir-edge, #337391);
  border-radius: 12px;
  background: #0b2133ef;
  color: var(--ir-text, #edf4fa);
  box-shadow: 0 4px 20px #0007;
  pointer-events: auto;
}
html body #penlight-theme-heading { grid-column: 1 !important; grid-row: 1; color: var(--ir-blue, #66ccff); font-size: 10px; font-weight: 600; white-space: nowrap; }
html body #penlight-theme-controls .glowstick-theme-row { grid-column: 2 !important; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-width: 0; gap: 5px; }
html body #penlight-theme-controls #glowstick-themes { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; align-items: center; min-width: 0; gap: 3px; padding: 0; border: 0; background: transparent; box-shadow: none; }
html body #penlight-theme-controls #glowstick-themes strong { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; font-size: 12px; white-space: nowrap; }
html body #penlight-theme-controls button { min-height: 32px !important; height: 32px !important; padding: 0 7px !important; border-radius: 8px !important; font-size: 11px !important; }
html body #penlight-theme-controls [data-glow-theme-step] { min-width: 30px; padding: 0 !important; font-size: 20px !important; }
#penlight-theme-controls #glowstick-theme-status { grid-column: 1 / -1; font-size: 10px; line-height: 1.3; color: var(--ir-muted, #a8b6c5); }
html body #glowstick-actions.mpd-v4-actions,
html body #glowstick-actions.mpd-v4-actions.mpd-v4-bottom-closed {
  bottom: calc(var(--ir-dock-bottom, 108px) + var(--ir-theme-height, 0px) + 6px) !important;
  gap: 4px !important;
  padding: 4px 5px !important;
  flex-wrap: nowrap !important;
  max-width: calc(100vw - 16px) !important;
  border-radius: 12px !important;
}
html body #glowstick-actions.mpd-v4-actions [data-glow-action],
html body #glowstick-actions.mpd-v4-actions > .mpd-hide-actions {
  width: 42px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 3px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}
html body #glowstick-actions.mpd-v4-actions > .mpd-hide-actions { width: 24px !important; }
html body #glowstick-actions.mpd-v4-actions #glowstick-help { min-height: 32px !important; }
@media(max-height: 450px) and (min-width: 640px) {
  #penlight-theme-controls { width: 300px; left: auto; right: 12px; transform: none; }
  html body #glowstick-actions.mpd-v4-actions,
  html body #glowstick-actions.mpd-v4-actions.mpd-v4-bottom-closed { left: 12px !important; bottom: var(--ir-dock-bottom, 108px) !important; transform: none !important; }
}

html body #glowstick-actions.mpd-v4-actions.ir-draggable-actions {
  z-index: 10002 !important;
  gap: 3px !important;
  padding: 4px !important;
  max-width: calc(100vw - 16px) !important;
  border-radius: 11px !important;
  user-select: none;
  touch-action: none;
}
html body #glowstick-actions.mpd-v4-actions.ir-draggable-actions [data-glow-action] {
  width: 40px !important;
  height: 32px !important;
  min-height: 32px !important;
  font-size: 11px !important;
  padding: 0 2px !important;
}
html body #glowstick-actions.mpd-v4-actions.ir-draggable-actions #glowstick-help {
  width: 30px !important;
  min-width: 30px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
}
html body #glowstick-actions.mpd-v4-actions.ir-draggable-actions #glowstick-actions-drag {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 24px !important;
  min-width: 24px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #66ccff !important;
  cursor: grab;
  touch-action: none;
}
#glowstick-actions-drag svg { width: 12px; height: 20px; pointer-events: none; }
#glowstick-actions[data-ir-dragging="true"] #glowstick-actions-drag { cursor: grabbing; }
html body #glowstick-actions.mpd-v4-actions.ir-draggable-actions[data-ir-floating="true"] {
  left: var(--ir-actions-left) !important;
  top: var(--ir-actions-top) !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
}
@media (max-width: 640px), (max-height: 450px) {
  body.seat-view-mode { --ir-dock-bottom: calc(var(--ir-seat-height, 68px) + max(8px, env(safe-area-inset-bottom, 0px)) + 6px); }
  html body.seat-view-mode #selection.venue-seat-tools-ready {
    bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
    padding: 6px 8px !important;
    border-radius: 11px !important;
  }
  html body.seat-view-mode #selection.venue-seat-tools-ready > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
  }
  html body.seat-view-mode #selection #seat-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px !important;
    line-height: 16px !important;
  }
  html body.seat-view-mode #selection #seat-detail { display: inline !important; flex-shrink: 0; font-size: 11px !important; line-height: 16px !important; }
  html body.seat-view-mode #selection.venue-seat-tools-ready .selection-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }
  html body.seat-view-mode #selection.venue-seat-tools-ready .selection-actions button {
    min-width: 0 !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 7px !important;
  }
  html body #glowstick-actions.mpd-v4-actions.ir-draggable-actions [data-glow-action] { width: 36px !important; }
}
