:root {
  --bg: #f6f1e8;
  --panel: rgba(255, 252, 246, 0.88);
  --panel-border: rgba(60, 41, 23, 0.12);
  --text: #2e2116;
  --muted: #6d5a4b;
  --accent: #a0482c;
  --accent-strong: #7d3018;
  --success: #0f766e;
  --error: #b42318;
  --shadow: 0 20px 50px rgba(86, 54, 25, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.5 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(222, 153, 95, 0.25), transparent 28%),
    radial-gradient(circle at right 20%, rgba(160, 72, 44, 0.12), transparent 24%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
  padding-bottom: 96px;
}

.layout {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero {
  margin-bottom: 24px;
}

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

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 0.98;
}

.subtitle {
  margin: 12px 0 0;
  max-width: 42rem;
  color: var(--muted);
}

.support-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(160, 72, 44, 0.18);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.82);
  box-shadow: 0 14px 32px rgba(86, 54, 25, 0.08);
}

.support-banner strong,
.result-title {
  display: block;
  margin-bottom: 4px;
}

.support-copy {
  min-width: 0;
}

.support-banner span {
  color: var(--muted);
}

.panel {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.panel h2 {
  margin: 0;
  font-size: 22px;
}

.section-tip {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.inline-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(60, 41, 23, 0.1);
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

input,
button,
.ghost-button {
  border-radius: 16px;
  font: inherit;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(90, 59, 35, 0.15);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: rgba(160, 72, 44, 0.5);
  box-shadow: 0 0 0 4px rgba(160, 72, 44, 0.12);
}

button,
.ghost-button {
  appearance: none;
  border: none;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease;
}

button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff8f1;
  font-weight: 700;
}

button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

button:disabled,
.ghost-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.ghost-button {
  padding: 10px 14px;
  background: rgba(160, 72, 44, 0.08);
  color: var(--accent-strong);
  font-weight: 600;
}

.message {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(60, 41, 23, 0.08);
  white-space: pre-wrap;
}

.message.success {
  color: var(--success);
  border-color: rgba(15, 118, 110, 0.22);
}

.message.error {
  color: var(--error);
  border-color: rgba(180, 35, 24, 0.22);
}

.result-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(60, 41, 23, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.result-card.success {
  border-color: rgba(15, 118, 110, 0.2);
}

.result-card.warn {
  border-color: rgba(180, 83, 9, 0.22);
}

.result-card.error {
  border-color: rgba(180, 35, 24, 0.22);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge.success {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

.badge.warn {
  color: #b45309;
  background: rgba(180, 83, 9, 0.12);
}

.badge.error {
  color: #b42318;
  background: rgba(180, 35, 24, 0.1);
}

.detail-grid {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: start;
}

.detail-row dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.detail-row dd {
  margin: 0;
}

.result-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(60, 41, 23, 0.12);
  color: var(--muted);
}

.raw-toggle {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(60, 41, 23, 0.1);
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}

.raw-toggle summary {
  list-style: none;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-strong);
}

.raw-toggle summary::-webkit-details-marker {
  display: none;
}

.raw-toggle summary::after {
  content: "展开";
  float: right;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.raw-toggle[open] summary::after {
  content: "收起";
}

.status-output {
  margin: 0;
  padding: 16px;
  overflow: auto;
  border-radius: 0;
  background: #241a12;
  color: #f7efe4;
  font: 13px/1.55 "JetBrains Mono", "Fira Code", monospace;
}

.mobile-support-dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(160, 72, 44, 0.18);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 18px 34px rgba(86, 54, 25, 0.18);
  backdrop-filter: blur(16px);
}

.mobile-support-copy {
  min-width: 0;
}

.mobile-support-copy strong,
.mobile-support-copy span {
  display: block;
}

.mobile-support-copy strong {
  font-size: 13px;
}

.mobile-support-copy span {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  }

  .layout {
    width: min(100% - 20px, 920px);
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .hero {
    margin-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .subtitle {
    font-size: 15px;
  }

  .panel {
    margin-top: 14px;
    padding: 16px;
    border-radius: 20px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .panel-header .ghost-button,
  .support-banner .ghost-button,
  .mobile-support-dock .ghost-button,
  .form-grid > button {
    width: 100%;
  }

  .support-banner,
  .result-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .support-banner {
    padding: 14px;
    border-radius: 16px;
  }

  .ghost-button,
  button,
  input {
    min-height: 50px;
  }

  .section-tip,
  .message,
  .result-note,
  .detail-row dd,
  .support-banner span {
    font-size: 14px;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .result-card {
    padding: 16px;
  }

  .raw-toggle summary {
    padding: 13px 14px;
  }

  .status-output {
    max-height: 42vh;
    font-size: 12px;
  }

  .mobile-support-dock {
    display: flex;
  }
}
