/* ===== THE PLACE - TOOLS COMMON DESIGN SYSTEM ===== */

/* Color tokens */
:root {
  --tp-primary: #2563eb;
  --tp-primary-light: #dbeafe;
  --tp-primary-dark: #1d4ed8;
  --tp-success: #16a34a;
  --tp-success-light: #dcfce7;
  --tp-warning: #f59e0b;
  --tp-warning-light: #fef3c7;
  --tp-danger: #dc2626;
  --tp-danger-light: #fee2e2;
  --tp-gray-50: #f9fafb;
  --tp-gray-100: #f3f4f6;
  --tp-gray-200: #e5e7eb;
  --tp-gray-300: #d1d5db;
  --tp-gray-500: #6b7280;
  --tp-gray-700: #374151;
  --tp-gray-900: #111827;
  --tp-radius: 12px;
  --tp-radius-sm: 8px;
  --tp-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --tp-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* Common tool wrapper */
.tp-tool-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hero section */
.tp-hero {
  text-align: center;
  padding: 40px 20px 32px;
  background: linear-gradient(135deg, var(--tp-primary) 0%, #7c3aed 100%);
  color: white;
  border-radius: 0 0 24px 24px;
  margin-bottom: 24px;
}
.tp-hero h2 { font-size: 24px; font-weight: 700; margin: 0 0 8px; }
.tp-hero p { font-size: 14px; opacity: 0.85; margin: 0; }

/* Step indicators */
.tp-steps { display: flex; gap: 8px; margin-bottom: 24px; padding: 0 4px; }
.tp-step-dot {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--tp-gray-200); transition: background 0.3s;
}
.tp-step-dot.active { background: var(--tp-primary); }
.tp-step-dot.done { background: var(--tp-success); }

/* Cards */
.tp-card {
  background: white;
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.tp-card-title {
  font-size: 16px; font-weight: 600;
  color: var(--tp-gray-900);
  margin: 0 0 16px;
  display: flex; align-items: center; gap: 8px;
}

/* Form elements */
.tp-input-group { margin-bottom: 16px; }
.tp-input-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--tp-gray-700); margin-bottom: 6px;
}
.tp-input-group input[type="text"],
.tp-input-group input[type="number"],
.tp-input-group input[type="date"],
.tp-input-group select,
.tp-input-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--tp-gray-200);
  border-radius: var(--tp-radius-sm);
  font-size: 15px; color: var(--tp-gray-900);
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.tp-input-group input:focus,
.tp-input-group select:focus,
.tp-input-group textarea:focus {
  outline: none;
  border-color: var(--tp-primary);
  box-shadow: 0 0 0 3px var(--tp-primary-light);
}

/* Pill selector */
.tp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-pill {
  padding: 8px 16px; border-radius: 20px;
  border: 1.5px solid var(--tp-gray-200);
  background: white; cursor: pointer;
  font-size: 14px; color: var(--tp-gray-700);
  transition: all 0.2s;
}
.tp-pill:hover { border-color: var(--tp-primary); color: var(--tp-primary); }
.tp-pill.selected {
  background: var(--tp-primary); color: white;
  border-color: var(--tp-primary);
}

/* Buttons */
.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--tp-radius-sm);
  font-size: 15px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.2s;
}
.tp-btn-primary { background: var(--tp-primary); color: white; }
.tp-btn-primary:hover { background: var(--tp-primary-dark); }
.tp-btn-outline {
  background: white; color: var(--tp-primary);
  border: 1.5px solid var(--tp-primary);
}
.tp-btn-kakao {
  background: #FEE500; color: #3C1E1E;
  font-weight: 600;
}
.tp-btn-kakao:hover { background: #FADA0A; }
.tp-btn-full { width: 100%; }

/* Alerts */
.tp-alert {
  padding: 12px 16px; border-radius: var(--tp-radius-sm);
  font-size: 14px; margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 8px;
}
.tp-alert-success { background: var(--tp-success-light); color: #15803d; border-left: 3px solid var(--tp-success); }
.tp-alert-warning { background: var(--tp-warning-light); color: #92400e; border-left: 3px solid var(--tp-warning); }
.tp-alert-danger { background: var(--tp-danger-light); color: #991b1b; border-left: 3px solid var(--tp-danger); }
.tp-alert-info { background: var(--tp-primary-light); color: #1e40af; border-left: 3px solid var(--tp-primary); }

/* Score gauge */
.tp-score-ring {
  width: 120px; height: 120px; margin: 0 auto 16px;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.tp-score-ring .score-num {
  font-size: 36px; font-weight: 700; color: var(--tp-gray-900);
}
.tp-score-ring .score-label {
  font-size: 12px; color: var(--tp-gray-500);
}

/* Result tables */
.tp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tp-table th {
  background: var(--tp-gray-50); padding: 10px 12px;
  text-align: left; font-weight: 600; color: var(--tp-gray-700);
  border-bottom: 2px solid var(--tp-gray-200);
}
.tp-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--tp-gray-100);
  color: var(--tp-gray-700);
}
.tp-table tr:hover td { background: var(--tp-gray-50); }

/* Accordion */
.tp-accordion-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; cursor: pointer; font-weight: 500;
  border-bottom: 1px solid var(--tp-gray-100);
}
.tp-accordion-body { padding: 16px; display: none; }
.tp-accordion-header.open + .tp-accordion-body { display: block; }

/* Share bar */
.tp-share-bar {
  display: flex; gap: 8px; margin-top: 20px;
  padding-top: 20px; border-top: 1px solid var(--tp-gray-200);
}

/* Responsive */
@media (max-width: 640px) {
  .tp-hero { padding: 32px 16px 24px; }
  .tp-hero h2 { font-size: 20px; }
  .tp-card { padding: 16px; }
  .tp-pills { gap: 6px; }
  .tp-pill { padding: 6px 12px; font-size: 13px; }
}

/* Print */
@media print {
  .tp-hero, .tp-share-bar, .tp-btn-kakao, .tp-steps,
  nav, header, footer, .site-header, .site-footer,
  #theplace-topbar, .entry-header { display: none \!important; }
  .tp-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  body { font-size: 12px; }
  @page { size: A4; margin: 15mm; }
}
