/* LONG HALOFLUX V2 START. HaloFlux / RYDER CODE / Ms MAIKEBAIs CAT. */
html.long-haloflux-active #long-haloflux {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: .82;
  contain: strict;
}
#long-haloflux canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 8%, rgba(0,0,0,.08) 30%, #000 64%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 8%, rgba(0,0,0,.08) 30%, #000 64%, #000 100%);
}
html.long-haloflux-active #particle-bg { display: none !important; }
html.long-haloflux-active #scroll-glass { opacity: 0 !important; backdrop-filter: none !important; }
#long-haloflux.long-haloflux-scan::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(8,5,8,.16) 3px 4px);
}
#long-haloflux-controls {
  position: fixed;
  right: max(86px, env(safe-area-inset-right, 0px));
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  z-index: 95;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 7px;
  border: 1px solid rgba(210,167,183,.20);
  border-radius: 24px;
  color: #d8c4cc;
  background: rgba(24,20,25,.64);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0,0,0,.10);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .04em;
}
#long-haloflux-toggle {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 11px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, transform 120ms cubic-bezier(.23,1,.32,1);
}
#long-haloflux-toggle::before {
  content: '';
  width: 7px;
  height: 7px;
  border: 1px solid #c78ca3;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(193,114,145,.20);
}
#long-haloflux-toggle[aria-pressed="false"]::before { border-color: #91838a; box-shadow: none; }
#long-haloflux-toggle:active { transform: scale(.97); }
#long-haloflux-toggle:focus-visible { outline: 2px solid #c78ca3; outline-offset: 2px; }
#long-haloflux-status { padding: 0 9px 0 2px; color: #a28f98; font-size: 10px; }
@media (hover:hover) and (pointer:fine) {
  #long-haloflux-toggle:hover { background: rgba(166,92,119,.12); }
}
@media (max-width:767px) {
  #long-haloflux canvas {
    mask-image: linear-gradient(180deg, transparent 28%, rgba(0,0,0,.12) 49%, #000 72%, #000 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 28%, rgba(0,0,0,.12) 49%, #000 72%, #000 100%);
  }
  #long-haloflux-controls {
    right: max(76px, env(safe-area-inset-right,0px));
    bottom: max(18px, env(safe-area-inset-bottom,0px));
    max-width: calc(100vw - 108px);
    padding: 0 3px;
  }
  #long-haloflux-status { padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #long-haloflux-toggle { transition: background-color 160ms ease; }
  #long-haloflux-toggle:active { transform: none; }
}
@media (max-width:400px) {
  #long-haloflux-status { display:none; }
  #long-haloflux-toggle { gap:7px;padding-inline:8px; }
}
/* LONG HALOFLUX V2 END */

/* LongHaloFlux tuning panel — scoped strictly to the gear button and its dialog. */
#long-haloflux-settings {
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid rgba(210, 167, 183, .18);
  border-radius: 0 18px 18px 0;
  background: transparent;
  color: #e7dce2;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
#long-haloflux-settings:focus-visible {
  outline: 2px solid #bc8098;
  outline-offset: 2px;
}
#long-haloflux-settings-dialog {
  box-sizing: border-box;
  width: min(520px, calc(100vw - 24px));
  max-height: min(84vh, 900px);
  max-height: min(84dvh, 900px);
  padding: 0;
  border: 1px solid rgba(210, 167, 183, .18);
  border-radius: 14px;
  background: #181419;
  color: #e7dce2;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#long-haloflux-settings-dialog::backdrop { background: rgba(12, 8, 11, .6); }
#long-haloflux-settings-dialog[open][data-motion="pointer"] { animation: lh-tune-in 140ms cubic-bezier(.23,1,.32,1); }
@keyframes lh-tune-in { from { opacity: 0; } to { opacity: 1; } }
#long-haloflux-settings-dialog .lh-tune-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  background: #181419;
  border-bottom: 1px solid rgba(210, 167, 183, .18);
}
#long-haloflux-settings-dialog h2 { margin: 0; font-size: 16px; font-weight: 600; color:#e7dce2 !important; text-shadow:none; }
#long-haloflux-settings-dialog .lh-tune-sub { margin: 2px 0 0; font-size: 12px; color: rgba(231, 220, 226, .6); }
#long-haloflux-settings-dialog button {
  box-sizing: border-box;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid rgba(210, 167, 183, .18);
  border-radius: 10px;
  background: #221a20;
  color: #e7dce2;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
#long-haloflux-settings-dialog .lh-tune-close { min-width: 44px; flex: 0 0 auto; font-size: 15px; }
#long-haloflux-settings-dialog .lh-tune-presets,
#long-haloflux-settings-dialog .lh-tune-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 0;
}
#long-haloflux-settings-dialog .lh-tune-preset { flex: 1 1 auto; border-color: rgba(188, 128, 152, .45); color: #bc8098; }
#long-haloflux-settings-dialog .lh-tune-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
#long-haloflux-settings-dialog .lh-tune-groups { padding: 6px 14px calc(14px + env(safe-area-inset-bottom)); }
#long-haloflux-settings-dialog .lh-tune-group { border-top: 1px solid rgba(210, 167, 183, .18); }
#long-haloflux-settings-dialog summary { padding: 13px 0; font-size: 14px; color: #bc8098; cursor: pointer; }
#long-haloflux-settings-dialog .lh-tune-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
#long-haloflux-settings-dialog .lh-tune-row > label { flex: 0 0 45%; font-size: 12.5px; color: rgba(231, 220, 226, .85); }
#long-haloflux-settings-dialog input[type="range"] {
  flex: 1 1 60px;
  min-width: 48px;
  height: 30px;
  margin: 0;
  accent-color: #bc8098;
}
#long-haloflux-settings-dialog input[type="number"] {
  box-sizing: border-box;
  flex: 0 0 62px;
  width: 62px;
  min-width: 0;
  height: 34px;
  padding: 2px 4px;
  border: 1px solid rgba(210, 167, 183, .18);
  border-radius: 8px;
  background: #221a20;
  color: #e7dce2;
  font: inherit;
  font-size: 14px;
  text-align: right;
}
#long-haloflux-settings-dialog .lh-tune-status {
  margin: 0;
  min-height: 18px;
  padding: 0 14px calc(12px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: #bc8098;
}
@media (pointer: coarse) {
  #long-haloflux-settings-dialog input[type="number"] { font-size: 16px; height: 40px; }
  #long-haloflux-settings-dialog input[type="range"] { height: 36px; }
}
@media (hover: hover) and (pointer: fine) {
  #long-haloflux-settings:hover,
  #long-haloflux-settings-dialog button:hover { border-color: #bc8098; }
}
@media (prefers-reduced-motion: reduce) {
  #long-haloflux-settings-dialog[open] { animation: none; }
}
