.hacker-decoder-form {
  --decoder-control-border: rgba(157, 181, 166, 0.38);
  --decoder-control-bg: #111b16;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  font-family: Consolas, 'SFMono-Regular', 'Liberation Mono', monospace;
}
.hacker-decoder-toolbar,
.hacker-decoder-result-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hacker-decoder-toolbar {
  margin-bottom: 1rem;
}
.hacker-decoder-toolbar label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.hacker-decoder-form button,
.hacker-decoder-form select {
  border: 1px solid var(--decoder-control-border);
  border-radius: 3px;
  background: var(--decoder-control-bg);
  color: #d1dfd6;
  padding: 0.5rem 0.75rem;
  font: inherit;
  max-width: 100%;
}
.hacker-decoder-form button {
  cursor: pointer;
  min-height: 36px;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease;
}
.hacker-decoder-form button:hover:not(:disabled) {
  background: #1b2c22;
  border-color: #739a80;
  color: #e3ffec;
}
.hacker-decoder-form button:disabled {
  opacity: 0.55;
  cursor: default;
}
.hacker-decoder-form .hacker-decoder-submit {
  border-color: #65ff9a;
  color: #caffdc;
}
.hacker-decoder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}
.hacker-decoder-input-label,
.hacker-decoder-result {
  min-width: 0;
}
.hacker-decoder-input-label {
  line-height: 2rem;
}
.hacker-decoder-result-header {
  justify-content: space-between;
  min-height: 2rem;
}
.hacker-decoder-input-label textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 230px;
  margin-top: 0.5rem;
  resize: vertical;
  border: 1px solid rgba(157, 181, 166, 0.25);
  background: #030906;
  color: #dcffe8;
  padding: 0.75rem;
  font:
    0.875rem/1.65 Consolas,
    'SFMono-Regular',
    'Liberation Mono',
    monospace;
}
.hacker-decoder-form .hacker-decoder-output {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  height: 230px;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px solid rgba(157, 181, 166, 0.25);
  border-radius: 6px;
  background: #030906;
  box-shadow: none;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font:
    1rem/1.65 Consolas,
    'SFMono-Regular',
    'Liberation Mono',
    monospace;
  color: #caffdc;
  scrollbar-width: thin;
  scrollbar-color: #38754d #030906;
}
.hacker-decoder-original {
  position: relative;
  z-index: 1;
  display: block;
}
.hacker-decoder-code {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  user-select: none;
}
.hacker-decoder-code canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.hacker-decoder-status {
  min-height: 1.6em;
  color: #9df2b9;
}
.hacker-decoder-local {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9em;
}
.hacker-decoder-form :focus-visible {
  outline: 2px solid #65ff9a;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .hacker-modal-overlay:has(.hacker-modal-decoder) {
    padding: 1rem;
  }
  .hacker-decoder-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hacker-decoder-input-label textarea {
    height: 120px;
  }
  .hacker-decoder-form .hacker-decoder-output {
    height: 180px;
  }
}

.hacker-decoder-form [hidden] {
  display: none !important;
}
.decoder-taskbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.decoder-taskbar label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.decoder-taskbar input {
  width: 4em;
  background: #030906;
  color: #dcffe8;
  border: 1px solid #38754d;
  padding: 0.35rem;
  font: inherit;
}

.decoder-history {
  margin-top: 1.5rem;
  border-top: 1px solid #314b39;
  padding-top: 1rem;
}
.decoder-history h2 {
  font: inherit;
  margin: 0;
}
.decoder-history > ol {
  padding-left: 1.6rem;
}
.decoder-history details {
  margin: 0.6rem 0;
}
.decoder-history summary {
  cursor: pointer;
}
.decoder-history pre {
  max-height: 10rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  padding: 0.5rem;
  border: 1px solid #263e2e;
}
.decoder-notice {
  color: #cbd4ce;
  font-size: 0.8rem;
  line-height: 1.6;
}

.decoder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid #314b39;
  margin-bottom: 1.4rem;
}
.hacker-decoder-form .decoder-tabs [role='tab'] {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.65rem 0.8rem;
  color: #9baaa0;
}
.hacker-decoder-form .decoder-tabs [aria-selected='true'] {
  color: #caffdc;
  border-bottom-color: #65ff9a;
  background: rgba(60, 140, 85, 0.1);
}
.hacker-decoder-form .decoder-tabs [role='tab']:hover {
  color: #d7ffe3;
}

.hacker-decoder-toolbar {
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.hacker-decoder-toolbar label {
  color: #b7c8bd;
  font-size: 0.8rem;
}
.hacker-decoder-form select {
  min-height: 36px;
}
.hacker-decoder-form .hacker-decoder-submit {
  margin-left: auto;
  min-width: 90px;
  background: #173925;
  border-color: #528e64;
  color: #d9ffe5;
  font-weight: 600;
}
.hacker-decoder-form .hacker-decoder-submit:hover {
  background: #204b31;
  border-color: #83d79b;
}
.hacker-decoder-formats {
  overflow-wrap: anywhere;
  color: #859e8e;
  font-size: 0.75rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.hacker-decoder-grid {
  gap: 1.15rem;
}
.hacker-decoder-input-label {
  line-height: 36px;
  color: #cbd9d0;
}
.hacker-decoder-result-header {
  min-height: 36px;
  color: #cbd9d0;
}
.hacker-decoder-result-header [data-decoder-copy] {
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
}
.hacker-decoder-input-label textarea {
  border-radius: 6px;
}
.hacker-decoder-status {
  margin: 1rem 0 0.4rem;
  font-size: 0.8rem;
}
.hacker-decoder-local {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #819388;
}
