@charset "UTF-8";

.name-picker-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 0 56px;
}

/* 상단 */

.name-picker-page .utility-top {
  padding: 32px 20px 28px;
  text-align: center;
}

.name-picker-page .utility-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.name-picker-page .utility-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.name-picker-page .utility-desc {
  max-width: 860px;
  margin: 16px auto 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.8;
}

/* 요약 카드 */

.name-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.name-summary-item {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.name-summary-item::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.name-summary-item strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.name-summary-item span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

/* 메인 카드 */

.name-main-card,
.name-history-card {
  padding: 30px;
  margin-top: 18px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.name-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.name-card-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.name-card-head p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.name-status-badge {
  flex: 0 0 auto;
  min-width: 90px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

/* 레이아웃 */

.name-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 20px;
}

/* 결과 카드 */

.name-result-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.name-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.name-result-top span {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.name-result-top small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

/* 결과 영역 */

.name-result-box {
  min-height: 240px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 18% 18%, rgba(6, 182, 212, 0.12), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef8fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  text-align: center;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1.2;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 18px 34px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.name-result-box.is-animating {
  animation: namePulse 0.7s ease;
}

@keyframes namePulse {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

/* 여러 명 결과 */

.name-result-multi {
  flex-wrap: wrap;
  gap: 12px;
  align-content: center;
  padding: 28px;
  font-size: initial;
}

.name-result-chip {
  min-height: 62px;
  padding: 0 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

/* 통계 */

.name-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.name-stat-grid div,
.name-history-summary div {
  min-height: 88px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
}

.name-stat-grid span,
.name-history-summary span {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.name-stat-grid strong,
.name-history-summary strong {
  display: block;
  color: #0f172a;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.1;
}

/* 컨트롤 */

.name-control-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.name-input-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.name-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.name-textarea {
  min-height: 260px;
  resize: vertical;
}

/* 옵션 */

.name-option-group {
  margin-top: 22px;
}

.name-option-title {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.name-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.name-count-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.name-count-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.name-count-btn.is-active {
  border-color: rgba(6, 182, 212, 0.4);
  background: #ecfeff;
  color: #155e75;
}

/* 체크 옵션 */

.name-option-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.name-option-pill {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.name-option-pill input {
  width: 14px;
  height: 14px;
  accent-color: #06b6d4;
}

/* 버튼 */

.name-btn-row {
  margin-top: 24px;
}

.name-picker-page .utility-btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

.name-picker-page .utility-btn-primary {
  border-color: #0f172a;
  background: linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
}

.name-picker-page .utility-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

/* 메시지 */

.name-message {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(6, 182, 212, 0.16);
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  color: #155e75;
  font-size: 14px;
  line-height: 1.7;
}

/* 기록 */

.name-history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.name-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.name-history-list li {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.name-history-empty {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 120px !important;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.history-round {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
}

.history-winners {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.6;
  word-break: break-word;
}

.history-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.name-history-clear {
  background: #ffffff;
}

/* 도움말 */

.name-picker-page .help-panel {
  margin-top: 34px;
}

.name-picker-page .help-panel > h2 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.name-picker-page .help-box {
  border-radius: 22px;
}

.name-picker-page .help-toggle-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  color: #0f172a;
  font-size: 1.06rem;
  font-weight: 800;
}

.name-picker-page .help-toggle-box summary::-webkit-details-marker {
  display: none;
}

.name-picker-page .help-toggle-box summary::after {
  content: "+";
  flex: 0 0 auto;
  color: #64748b;
  font-size: 1.2rem;
  font-weight: 700;
}

.name-picker-page .help-toggle-box[open] summary::after {
  content: "−";
}

.name-picker-page .help-toggle-content {
  margin-top: 14px;
}

.name-picker-page .help-toggle-content p {
  margin: 0;
  color: #334155;
  line-height: 1.8;
}

/* 반응형 */

@media (max-width: 980px) {
  .name-summary-card,
  .name-layout {
    grid-template-columns: 1fr;
  }

  .name-control-card {
    order: -1;
  }
}

@media (max-width: 768px) {
  .name-main-card,
  .name-history-card {
    padding: 22px;
    border-radius: 22px;
  }

  .name-card-head {
    flex-direction: column;
  }

  .name-stat-grid,
  .name-history-summary,
  .name-option-box {
    grid-template-columns: 1fr;
  }

  .name-history-list li {
    grid-template-columns: 1fr;
  }

  .history-meta {
    text-align: left;
  }

  .name-result-box {
    min-height: 180px;
    font-size: 42px;
  }

  .name-result-chip {
    min-height: 54px;
    padding: 0 18px;
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .name-chip-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .name-picker-page .utility-title {
    font-size: 32px;
  }

  .name-input-head {
    flex-direction: column;
    align-items: flex-start;
  }
}