:root {
  --bg: #0b0f14;
  --panel: #121923;
  --panel2: #182231;
  --text: #d7e4f3;
  --muted: #8ea2b8;
  --accent: #31c48d;
  --border: #213247;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Fira Code", monospace;
  padding: 20px;
}

a {
  color: #b7f7dd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  display: grid;
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(24, 34, 49, 0.96), rgba(18, 25, 35, 0.96));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100dvh - 40px);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel2);
  color: var(--text);
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  color: #04120c;
  font-weight: 700;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid rgba(33, 50, 71, 0.6);
}

#widget {
  min-height: 70dvh;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.toolbar-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-select {
  width: auto;
}

.scroll-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60dvh;
  overflow: auto;
}

.pre-screen-half {
  min-height: 26dvh;
  white-space: pre-wrap;
  margin: 0;
}

.pre-json-half {
  min-height: 24dvh;
  white-space: pre-wrap;
  margin: 0;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  #widget {
    min-height: 60dvh;
  }
}
