:root {
  --bg: #f3ede2;
  --panel: rgba(255, 251, 245, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.72);
  --ink: #11231d;
  --muted: #647169;
  --line: rgba(17, 35, 29, 0.12);
  --accent: #c66c2d;
  --success: #1f7a54;
  --danger: #b84535;
  --shadow: 0 30px 80px rgba(52, 36, 18, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(198, 108, 45, 0.22), transparent 30%),
    radial-gradient(circle at bottom right, rgba(17, 35, 29, 0.12), transparent 24%),
    linear-gradient(135deg, #f6eddf 0%, #efe4d2 46%, #faf7f0 100%);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1260px, calc(100% - 32px));
  margin: 32px auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

.hero-panel,
.app-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-panel {
  border-radius: var(--radius-xl);
  padding: 32px;
}

.hero-mark,
.eyebrow {
  display: inline-flex;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: #85420f;
}

.hero-panel h1,
.panel-header h2,
.section-head h3 {
  margin: 12px 0 0;
  line-height: 1.08;
}

.hero-panel h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.hero-copy {
  margin: 18px 0 28px;
  line-height: 1.8;
  color: var(--muted);
}

.hero-stats {
  display: grid;
  gap: 14px;
  margin: 0;
}

.hero-stats div {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
}

.hero-stats dt {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 8px 0 0;
  font-weight: 700;
}

.app-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.panel-header,
.section-head,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 24px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(198, 108, 45, 0.08);
  border: 1px solid rgba(198, 108, 45, 0.16);
}

.status-strip[data-tone="success"] {
  background: rgba(31, 122, 84, 0.08);
  border-color: rgba(31, 122, 84, 0.18);
}

.status-strip[data-tone="danger"] {
  background: rgba(184, 69, 53, 0.08);
  border-color: rgba(184, 69, 53, 0.18);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.status-strip[data-tone="success"] .status-dot {
  background: var(--success);
}

.status-strip[data-tone="danger"] .status-dot {
  background: var(--danger);
}

.config-panel,
.tool-panel,
.response-panel {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  border: 1px solid rgba(17, 35, 29, 0.08);
}

.settings-form,
.tool-form {
  display: grid;
  gap: 18px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.96);
}

.full-span {
  grid-column: 1 / -1;
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.ghost-button,
.primary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ghost-button {
  padding: 12px 18px;
  background: rgba(17, 35, 29, 0.06);
  color: var(--ink);
}

.ghost-button.compact {
  padding-inline: 14px;
}

.primary-button {
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--accent), #de8f4c);
  color: #fff;
  font-weight: 700;
}

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

.ghost-button:disabled,
.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

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

.response-panel pre {
  margin: 16px 0 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: #111816;
  color: #edf4f1;
  overflow: auto;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    margin: 10px auto;
  }

  .hero-panel,
  .app-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .field-grid,
  .inline-field {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .section-head,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
