.gui-scope {
  --accent: #0073ff;
  --accent-strong: #2389ff;
  --accent-soft: rgba(0, 115, 255, 0.12);
  --bg: #05070d;
  --bg-elevated: #0a0e18;
  --surface: #0d1320;
  --surface-hover: #121a2b;
  --card: #0d111d;
  --border: #182238;
  --border-strong: #24324e;
  --text: #e8ecf4;
  --text-sub: #9aa3b8;
  --text-dim: #787d91;
  --text-muted: #545b6e;
  --success: #38d6ff;
  --danger: #f03c46;
  --radius: 10px;
  --container: 1240px;
  --rail-w: 64px;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --fast: 140ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --normal: 220ms cubic-bezier(0.22, 1, 0.36, 1);
  --smooth: 350ms cubic-bezier(0.22, 1, 0.36, 1);
  --bounce: 450ms cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}
.gui-scope .quail-window { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); text-align: left; }
.gui-scope .quail-window button, .gui-scope .quail-window input { font-family: inherit; }
.gui-scope .quail-stage {
  position: relative;
  display: grid;
  place-items: center;
}
.gui-scope .quail-window {
  --top-h: 42px;
  --side-w: 44px;
  position: relative;
  width: min(100%, 700px);
  height: 515px;
  overflow: hidden;
  contain: layout paint style;
  border: 1px solid rgba(36, 50, 78, 0.85);
  border-radius: 12px;
  background:
    linear-gradient(140deg, rgba(13, 17, 28, 0.72), rgba(3, 4, 9, 0.97)),
    var(--bg);
  box-shadow:
    0 30px 120px rgba(0, 0, 0, 0.56),
    0 0 62px rgba(0, 115, 255, 0.14);
  opacity: 0;
  transform: perspective(1400px) rotateX(9deg) translateY(54px) scale(0.95);
  will-change: transform;
}
.gui-scope .quail-window.in-view {
  opacity: 1;
  transform: perspective(1400px) rotateX(0deg) translateY(0) scale(1);
}
.gui-scope .quail-window::before,
.gui-scope .quail-window::after,
.gui-scope .window-glow {
  position: absolute;
  content: "";
  pointer-events: none;
}
.gui-scope .quail-window::before {
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(112deg, rgba(0, 115, 255, 0.11), rgba(8, 10, 17, 0.08) 48%, rgba(3, 4, 9, 0.16)),
    radial-gradient(circle at 15% 2%, rgba(45, 155, 255, 0.18), transparent 34%);
  opacity: 0.68;
  transition: opacity var(--fast);
}
.gui-scope .quail-window::after {
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.13;
}
.gui-scope .window-glow {
  inset: -28%;
  z-index: 0;
  opacity: 0.72;
  background:
    radial-gradient(circle at 20% 8%, rgba(0, 115, 255, 0.28), transparent 22%),
    linear-gradient(110deg, transparent 20%, rgba(0, 115, 255, 0.08) 50%, transparent 78%);
  animation: liquidSweep 7s ease-in-out infinite alternate;
}
.gui-scope .quail-window {
  transition:
    opacity 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color var(--normal),
    box-shadow var(--normal);
}
.gui-scope .quail-window:hover,
.gui-scope .quail-window:focus-within {
  border-color: rgba(45, 155, 255, 0.55);
  box-shadow:
    0 34px 130px rgba(0, 0, 0, 0.6),
    0 0 76px rgba(0, 115, 255, 0.22);
}
.gui-scope .quail-window:hover::before,
.gui-scope .quail-window:focus-within::before {
  opacity: 0.95;
}
.gui-scope .quail-topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--top-h);
  padding: 0 10px 0 14px;
  background: rgba(8, 10, 17, 0.7);
  border-bottom: 1px solid rgba(24, 38, 64, 0.42);
  cursor: grab;
}
.gui-scope .topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  margin-right: auto;
}
.gui-scope .topbar-title img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.gui-scope .topbar-title strong,
.gui-scope .topbar-title span {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gui-scope .topbar-title strong {
  color: var(--text);
  font-size: 13px;
}
.gui-scope .topbar-title span {
  color: var(--text-muted);
  font-size: 10px;
}
.gui-scope .search-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  width: 180px;
  height: 24px;
  overflow: hidden;
  border: 1px solid rgba(24, 38, 64, 0.55);
  border-radius: 7px;
  background: rgba(13, 17, 28, 0.88);
  transition: border-color var(--fast), transform var(--fast), background var(--fast);
}
.gui-scope .search-frame:focus-within {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.gui-scope .search-frame input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 0 0 10px;
  color: var(--text);
  font-size: 11px;
}
.gui-scope .search-frame button {
  display: none;
  width: 22px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.gui-scope .search-frame.has-value button {
  display: block;
}
.gui-scope .live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(56, 214, 255, 0.12);
  color: var(--success);
  font-size: 10px;
  font-weight: 800;
}
.gui-scope .live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  --pulse: 56, 214, 255;
  animation: pulse 1.8s ease-in-out infinite;
}
.gui-scope .icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: rgba(13, 17, 28, 0.72);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  transition: transform var(--fast), background var(--fast), color var(--fast);
}
.gui-scope .icon-button:hover,
.gui-scope .icon-button:focus-visible,
.gui-scope .icon-button.is-hovered {
  transform: translateY(-1px);
  background: rgba(20, 28, 45, 0.95);
  color: var(--text);
}
.gui-scope .close-button {
  background: rgba(240, 60, 70, 0.12);
  color: var(--danger);
}
.gui-scope .quail-sidebar {
  position: absolute;
  left: 0;
  top: calc(var(--top-h) + 1px);
  bottom: 0;
  z-index: 4;
  width: var(--side-w);
  overflow: hidden;
  padding: 6px 4px;
  background: rgba(8, 10, 17, 0.68);
  border-right: 1px solid rgba(24, 38, 64, 0.34);
  box-shadow: inset -1px 0 0 rgba(35, 62, 104, 0.1);
  transition: width var(--smooth), border-color var(--smooth), box-shadow var(--smooth);
  backdrop-filter: blur(14px);
}
.gui-scope .quail-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(104deg, rgba(0, 115, 255, 0.085), rgba(13, 17, 28, 0.24) 30%, rgba(8, 10, 17, 0.22) 68%, rgba(0, 0, 0, 0.085));
  opacity: 0.82;
}
.gui-scope .quail-window.sidebar-expanded .quail-sidebar {
  width: 140px;
  border-right-color: rgba(35, 62, 104, 0.44);
  box-shadow: inset -1px 0 0 rgba(0, 115, 255, 0.12), 14px 0 30px rgba(0, 0, 0, 0.12);
}
.gui-scope .tab-button {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  justify-items: start;
  width: 36px;
  height: 34px;
  margin-bottom: 3px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  overflow: hidden;
  transition: width var(--smooth), color var(--fast);
}
.gui-scope .quail-window.sidebar-expanded .tab-button {
  width: 132px;
}
.gui-scope .tab-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
  transition: background var(--fast), border-color var(--fast), opacity var(--fast), transform var(--fast);
}
.gui-scope .tab-button:hover,
.gui-scope .tab-button.is-hovered {
  color: var(--text-sub);
}
.gui-scope .tab-button:hover::before,
.gui-scope .tab-button.is-hovered::before {
  background: rgba(20, 28, 45, 0.50);
  border-color: rgba(35, 62, 104, 0.36);
  transform: scale(1.012);
}
.gui-scope .tab-button.active {
  color: var(--accent);
}
.gui-scope .tab-button.active::before {
  background: rgba(20, 28, 45, 0.78);
  border-color: rgba(0, 115, 255, 0.24);
}
.gui-scope .tab-button.is-pressed::before {
  transform: scale(0.957);
}
.gui-scope .tab-glyph {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  justify-self: start;
  width: 36px;
  height: 100%;
  min-width: 36px;
  padding: 0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  transform: translateZ(0);
}
.gui-scope .tab-name {
  position: relative;
  z-index: 1;
  opacity: 0;
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  transform: translateX(-6px);
  transition: opacity var(--normal), transform var(--normal);
}
.gui-scope .quail-window.sidebar-expanded .tab-name {
  opacity: 1;
  transform: translateX(0);
}
.gui-scope .quail-content {
  position: absolute;
  z-index: 3;
  left: calc(var(--side-w) + 1px);
  right: 0;
  top: calc(var(--top-h) + 1px);
  bottom: 0;
  overflow: hidden;
  transition: left var(--smooth);
}
.gui-scope .quail-window.sidebar-expanded .quail-content {
  left: 141px;
}
.gui-scope .tab-panel,
.gui-scope .search-results {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 18px 14px 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--normal), transform var(--normal);
}
.gui-scope .tab-panel.active,
.gui-scope .search-results.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.gui-scope .column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.gui-scope .group-card {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(21, 35, 62, 0.64);
  border-radius: 10px;
  background:
    linear-gradient(150deg, rgba(16, 22, 36, 0.34), rgba(9, 12, 21, 0.92)),
    var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.gui-scope .group-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(0, 115, 255, 0.08), rgba(16, 22, 36, 0.16) 28%, rgba(9, 12, 21, 0.22) 70%, rgba(0, 0, 0, 0.09));
  opacity: 0.72;
}
.gui-scope .group-card.wide {
  grid-column: 1 / -1;
}
.gui-scope .group-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 900;
}
.gui-scope .group-head i {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
}
.gui-scope .element-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 10px 10px;
}
.gui-scope .gui-row,
.gui-scope .gui-button {
  position: relative;
  overflow: hidden;
  min-height: 28px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  font-size: 12px;
}
.gui-scope .gui-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
}
.gui-scope .gui-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gui-scope .toggle-row {
  padding-right: 42px;
  cursor: pointer;
}
.gui-scope .toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.gui-scope .toggle-row b {
  position: absolute;
  right: 0;
  top: 50%;
  width: 32px;
  height: 16px;
  border: 1px solid rgba(35, 62, 104, 0.82);
  border-radius: 999px;
  background: #181e30;
  transform: translateY(-50%);
  transition: background var(--smooth), border-color var(--smooth), transform var(--fast);
}
.gui-scope .toggle-row b::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  transition: transform var(--smooth), background var(--smooth), width var(--fast), height var(--fast);
}
.gui-scope .toggle-row input:checked + b {
  border-color: rgba(0, 115, 255, 0.8);
  background: var(--accent);
}
.gui-scope .toggle-row input:checked + b::after {
  transform: translateX(16px);
}
.gui-scope .toggle-row:hover b,
.gui-scope .toggle-row.is-hovered b {
  transform: translateY(-50%) scale(1.045);
}
.gui-scope .toggle-row.is-pressed b {
  transform: translateY(-50%) scale(0.96);
}
.gui-scope .toggle-row.just-toggled b::after {
  width: 12px;
  height: 12px;
}
.gui-scope .slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 18px 12px;
  column-gap: 8px;
  min-height: 34px;
}
.gui-scope .slider-row output {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}
.gui-scope .slider-row input {
  grid-column: 1 / -1;
  width: 100%;
  appearance: none;
  height: 5px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 35%), #181e30 var(--fill, 35%));
  outline: none;
}
.gui-scope .slider-row input::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 115, 255, 0.4);
  transition: transform var(--fast), box-shadow var(--fast);
}
.gui-scope .slider-row input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}
.gui-scope .slider-row input:hover::-webkit-slider-thumb,
.gui-scope .slider-row.is-sliding input::-webkit-slider-thumb {
  transform: scale(1.10);
  box-shadow: 0 0 0 5px rgba(0, 115, 255, 0.16);
}
.gui-scope .gui-button,
.gui-scope .keybind-row button,
.gui-scope .dropdown-trigger,
.gui-scope .textbox-row input {
  min-height: 28px;
  border: 1px solid rgba(35, 62, 104, 0.26);
  border-radius: 7px;
  background: rgba(13, 17, 28, 0.72);
  color: var(--text);
  font-size: 12px;
  transform: scale(1);
  transition: transform var(--fast), border-color var(--fast), background var(--fast), color var(--fast);
}
.gui-scope .gui-button,
.gui-scope .keybind-row button,
.gui-scope .dropdown-trigger {
  cursor: pointer;
}
.gui-scope .gui-button:hover,
.gui-scope .keybind-row button:hover,
.gui-scope .dropdown-trigger:hover,
.gui-scope .textbox-row:focus-within input,
.gui-scope .gui-button.is-hovered,
.gui-scope .keybind-row button.is-hovered,
.gui-scope .dropdown-trigger.is-hovered {
  border-color: rgba(35, 62, 104, 0.42);
  background: rgba(20, 28, 45, 0.78);
  transform: translateY(-1px);
}
.gui-scope .gui-button.is-pressed,
.gui-scope .keybind-row button.is-pressed,
.gui-scope .dropdown-trigger.is-pressed,
.gui-scope .icon-button.is-pressed {
  transform: scale(0.951);
}
.gui-scope .gui-button.is-pressed {
  border-color: rgba(0, 115, 255, 0.34);
  background: rgba(0, 115, 255, 0.22);
}
.gui-scope .gui-ripple {
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 84%, white 16%);
  opacity: 0.28;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: ripple 380ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.gui-scope .keybind-row {
  justify-content: space-between;
}
.gui-scope .keybind-row button,
.gui-scope .textbox-row input {
  min-width: 44px;
  min-height: 20px;
  padding: 0 8px;
  color: var(--text-sub);
  font-size: 9px;
}
.gui-scope .textbox-row {
  justify-content: space-between;
}
.gui-scope .textbox-row input {
  width: 88px;
  outline: 0;
}
.gui-scope .color-row,
.gui-scope .list-row {
  justify-content: space-between;
}
.gui-scope .color-chip {
  width: 34px;
  height: 20px;
  border: 1px solid rgba(35, 62, 104, 0.26);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(0, 115, 255, 0.95), rgba(45, 155, 255, 0.55)),
    var(--accent);
  cursor: pointer;
  transition: transform var(--fast), border-color var(--fast), box-shadow var(--fast);
}
.gui-scope .color-chip:hover,
.gui-scope .color-chip.is-hovered {
  border-color: rgba(35, 62, 104, 0.42);
  box-shadow: 0 0 0 4px rgba(0, 115, 255, 0.08);
  transform: scale(1.06);
}
.gui-scope .list-row small {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border: 1px solid rgba(35, 62, 104, 0.52);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 800;
}
.gui-scope .items-empty-slot {
  min-height: 118px;
  border: 1px solid rgba(35, 62, 104, 0.18);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(0, 115, 255, 0.035), transparent 42%),
    rgba(3, 5, 11, 0.28);
}
.gui-scope .dropdown-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  min-height: 42px;
}
.gui-scope .dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 24px;
  padding: 0 8px;
  color: var(--text-sub);
  text-align: left;
}
.gui-scope .dropdown-trigger em {
  font-style: normal;
  transition: transform var(--smooth);
}
.gui-scope .dropdown-row.open .dropdown-trigger em {
  transform: rotate(180deg);
}
.gui-scope .dropdown-menu {
  display: grid;
  gap: 1px;
  max-height: 0;
  overflow: hidden;
  border: 0 solid transparent;
  border-radius: 9px;
  background: rgba(8, 10, 17, 0.98);
  transition: max-height var(--smooth), border-color var(--smooth), opacity var(--fast), transform var(--fast);
  opacity: 0;
  transform: translateY(-4px);
}
.gui-scope .dropdown-row.open .dropdown-menu {
  max-height: 92px;
  border: 1px solid rgba(35, 62, 104, 0.58);
  opacity: 1;
  transform: translateY(0);
}
.gui-scope .dropdown-menu button {
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  padding: 0 8px;
  font-size: 11px;
}
.gui-scope .dropdown-menu button:hover {
  color: var(--accent);
  background: rgba(20, 28, 45, 0.72);
}
@keyframes liquidSweep {
  from {
    transform: translate3d(-4%, -2%, 0) rotate(-5deg);
  }
  to {
    transform: translate3d(5%, 4%, 0) rotate(6deg);
  }
}
@keyframes ripple {
  to {
    width: var(--ripple-size, 160px);
    height: var(--ripple-size, 160px);
    opacity: 0;
  }
}
@media (max-width: 760px) {
  .gui-scope .quail-window {
    --top-h: 50px;
    --side-w: 52px;
    width: min(100%, 700px);
    height: 570px;
    transform-origin: top center;
  }
  .gui-scope .quail-topbar {
    height: 50px;
    flex-wrap: wrap;
    align-content: center;
  }
  .gui-scope .topbar-title {
    min-width: 142px;
  }
  .gui-scope .topbar-title strong {
    font-size: 12px;
  }
  .gui-scope .search-frame,
.gui-scope .live-badge {
    display: none;
  }
  .gui-scope .quail-sidebar {
    width: 52px;
  }
  .gui-scope .quail-window.sidebar-expanded .quail-sidebar,
.gui-scope .quail-sidebar:hover {
    width: 52px;
  }
  .gui-scope .quail-window.sidebar-expanded .quail-content,
.gui-scope .quail-sidebar:hover + .quail-content {
    left: 53px;
  }
  .gui-scope .tab-button {
    grid-template-columns: 44px 1fr;
    width: 44px;
    height: 42px;
    padding: 0;
  }
  .gui-scope .quail-window.sidebar-expanded .tab-button {
    width: 44px;
  }
  .gui-scope .tab-glyph {
    width: 44px;
    min-width: 44px;
    font-size: 15px;
  }
  .gui-scope .tab-name {
    display: none;
  }
  .gui-scope .tab-panel,
.gui-scope .search-results {
    grid-template-columns: 1fr;
    padding-right: 12px;
  }
}
@media (max-width: 520px) {
  .gui-scope .quail-window {
    height: 620px;
  }
  .gui-scope .topbar-title span {
    max-width: 110px;
  }
  .gui-scope .minimize-button {
    display: none;
  }
}
