@charset "UTF-8";

.dday-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

/* 상단 */
.dday-page .utility-top {
  padding: 34px 20px 30px;
  text-align: center;
}

.dday-page .utility-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.dday-page .utility-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #0f172a;
}

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

/* 요약 카드 */
.dday-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

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

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

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

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

/* 공통 카드 */
.dday-card,
.dday-saved-card {
  margin-bottom: 26px;
  padding: 30px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.08);
}

/* 카드 헤더 */
.dday-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

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

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

.dday-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

/* 입력 */
.dday-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dday-input-box {
  min-width: 0;
}

.dday-page .utility-field-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 900;
  color: #0f172a;
}

.dday-page .utility-input {
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #ffffff;
  padding: 0 16px;
  font-size: 15px;
  color: #0f172a;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.dday-page .utility-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* 버튼 */
.dday-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

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

.dday-page .utility-btn-primary {
  border-color: #312e81;
  background: linear-gradient(135deg, #312e81, #2563eb);
  color: #ffffff;
}

.dday-page .utility-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(37, 99, 235, 0.24);
}

.dday-clear-saved-btn {
  white-space: nowrap;
}

/* 메인 결과 */
.dday-highlight-box {
  margin-top: 28px;
  padding: 42px 28px;
  border-radius: 28px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.16), transparent 36%),
    linear-gradient(180deg, #f8faff 0%, #eef4ff 100%);
  text-align: center;
}

.dday-highlight-label {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.dday-highlight-value {
  display: block;
  font-size: clamp(54px, 7vw, 82px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #0f172a;
}

.dday-highlight-desc {
  max-width: 760px;
  margin: 18px auto 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.8;
}

/* 결과 카드 */
.dday-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.dday-result-box {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.05);
}

.dday-result-label {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.dday-result-value {
  display: block;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}

/* 상세 */
.dday-detail-box {
  margin-top: 24px;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
}

.dday-detail-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.dday-detail-list {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  line-height: 2;
}

.dday-detail-list strong {
  color: #0f172a;
}

/* 메시지 */
.dday-message-box {
  margin-top: 22px;
  min-height: 90px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  background:
    linear-gradient(135deg, #eef2ff, #eff6ff);
  color: #3730a3;
  line-height: 1.8;
}

/* 저장 목록 */
.dday-saved-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dday-saved-item {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.05);
}

.dday-saved-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background:
    linear-gradient(90deg, #6366f1, #06b6d4);
}

.dday-saved-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.dday-saved-main {
  margin-bottom: 14px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #312e81;
}

.dday-saved-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

.dday-saved-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dday-saved-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.dday-saved-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.4);
  background: #eef2ff;
}

.dday-empty-box {
  grid-column: 1 / -1;
  padding: 40px 24px;
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: #f8fafc;
  text-align: center;
  color: #64748b;
  font-size: 15px;
  line-height: 1.8;
}

/* 도움말 */
.dday-page .help-panel {
  margin-top: 32px;
}

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

.dday-page .help-box {
  border-radius: 24px;
}

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

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

.dday-page .help-toggle-box summary::after {
  content: "+";
  color: #64748b;
  font-size: 20px;
  font-weight: 700;
}

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

.dday-page .help-toggle-content {
  margin-top: 16px;
}

.dday-page .help-toggle-content p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

/* 반응형 */
@media (max-width: 960px) {
  .dday-input-grid,
  .dday-result-grid,
  .dday-saved-list,
  .dday-summary-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dday-page {
    padding: 0 0 28px;
  }

  .dday-page .utility-top {
    padding: 24px 14px 22px;
  }

  .dday-card,
  .dday-saved-card {
    padding: 22px;
    border-radius: 22px;
  }

  .dday-card-head {
    grid-template-columns: 1fr;
  }

  .dday-btn-row,
  .dday-page .utility-btn {
    width: 100%;
  }

  .dday-highlight-box {
    padding: 34px 18px;
    border-radius: 24px;
  }

  .dday-highlight-desc {
    font-size: 15px;
  }

  .dday-result-value {
    font-size: 30px;
  }

  .dday-saved-main {
    font-size: 30px;
  }

  .dday-page .utility-title {
    font-size: 34px;
  }
}

@media (max-width: 480px) {
  .dday-highlight-value {
    font-size: 48px;
  }

  .dday-result-box,
  .dday-saved-item {
    padding: 20px;
  }
}