:root {
  color-scheme: dark;
  --bg: #08090b;
  --panel: #13161b;
  --panel-2: #0e1116;
  --text: #f4f6f8;
  --muted: #a1a8b3;
  --line: #2a3038;
  --accent: #f26b2b;
  --accent-2: #62d8e8;
  --ok: #54d17a;
  --bad: #ff5d5d;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 22% 8%, rgba(242, 107, 43, .18), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(98, 216, 232, .14), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.app {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 18px 0 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .08em;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.summary {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.status {
  min-width: 74px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.status.ok { color: #06150b; background: var(--ok); border-color: transparent; }
.status.bad { color: #210202; background: var(--bad); border-color: transparent; }

.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent), var(--panel);
  padding: 16px;
  margin-top: 14px;
  box-shadow: 0 22px 70px rgba(0,0,0,.24);
}

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

.field span,
.hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

select {
  min-height: 48px;
  padding: 0 12px;
  font-size: 16px;
}

textarea {
  min-height: 176px;
  resize: vertical;
  padding: 12px;
  line-height: 1.55;
}

.action-help {
  display: block;
  min-height: 42px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  padding: 0 16px;
  color: #150803;
  background: linear-gradient(135deg, #ffdcb2, var(--accent));
  font: 950 15px/1 Inter, ui-sans-serif, system-ui, "PingFang SC", sans-serif;
}

button:disabled { opacity: .58; }

button.secondary,
button.ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: #ffffff0f;
}

.hint {
  margin: 12px 0 0;
  line-height: 1.55;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.result-head h2 {
  margin: 0;
  font-size: 20px;
}

.result-head button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

pre {
  margin: 0;
  min-height: 260px;
  max-height: 52vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #07090d;
  color: var(--text);
  padding: 14px;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 420px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .hero { grid-template-columns: 1fr; }
  .status { justify-self: start; }
  h1 { font-size: 38px; }
  .panel { padding: 16px; }
  .actions { grid-template-columns: 1fr; }
  button { width: 100%; }
  textarea { min-height: 156px; }
}
