:root {
  --bg: #f3efe6;
  --panel: rgba(255, 252, 246, 0.9);
  --ink: #1c1917;
  --muted: #6b6257;
  --accent: #b45309;
  --accent-strong: #7c2d12;
  --border: rgba(28, 25, 23, 0.12);
  --shadow: 0 24px 60px rgba(80, 54, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(180, 83, 9, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(120, 53, 15, 0.16), transparent 24%),
    linear-gradient(135deg, #f6f1e8, #efe6d6);
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 32px auto;
  display: grid;
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero h1,
.panel h2 {
  margin: 0 0 12px;
}

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

.intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 14px;
  color: var(--muted);
}

input,
button {
  font: inherit;
}

input[type="number"] {
  appearance: textfield;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
}

input:focus {
  outline: 2px solid rgba(180, 83, 9, 0.25);
  border-color: var(--accent);
}

.actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  transition: transform 120ms ease, opacity 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

pre {
  margin: 0;
  min-height: 260px;
  padding: 16px;
  border-radius: 16px;
  overflow: auto;
  background: #201a17;
  color: #f7efe4;
  line-height: 1.5;
}

/* 可拖动结果面板 */
.draggable {
  position: relative;
}

.drag-handle {
  cursor: grab;
  user-select: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px dashed var(--border);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.drag-handle:active {
  cursor: grabbing;
}

.draggable.dragging {
  position: fixed;
  z-index: 9999;
  opacity: 0.92;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  border-radius: 24px;
  background: var(--panel);
  padding: 16px;
  pointer-events: auto;
  max-width: 420px;
  width: 90vw;
}

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

  .panel {
    padding: 18px;
    border-radius: 18px;
  }
}
