:root {
  --wh-primary: #7c3aed;
  --wh-primary-hover: #6d28d9;
  --wh-bg-card: #ffffff;
  --wh-border: #e2e8f0;
  --wh-text-main: #0f172a;
  --wh-text-muted: #64748b;
  --wh-pill-bg: #f1f5f9;
  --wh-pill-hover: #e2e8f0;
  --wh-result-bg: #f8fafc;
  --wh-hl-bg: #f5f3ff;
  --wh-hl-border: #ddd6fe;
  --wh-hl-text: #6d28d9;
}

.wh-tool-container {
  max-width: 880px;
  margin: 0 auto 3rem auto;
  font-family: inherit;
  color: var(--wh-text-main);
}

.wh-editor-card {
  background: var(--wh-bg-card);
  border: 1px solid var(--wh-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wh-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--wh-border);
}

.wh-presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--wh-text-muted);
}

.wh-pill-btn {
  background: var(--wh-pill-bg);
  border: 1px solid var(--wh-border);
  color: var(--wh-text-main);
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wh-pill-btn:hover {
  background: var(--wh-pill-hover);
  border-color: var(--wh-primary);
}

/* Canvas Stage */
.wh-canvas-stage {
  position: relative;
  width: 380px;
  height: 380px;
  margin: 0 auto 1.5rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 420px) {
  .wh-canvas-stage {
    width: 290px;
    height: 290px;
  }
  .wh-canvas {
    width: 290px !important;
    height: 290px !important;
  }
}

.wh-pointer-arrow {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: #dc2626;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.wh-canvas {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.wh-center-spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--wh-primary);
  color: var(--wh-primary);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.wh-action-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.wh-primary-btn {
  flex: 2;
  background: var(--wh-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.wh-primary-btn:hover {
  background: var(--wh-primary-hover);
}

.wh-secondary-btn {
  background: var(--wh-pill-bg);
  color: var(--wh-text-main);
  border: 1px solid var(--wh-border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.wh-choices-box {
  background: var(--wh-pill-bg);
  border: 1px solid var(--wh-border);
  border-radius: 8px;
  padding: 1rem;
}

.wh-choices-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--wh-text-main);
}

.wh-req {
  color: #dc2626;
}

.wh-textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--wh-border);
  border-radius: 6px;
  background: var(--wh-bg-card);
  color: var(--wh-text-main);
  font-size: 0.9rem;
  box-sizing: border-box;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.wh-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wh-text-main);
  cursor: pointer;
}

.wh-results-card {
  background: var(--wh-result-bg);
  border: 1px solid var(--wh-border);
  border-radius: 12px;
  padding: 1.75rem;
}

.wh-winner-box {
  background: var(--wh-hl-bg);
  border: 1px solid var(--wh-hl-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.wh-winner-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--wh-hl-text);
  margin-bottom: 0.25rem;
  display: block;
}

.wh-winner-name {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--wh-hl-text);
  margin-bottom: 0.25rem;
}

.wh-winner-sub {
  font-size: 0.95rem;
  color: var(--wh-hl-text);
}

.wh-table-card {
  background: var(--wh-bg-card);
  border: 1px solid var(--wh-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.wh-sub-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--wh-text-main);
}

.wh-history-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wh-history-pill {
  background: var(--wh-pill-bg);
  border: 1px solid var(--wh-border);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wh-text-main);
}

.wh-empty-history {
  font-size: 0.85rem;
  color: var(--wh-text-muted);
}

.wh-tip-box {
  background: var(--wh-bg-card);
  border: 1px solid var(--wh-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.wh-tip-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--wh-primary);
}

.wh-tip-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--wh-text-muted);
  line-height: 1.5;
}

.wh-ad {
  overflow: hidden;
  min-height: 280px;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --wh-primary: #a281da;
  --wh-primary-hover: #a481da;
  --wh-bg-card: var(--tf-surface);
  --wh-border: var(--tf-surface);
  --wh-text-main: var(--tf-ink);
  --wh-text-muted: var(--tf-ink-faint);
  --wh-pill-bg: var(--tf-surface);
  --wh-pill-hover: var(--tf-surface);
  --wh-result-bg: var(--tf-surface);
  --wh-hl-bg: var(--tf-surface);
  --wh-hl-border: var(--tf-surface);
  --wh-hl-text: #a481da;
}
