/* ========== Base ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #fff; color: #111; font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }
.container { max-width: 1000px; margin: 0 auto; padding: 16px; }

/* Header */
.header { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.selected-count { color: #555; font-size: 14px; }
.title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .2px; }

/* Layout */
main { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 960px) {
  .title { font-size: 28px; }
  main { grid-template-columns: 2fr 1fr; gap: 20px; }
}

/* Traits list */
.traits { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px; }
.trait { display: flex; gap: 10px; padding: 12px 4px; border-top: 1px solid #f1f5f9; }
.trait:first-child { border-top: 0; }
.trait input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; }
.trait label { flex: 1; cursor: pointer; user-select: none; }
.trait .lbl { font-weight: 600; line-height: 1.2; }
.trait .desc { color: #667085; font-size: 13px; margin-top: 2px; line-height: 1.35; }

/* Result card */
.result { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 16px; text-align: center; position: sticky; top: 16px; height: fit-content; }
.result h2 { margin: 0 0 8px; font-size: 18px; }
.result .winner { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.result .scores { display: flex; justify-content: center; gap: 18px; margin-top: 10px; }
.result .scores .col { min-width: 80px; }
.result .scores .cap { color: #667085; font-size: 12px; }
.result .scores .val { font-size: 20px; font-weight: 700; }
.result .hint { color: #667085; font-size: 13px; margin-top: 8px; }

/* Buttons row (presets optional in future) */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.btn { border: 1px solid #e5e7eb; background: #fafafa; padding: 8px 12px; border-radius: 12px; font-size: 13px; cursor: pointer; }
.btn:hover { background: #f3f4f6; }
.btn.reset { background: #fff; }

/* Mobile friendliness */
@media (max-width: 767px) {
  .selected-count { order: 1; } /* show before title */
  .title { order: 2; }
}
