:root {
  color-scheme: light;
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  background: #eef5f3;
  color: #162522;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --border: #cad8d5;
  --muted: #60716d;
  --surface: #ffffff;
  --danger: #a73535;
  --warning: #8a5a00;
  --success: #13744e;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.12), transparent 280px),
    #eef5f3;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 32px;
}

.status-band {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 4px 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
}

.support-badge {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.support-badge.ok {
  border-color: rgba(19, 116, 78, 0.25);
  color: var(--success);
}

.support-badge.fail {
  border-color: rgba(167, 53, 53, 0.25);
  color: var(--danger);
}

.panel {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(37, 66, 60, 0.08);
}

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

.section-heading span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.field-group {
  display: grid;
  gap: 12px;
}

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

.field span {
  color: #2c403c;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #b7c8c4;
  border-radius: 8px;
  background: #fbfdfc;
  color: #152522;
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 12px;
}

.preview-box {
  display: grid;
  gap: 7px;
  min-height: 100px;
  margin: 4px 0 16px;
  padding: 13px;
  border: 1px solid #d6e2df;
  border-radius: 8px;
  background: #f7faf9;
}

.preview-box span,
.preview-box small {
  color: var(--muted);
  font-size: 12px;
}

.preview-box strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.preview-box.warning small {
  color: var(--warning);
  font-weight: 700;
}

.preview-box.error small {
  color: var(--danger);
  font-weight: 700;
}

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

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.primary {
  background: var(--accent);
  color: white;
}

.primary:active {
  background: var(--accent-dark);
}

.secondary {
  border: 1px solid #b7c8c4;
  background: #f4f8f7;
  color: #17332f;
}

.text-button {
  min-height: auto;
  padding: 4px 0;
  background: transparent;
  color: var(--accent);
}

.log-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
}

.log-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-left: 3px solid #98aaa6;
  border-radius: 6px;
  background: #f7faf9;
}

.log-item.success {
  border-left-color: var(--success);
}

.log-item.error {
  border-left-color: var(--danger);
}

.log-item.warning {
  border-left-color: var(--warning);
}

.log-item strong {
  font-size: 13px;
}

.log-item span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.details {
  margin-top: 16px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.details h2 {
  margin-bottom: 6px;
  color: #203632;
  font-size: 15px;
}

.hidden {
  display: none;
}

@media (max-width: 430px) {
  .app-shell {
    padding-inline: 12px;
  }

  h1 {
    font-size: 26px;
  }

  .status-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .support-badge {
    width: 100%;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}
