
.sw[hidden] { display: none; }

.sw {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: var(--z-devtools);
  font-family: var(--f-main);
  color-scheme: dark;
}

.sw__handle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 10px 14px;
  background: #16171A;
  border: 1px solid #34363B;
  border-radius: 999px;
  color: #E8E9EB;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.sw__handle:hover { border-color: #55585F; background: #1D1F23; }

.sw__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-accent, #E8A72E);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent, #E8A72E) 25%, transparent);
}

.sw__body {
  width: min(92vw, 310px);
  margin-top: 10px;
  padding: 14px;
  background: #16171A;
  border: 1px solid #34363B;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  max-height: min(72vh, 620px);
  overflow-y: auto;
}

.sw__hint {
  font-size: 11px;
  line-height: 1.45;
  color: #7B7F87;
  margin-bottom: 14px;
}

.sw__group + .sw__group { margin-top: 16px; }

.sw__title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8B8F97;
  margin-bottom: 8px;
}

.sw__list { display: grid; gap: 6px; }

.sw__item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  background: #1C1E22;
  border: 1px solid #2C2E34;
  border-radius: 8px;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.sw__item:hover { border-color: #4A4D55; background: #212429; }

.sw__item.is-on {
  border-color: var(--c-accent, #E8A72E);
  background: color-mix(in srgb, var(--c-accent, #E8A72E) 12%, #1C1E22);
}

.sw__item--pal {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.sw__sw {
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.sw__name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #EDEEF0;
  line-height: 1.3;
}

/* Брендовий пункт: золота рамка і бейдж */
.sw__item--brand {
  border-color: color-mix(in srgb, #E8A72D 70%, #2C2E34);
  background: color-mix(in srgb, #E8A72D 9%, #1C1E22);
}

.sw__item--brand:hover {
  border-color: #E8A72D;
  background: color-mix(in srgb, #E8A72D 14%, #1C1E22);
}

.sw__item--brand.is-on {
  border-color: #F3D494;
  background: color-mix(in srgb, #E8A72D 24%, #1C1E22);
  box-shadow: 0 0 0 1px #E8A72D;
}

.sw__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px 1px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #05070A;
  background: #E8A72D;
  border-radius: 3px;
  vertical-align: 2px;
}

.sw__note {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: #808590;
  margin-top: 2px;
}

@media print { .sw { display: none; } }

/* Нижня панель дій перекриває низ екрана — ручка їде вище неї. */
@media (max-width: 1080px) {
  .sw {
    bottom: calc(16px + var(--mbar-h, 0px));
    transition: bottom var(--d-base) var(--e-out);
  }
}
