:root {
  --bg: #faf8f5;
  --card-bg: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --accent: #c9a779;
  --accent-soft: #f3e9d8;
  --shadow: 0 2px 8px rgba(31, 41, 51, 0.06), 0 1px 2px rgba(31, 41, 51, 0.04);
  --shadow-lift: 0 12px 28px rgba(31, 41, 51, 0.14);
  --radius: 14px;
  --font: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.header { margin-bottom: 24px; }

.question {
  font-size: clamp(22px, 4.2vw, 30px);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 12px;
}

.instruction {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.needs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.need-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.need-card:active { cursor: grabbing; }

.need-rank {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.need-text {
  flex: 1 1 auto;
  font-size: 16px;
  line-height: 1.35;
}

.need-handle {
  flex: 0 0 auto;
  color: #c2c8d0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.need-handle svg { display: block; }

.sortable-ghost {
  opacity: 0.4;
  background: var(--accent-soft);
}

.sortable-chosen {
  background: var(--accent-soft);
  box-shadow: var(--shadow-lift);
}

.sortable-drag {
  background: #fff;
  box-shadow: var(--shadow-lift);
}

.actions {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.18s ease, color 0.18s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #b89567; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid #d8d3cb;
}
.btn-secondary:hover { background: #f1ece4; }

.result-banner {
  background: var(--accent-soft);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.locked .need-card {
  cursor: default;
}

@media (max-width: 480px) {
  .container { padding: 20px 14px 48px; }
  .need-card { padding: 12px 14px; gap: 10px; }
  .need-rank { width: 32px; height: 32px; font-size: 15px; }
  .need-text { font-size: 15px; }
}
