.tt-web-shell {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
}

.tt-web-highlight {
  position: fixed;
  display: none;
  border: 3px solid #7c6cff;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.88), 0 0 0 8px rgba(18, 16, 35, 0.68);
  pointer-events: none;
}

.tt-web-drawer {
  position: fixed;
  left: 16px;
  top: 16px;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 14px;
  color: #f7f5ff;
  background: rgba(18, 16, 35, 0.96);
  border: 1px solid rgba(181, 173, 255, 0.52);
  border-radius: 14px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.44);
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  pointer-events: auto;
}

.tt-web-handle,
.tt-web-result,
.tt-web-secondary,
.tt-web-note {
  font: inherit;
}

.tt-web-handle {
  width: 100%;
  margin: -4px 0 10px;
  padding: 6px 8px;
  color: #bbb4ff;
  background: transparent;
  border: 0;
  cursor: grab;
  touch-action: none;
}

.tt-web-code {
  color: #bbb4ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.tt-web-title {
  margin: 4px 0 8px;
  color: #fff;
  font: 700 17px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tt-web-instruction,
.tt-web-expected {
  margin: 0 0 9px;
}

.tt-web-expected {
  color: #d1cde8;
  font-size: 12px;
}

.tt-web-note {
  display: block;
  width: 100%;
  min-height: 54px;
  margin: 10px 0;
  padding: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  resize: vertical;
}

.tt-web-results,
.tt-web-footer {
  display: flex;
  gap: 7px;
}

.tt-web-result,
.tt-web-secondary {
  min-height: 36px;
  padding: 7px 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
}

.tt-web-result {
  flex: 1;
  font-weight: 700;
}

.tt-web-result-pass { border-color: rgba(34, 197, 94, 0.62); }
.tt-web-result-fail { border-color: rgba(239, 68, 68, 0.68); }
.tt-web-result-skip { border-color: rgba(245, 158, 11, 0.62); }

.tt-web-footer {
  justify-content: space-between;
  margin-top: 10px;
}

.tt-web-secondary {
  color: #d1cde8;
  font-size: 11px;
}

.tt-web-drawer.is-collapsed {
  width: 132px;
  min-height: 42px;
  padding: 8px;
  overflow: hidden;
}

.tt-web-drawer.is-collapsed > :not(.tt-web-handle) {
  display: none;
}

.tt-web-drawer.is-collapsed .tt-web-handle {
  margin: 0;
}

.tt-web-drawer.is-complete .tt-web-note,
.tt-web-drawer.is-complete .tt-web-results {
  display: none;
}

.tt-web-drawer.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 28%, rgba(255,255,255,0.1) 45%, transparent 62%);
  background-size: 220% 100%;
  animation: tt-web-shimmer 1.15s linear infinite;
}

@media (prefers-reduced-motion: no-preference) {
  .tt-web-highlight {
    animation: tt-web-pulse 1.35s ease-in-out infinite;
  }
}

@keyframes tt-web-pulse {
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.94), 0 0 0 11px rgba(124, 108, 255, 0.55); }
}

@keyframes tt-web-shimmer {
  to { background-position: -220% 0; }
}
