* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #101214;
  color: #e9eef2;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

.shell {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.token {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
}

.token span,
.item span {
  color: #9aa6b2;
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #333b43;
  border-radius: 6px;
  padding: 10px 12px;
  background: #171b1f;
  color: #f7fafc;
  outline: none;
}

textarea {
  min-height: 280px;
  resize: vertical;
  font-family: Consolas, "Cascadia Mono", monospace;
  line-height: 1.55;
}

textarea.readonly {
  min-height: 240px;
  cursor: text;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.item {
  min-height: 82px;
  padding: 14px;
  border: 1px solid #2a3138;
  border-radius: 8px;
  background: #161a1e;
}

.item strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

button {
  border: 1px solid #2367aa;
  border-radius: 6px;
  padding: 10px 14px;
  background: #0f6fdc;
  color: white;
  font-weight: 650;
  cursor: pointer;
}

button:hover {
  background: #1680f7;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

.log {
  border: 1px solid #2a3138;
  border-radius: 8px;
  background: #090b0d;
}

.card {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #2a3138;
  border-radius: 8px;
  background: #161a1e;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: #9aa6b2;
  line-height: 1.6;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.field span {
  color: #9aa6b2;
  font-size: 13px;
}

pre,
.code-block {
  min-height: 240px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  color: #d8e2ea;
}

@media (max-width: 720px) {
  .toolbar,
  .status-grid,
  .card-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .mini-actions {
    justify-content: flex-start;
  }
}
