#stego-tool {
  --st-accent: #1499c4;
  --st-accent-soft: rgba(20, 153, 196, 0.12);
  --st-radius: 12px;
  --st-border: var(--border, #dfe2e5);
  --st-text: var(--content-first, #343a40);
  --st-muted: var(--content-second, #adb5bd);
  --st-panel: var(--theme-first, #ffffff);
  color: var(--st-text);
  margin: 0.5rem 0 1.5rem;
}

#stego-tool .stego-lead {
  margin: 0 0 1.1rem;
  color: var(--st-muted);
  font-size: 14px;
  line-height: 1.6;
}

#stego-tool .stego-modes {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

#stego-tool .stego-mode {
  appearance: none;
  flex: 1;
  border: 1px solid var(--st-border);
  background: var(--theme-second, #f8f9fa);
  color: var(--st-text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

#stego-tool .stego-mode.is-active {
  background: var(--st-accent);
  border-color: var(--st-accent);
  color: #fff;
}

#stego-tool .stego-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 20px;
  align-items: start;
}

#stego-tool .stego-panel,
#stego-tool .stego-preview {
  background: var(--st-panel);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius);
  padding: 16px;
  min-width: 0;
}

#stego-tool .stego-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

#stego-tool .stego-tab {
  appearance: none;
  border: 1px solid transparent;
  background: var(--st-accent-soft);
  color: var(--st-accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#stego-tool .stego-tab.is-active {
  background: var(--st-accent);
  color: #fff;
}

#stego-tool .stego-form {
  display: none;
  gap: 12px;
}

#stego-tool .stego-form.is-active {
  display: grid;
}

#stego-tool [hidden] {
  display: none !important;
}

#stego-tool .stego-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--st-muted);
}

#stego-tool .stego-field span em {
  font-style: normal;
  color: var(--st-accent);
  font-weight: 600;
  margin-left: 6px;
}

#stego-tool input[type="text"],
#stego-tool input[type="password"],
#stego-tool input[type="number"],
#stego-tool input[type="file"],
#stego-tool select,
#stego-tool textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--st-border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--st-text);
  background: var(--theme-second, #f8f9fa);
}

#stego-tool textarea {
  resize: vertical;
  min-height: 88px;
}

#stego-tool .stego-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--st-text);
}

#stego-tool .stego-secret-switch {
  display: flex;
  gap: 8px;
}

#stego-tool .stego-secret-switch .stego-check {
  flex: 1;
  justify-content: center;
  border: 1px solid var(--st-border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  background: var(--theme-second, #f8f9fa);
  font-weight: 600;
}

#stego-tool .stego-secret-switch .stego-check:has(input:checked) {
  background: var(--st-accent);
  border-color: var(--st-accent);
  color: #fff;
}

#stego-tool .stego-secret-switch input {
  accent-color: currentColor;
}

#stego-tool .stego-limit-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

#stego-tool .stego-limit-row .stego-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

#stego-tool .stego-limit-row input {
  flex: 1;
  min-width: 0;
}

#stego-tool .stego-hint {
  margin: 0;
  font-size: 12px;
  color: var(--st-accent);
  line-height: 1.5;
}

#stego-tool .stego-crop-aspects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

#stego-tool .stego-chip {
  appearance: none;
  border: 1px solid var(--st-border);
  background: var(--theme-second, #f8f9fa);
  color: var(--st-text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#stego-tool .stego-chip.is-active {
  background: var(--st-accent);
  border-color: var(--st-accent);
  color: #fff;
}

#stego-tool #stego-crop-canvas {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 8px;
  background: #111;
  cursor: crosshair;
  touch-action: none;
}

#stego-tool .stego-stage {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--st-accent-soft);
  border-radius: 10px;
  padding: 12px;
}

#stego-tool .stego-placeholder {
  margin: 0;
  padding: 20px 8px;
  text-align: center;
  color: var(--st-muted);
  font-size: 14px;
}

#stego-tool .stego-placeholder--caption {
  padding: 0;
  font-size: 12px;
}

#stego-tool #stego-thumb {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

#stego-tool #stego-output {
  min-height: 120px;
  background: #fff;
}

#stego-tool .stego-error {
  margin: 12px 0 0;
  color: #c92a2a;
  font-size: 13px;
}

#stego-tool .stego-ok {
  margin: 12px 0 0;
  color: #2b8a3e;
  font-size: 13px;
}

#stego-tool .stego-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

#stego-tool .stego-btn {
  appearance: none;
  border: 1px solid var(--st-border);
  background: var(--theme-second, #f8f9fa);
  color: var(--st-text);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#stego-tool .stego-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#stego-tool .stego-btn--primary {
  background: var(--st-accent);
  border-color: var(--st-accent);
  color: #fff;
}

#stego-tool .stego-bin {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--st-border);
  min-width: 0;
  max-width: 100%;
}

#stego-tool .stego-bin h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

#stego-tool .stego-stats {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--st-muted);
  line-height: 1.6;
}

#stego-tool .stego-hex {
  margin: 0;
  max-width: 100%;
  min-width: 0;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: var(--theme-second, #f8f9fa);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
}

#stego-tool .stego-bits-view {
  display: none;
}

@media (max-width: 820px) {
  #stego-tool .stego-layout {
    grid-template-columns: 1fr;
  }
}
