:root {
  --bg: #0b121d;
  --surface: #0f1726;
  --surface2: #0b1322;
  --border: #2a3441;
  --muted: #9aa7b7;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
}
.decoder-app {
  background: var(--bg);
  color: #e6eef7;
  font:
    16px/1.6 system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Inter,
    Arial,
    sans-serif;
  padding-bottom: 2.5rem;
}
.decoder-app__back,
.decoder-app__content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
.decoder-app__back {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.decoder-app a {
  color: inherit;
}
.decoder-app .wrap {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1080px) {
  .decoder-app .wrap {
    grid-template-columns: 1.05fr 1fr;
  }
}
.decoder-app .panel {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  padding: 1rem;
  margin: 0;
}
.decoder-app h2 {
  margin: 1.4rem 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.decoder-app .panel > h2:first-of-type {
  margin-top: 0;
}
.decoder-app .muted {
  color: var(--muted);
}
.decoder-app textarea {
  width: 100%;
  min-height: 220px;
  color: #e6eef7;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font:
    13px/1.45 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.decoder-app .row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.5rem 0;
}
.decoder-app .btn {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.decoder-app .btn-input {
  min-width: 220px;
  text-align: left;
}
.decoder-app .btn:hover,
.decoder-app .btn:focus {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.decoder-app .small {
  font-size: 0.9rem;
}
.decoder-app .grid {
  display: grid;
  gap: 0.75rem;
}
.decoder-app .card {
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.8rem;
  background: var(--surface2);
}
.decoder-app .kvs {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.3rem 0.6rem;
  font-size: 0.95rem;
}
.decoder-app .pill {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
}
.ok {
  color: var(--ok);
}
.warn {
  color: var(--warn);
}
.err {
  color: var(--err);
}
.decoder-app pre {
  margin: 0.4rem 0 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface2);
  padding: 0.65rem;
  overflow: auto;
}
.decoder-app code {
  font:
    13px/1.45 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.decoder-app table.diff {
  width: 100%;
  border-collapse: collapse;
  font:
    13px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.decoder-app table.diff th,
.decoder-app table.diff td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.45rem;
  vertical-align: top;
}
.decoder-app table.diff th {
  background: #0f1a2e;
  text-align: left;
}
.decoder-app tr.add td {
  background: rgba(34, 197, 94, 0.12);
}
.decoder-app tr.del td {
  background: rgba(239, 68, 68, 0.12);
}
.decoder-app tr.mod td {
  background: rgba(234, 179, 8, 0.12);
}
.decoder-app .tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}
.decoder-app .tabs button {
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  border-radius: 0.5rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
.decoder-app .tabs button.active {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
}
.decoder-app .copy {
  float: right;
}
.decoder-app .foot {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.decoder-app details {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: var(--surface);
  margin-top: 0.5rem;
}
.decoder-app details summary {
  cursor: pointer;
  font-weight: 600;
}
.decoder-app table.headers {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.4rem;
}
.decoder-app table.headers th,
.decoder-app table.headers td {
  border: 1px solid var(--border);
  padding: 0.25rem 0.4rem;
  font:
    12px/1.4 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.decoder-app table.headers th {
  background: #0f1a2e;
  text-align: left;
}
.decoder-app .hint {
  border-left: 4px solid #2563eb;
  background: #071427;
  padding: 0.6rem;
  border-radius: 0.25rem;
  margin: 0.5rem 0;
}
.decoder-app .hint code {
  background: transparent;
}
.decoder-app .kbd {
  font:
    12px/1.2 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  background: #101a2d;
  padding: 0.05rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
}
