:root {
  --enc-primary: #4f46e5;
  --enc-primary-hover: #4338ca;
  --enc-bg-card: #ffffff;
  --enc-border: #e2e8f0;
  --enc-text-main: #0f172a;
  --enc-text-muted: #64748b;
  --enc-pill-bg: #f1f5f9;
  --enc-pill-hover: #e2e8f0;
  --enc-result-bg: #f8fafc;
}

.enc-tool-container {
  max-width: 880px;
  margin: 0 auto 3rem auto;
  font-family: inherit;
  color: var(--enc-text-main);
}

.enc-editor-card {
  background: var(--enc-bg-card);
  border: 1px solid var(--enc-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.enc-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(--enc-border);
}

.enc-presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--enc-text-muted);
}

.enc-pill-btn {
  background: var(--enc-pill-bg);
  border: 1px solid var(--enc-border);
  color: var(--enc-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;
}

.enc-pill-btn:hover {
  background: var(--enc-pill-hover);
  border-color: var(--enc-primary);
}

.enc-field {
  margin-bottom: 1.25rem;
}

.enc-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.enc-field-header label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--enc-text-main);
}

.enc-req {
  color: #dc2626;
}

.enc-stats {
  font-size: 0.75rem;
  color: var(--enc-text-muted);
}

.enc-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--enc-border);
  border-radius: 8px;
  background: var(--enc-bg-card);
  color: var(--enc-text-main);
  font-size: 0.95rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-sizing: border-box;
  resize: vertical;
}

.enc-textarea:focus {
  outline: none;
  border-color: var(--enc-primary);
}

.enc-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.enc-primary-btn {
  flex: 2;
  min-width: 180px;
  background: var(--enc-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;
}

.enc-primary-btn:hover {
  background: var(--enc-primary-hover);
}

.enc-secondary-btn {
  background: var(--enc-pill-bg);
  color: var(--enc-text-main);
  border: 1px solid var(--enc-border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.enc-results-card {
  background: var(--enc-result-bg);
  border: 1px solid var(--enc-border);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
}

.enc-out-group {
  background: var(--enc-bg-card);
  border: 1px solid var(--enc-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.enc-out-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.enc-out-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--enc-text-main);
}

.enc-copy-btn {
  background: var(--enc-pill-bg);
  border: 1px solid var(--enc-border);
  color: var(--enc-text-main);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.enc-copy-btn:hover {
  border-color: var(--enc-primary);
}

.enc-out-input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--enc-border);
  border-radius: 6px;
  background: var(--enc-pill-bg);
  color: var(--enc-text-main);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.enc-code-font {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.enc-toast {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #16a34a;
  color: #ffffff;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.enc-tip-box {
  background: var(--enc-bg-card);
  border: 1px solid var(--enc-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.enc-tip-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--enc-primary);
}

.enc-tip-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--enc-text-muted);
  line-height: 1.5;
}

.enc-ad {
  overflow: hidden;
  min-height: 280px;
  margin: 32px 0;
  text-align: center;
}
/* 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"] {
  --enc-primary: #8681da;
  --enc-primary-hover: #8781da;
  --enc-bg-card: var(--tf-surface);
  --enc-border: var(--tf-surface);
  --enc-text-main: var(--tf-ink);
  --enc-text-muted: var(--tf-ink-faint);
  --enc-pill-bg: var(--tf-surface);
  --enc-pill-hover: var(--tf-surface);
  --enc-result-bg: var(--tf-surface);
}
