/* 임신 주수·출산 예정일 계산기 전용 스타일 */

nav { max-width: 820px; }
main { max-width: 820px; }

/* 입력 카드 */
.input-card {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.95rem;
}

.method-row {
  display: flex;
  gap: 0.3rem;
  padding: 0.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.85rem;
}

.method-btn {
  flex: 1;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-sub);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.method-btn:hover {
  color: var(--text);
}
.method-btn.active {
  background: var(--primary);
  color: #fff;
}

.date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.85rem;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.date-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-sub);
}

#ref-date {
  padding: 0.55rem 0.7rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  min-width: 180px;
}
#ref-date:focus {
  border-color: var(--primary);
}

.multi-chk {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  padding-bottom: 0.55rem;
}
.multi-chk input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* 결과 카드 (큰 디스플레이) */
.result-card {
  padding: 1.5rem 1.4rem;
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.08), rgba(102, 126, 234, 0.08));
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 0.95rem;
  text-align: center;
}

.big-week {
  margin-bottom: 0.85rem;
}

.big-week-num {
  display: block;
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.big-week-sub {
  display: block;
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-top: 0.2rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.due-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

.due-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.due-date {
  font-weight: 800;
  color: var(--text);
}

.due-extra {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.trimester-row {
  margin-bottom: 0.95rem;
}

.tri-tag {
  display: inline-block;
  padding: 0.3rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.tri-tag.tri-1 { background: rgba(245, 158, 11, 0.15); color: #b45309; border-color: rgba(245, 158, 11, 0.4); }
.tri-tag.tri-2 { background: rgba(34, 197, 94, 0.15);  color: #15803d; border-color: rgba(34, 197, 94, 0.4); }
.tri-tag.tri-3 { background: rgba(139, 92, 246, 0.15); color: #6d28d9; border-color: rgba(139, 92, 246, 0.4); }

.progress-track {
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6);
  transition: width 0.35s;
}
.progress-meta {
  font-size: 0.85rem;
  color: var(--text-sub);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* 마일스톤 카드 */
.milestones-card,
.leave-card {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.95rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.ms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ms-row {
  display: grid;
  grid-template-columns: 50px 1fr auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.9rem;
}

.ms-week {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ms-name {
  color: var(--text);
  font-weight: 600;
}
.ms-date {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--text-sub);
  white-space: nowrap;
}
.ms-state {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.ms-row.ms-past { opacity: 0.6; }
.ms-row.ms-past .ms-state {
  background: var(--bg);
  color: var(--text-sub);
  border: 1px solid var(--border);
}
.ms-row.ms-today {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.07);
}
.ms-row.ms-today .ms-state {
  background: var(--primary);
  color: #fff;
}
.ms-row.ms-upcoming .ms-state {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* 출산 휴가 카드 */
.leave-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.leave-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.leave-label {
  font-size: 0.85rem;
  color: var(--text-sub);
  font-weight: 600;
}
.leave-date {
  font-weight: 800;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.leave-note {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--text-sub);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .ms-row { grid-template-columns: 40px 1fr auto; gap: 0.45rem; padding: 0.5rem 0.6rem; }
  .ms-state { grid-column: 1 / -1; justify-self: end; }
  .ms-date { font-size: 0.75rem; }
  .date-row { gap: 0.55rem; }
  .multi-chk { padding-bottom: 0; }
}
