#hl-traffic-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

#hl-traffic-overlay[hidden] {
  display: none;
}

.hl-traffic-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: hl-traffic-fade-in 0.25s ease-out;
}

.hl-traffic-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #0a1214;
  border: 1px solid rgba(151, 252, 228, 0.12);
  border-radius: 20px;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.5);
  padding: 36px 32px 28px;
  text-align: center;
  animation: hl-traffic-dialog-in 0.35s ease-out;
}

.hl-traffic-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(246, 254, 253, 0.1);
  border-radius: 8px;
  background: rgba(246, 254, 253, 0.04);
  color: rgba(246, 254, 253, 0.45);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hl-traffic-close:hover {
  color: #f6fefd;
  border-color: rgba(246, 254, 253, 0.2);
}

/* —— Init view header —— */
.hl-init-brand {
  display: block;
  width: auto;
  max-width: 100%;
  height: 30px;
  margin: 0 auto 20px;
}

.hl-init-brand--sm {
  height: 25px;
  margin-bottom: 16px;
}

.hl-init-heading {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: #f6fefd;
  letter-spacing: -0.01em;
}

.hl-init-tagline {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(246, 254, 253, 0.45);
}

.hl-init-session {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 6px 14px;
  border: 1px solid rgba(151, 252, 228, 0.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(151, 252, 228, 0.85);
  font-variant-numeric: tabular-nums;
}

.hl-init-session-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #97fce4;
  box-shadow: 0 0 8px rgba(151, 252, 228, 0.6);
}

/* —— Step timeline —— */
.hl-init-steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  text-align: left;
}

.hl-init-step {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding-bottom: 22px;
}

.hl-init-step:last-child {
  padding-bottom: 0;
}

.hl-init-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 1px;
  background: rgba(246, 254, 253, 0.12);
}

.hl-init-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(246, 254, 253, 0.15);
  background: rgba(246, 254, 253, 0.03);
  flex-shrink: 0;
}

.hl-init-step.is-done .hl-init-step-icon {
  border-color: rgba(151, 252, 228, 0.35);
  color: #97fce4;
}

.hl-init-step.is-active .hl-init-step-icon {
  border-color: rgba(151, 252, 228, 0.25);
}

.hl-init-step.is-error .hl-init-step-icon {
  border-color: rgba(234, 179, 8, 0.35);
  color: #fbbf24;
}

.hl-init-step.is-pending {
  display: none;
}

.hl-init-step-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(151, 252, 228, 0.2);
  border-top-color: #97fce4;
  border-radius: 50%;
  animation: hl-init-spin 0.75s linear infinite;
}

.hl-init-step-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #f6fefd;
  line-height: 1.35;
}

.hl-init-step-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(246, 254, 253, 0.4);
  font-variant-numeric: tabular-nums;
}

.hl-init-step-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(151, 252, 228, 0.12);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #97fce4;
}

/* —— Final notice + CTA —— */
.hl-init-notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(151, 252, 228, 0.2);
  border-radius: 12px;
  background: rgba(151, 252, 228, 0.04);
  font-size: 13px;
  line-height: 1.55;
  color: rgba(246, 254, 253, 0.65);
  text-align: left;
}

.hl-init-notice[hidden],
.hl-init-start[hidden],
.hl-verify-view[hidden],
.hl-init-view[hidden],
.hl-bind-view[hidden] {
  display: none;
}

.hl-traffic-dialog.hl-traffic-dialog--bind {
  max-width: 560px;
}

.hl-init-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: #97fce4;
  color: #04251f;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.hl-init-start:hover {
  filter: brightness(1.05);
}

.hl-init-start:active {
  transform: scale(0.98);
}

.hl-init-start svg {
  flex-shrink: 0;
}

/* —— Verify view (high traffic) —— */
.hl-verify-view {
  text-align: center;
}

.hl-verify-title {
  margin: 8px 0 16px;
  font-size: 20px;
  font-weight: 600;
  color: #f6fefd;
}

.hl-verify-body {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(246, 254, 253, 0.55);
}

.hl-verify-body strong {
  color: rgba(246, 254, 253, 0.85);
  font-weight: 600;
}

.hl-verify-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 24px;
  cursor: pointer;
  user-select: none;
}

.hl-verify-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #97fce4;
  cursor: pointer;
}

.hl-verify-remember span {
  font-size: 13px;
  color: rgba(246, 254, 253, 0.55);
}

.hl-verify-submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #97fce4;
  color: #04251f;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.hl-verify-submit:hover {
  filter: brightness(1.06);
}

.hl-verify-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

/* —— Manual binding view —— */
.hl-bind-view {
  text-align: center;
}

.hl-bind-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
}

.hl-bind-label {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(151, 252, 228, 0.12);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #97fce4;
}

.hl-bind-label--muted {
  background: transparent;
  padding: 0;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(246, 254, 253, 0.35);
}

.hl-bind-heading,
.hl-bind-device-line {
  text-align: left;
}

.hl-bind-heading {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  color: #f6fefd;
  letter-spacing: -0.01em;
}

.hl-bind-device-line {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(246, 254, 253, 0.5);
  white-space: nowrap;
}

.hl-bind-device-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  padding: 3px 10px 3px 8px;
  border: 1px solid rgba(246, 254, 253, 0.12);
  border-radius: 999px;
  background: rgba(246, 254, 253, 0.06);
  font-size: 13px;
  font-weight: 600;
  color: #f6fefd;
  vertical-align: middle;
}

.hl-bind-device-pill svg {
  display: block;
  flex-shrink: 0;
}

.hl-bind-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 0 24px;
  text-align: left;
}

.hl-bind-step {
  display: grid;
  grid-template-columns: 36px minmax(0, max-content);
  gap: 12px;
  align-items: center;
}

.hl-bind-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(151, 252, 228, 0.3);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #97fce4;
}

.hl-bind-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(246, 254, 253, 0.55);
  white-space: nowrap;
}

.hl-bind-text strong {
  font-weight: 600;
  color: rgba(246, 254, 253, 0.9);
}

.hl-bind-text kbd {
  display: inline-block;
  padding: 2px 5px;
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  color: #f6fefd;
  background: rgba(246, 254, 253, 0.08);
  border: 1px solid rgba(246, 254, 253, 0.14);
  border-radius: 5px;
  vertical-align: baseline;
}

.hl-bind-text .hl-bind-kbd-win {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 6px;
  vertical-align: middle;
}

.hl-bind-verify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: #97fce4;
  color: #04251f;
  font-size: 15px;
  font-weight: 600;
  cursor: default;
}

.hl-bind-verify:disabled,
.hl-bind-verify.is-verifying {
  opacity: 0.85;
}

.hl-bind-verify .hl-bind-verify-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(4, 37, 31, 0.2);
  border-top-color: #04251f;
  border-radius: 50%;
  animation: hl-init-spin 0.75s linear infinite;
}

@media (max-width: 600px) {
  .hl-bind-text,
  .hl-bind-device-line {
    white-space: normal;
  }
}

body.hl-traffic-open {
  overflow: hidden;
}

@keyframes hl-traffic-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hl-traffic-dialog-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes hl-init-spin {
  to {
    transform: rotate(360deg);
  }
}
