:root {
  --bg: #f5f7fb;
  --card: #ffffff;

  /* 포인트 색 (기본: 핑크) */
  --accent: #ffb6c1;
  --accent-dark: #ff7b96;

  /* 배경 그라디언트 */
  --bg-grad-top: #ffe4ec;
  --bg-grad-mid: #f5f7fb;
  --bg-grad-bottom: #e1ecff;

  /* 태그/하이라이트/박스 색 */
  --tag-bg: #ffe8ef;
  --tag-text: #c44d6a;
  --highlight: #c44d6a;

  --bottle-bg: #f9f0f4;
  --bottle-border: #f2d7e2;

  --button-shadow: rgba(255, 123, 150, 0.35);

  --text-main: #333333;
  --text-muted: #777777;

  --radius: 12px;
}

/* ===========================
   성별별 테마 (남아/여아)
   =========================== */

/* 남아(파란 계열) */
body.theme-male {
  --accent: #4a90e2;
  --accent-dark: #1c5fb8;

  --bg-grad-top: #e0f0ff;
  --bg-grad-mid: #f5f7fb;
  --bg-grad-bottom: #d3e5ff;

  --tag-bg: #e3f1ff;
  --tag-text: #1c5fb8;

  --bottle-bg: #e8f2ff;
  --bottle-border: #c7dcff;

  --highlight: #1c5fb8;
  --button-shadow: rgba(52, 114, 214, 0.35);
}

/* ===========================
   기본 스타일
   =========================== */

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(
    circle at top,
    var(--bg-grad-top) 0,
    var(--bg-grad-mid) 40%,
    var(--bg-grad-bottom) 100%
  );
  color: var(--text-main);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 12px 40px;
}

header {
  text-align: center;
  margin-bottom: 10px;
}

header h1 {
  font-size: 1.8rem;
  margin: 0 0 6px;
}

header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.today-info {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* 공통 카드 */
.card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  margin-bottom: 12px;
}

.card h2 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--highlight);
}

.card h3 {
  font-size: 0.95rem;
  margin: 8px 0 4px;
}

/* 태그 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--tag-bg);
  color: var(--tag-text);
}

/* 입력 카드 */
.input-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 200px;
}

label {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

input[type="text"],
input[type="number"],
select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d0d4e4;
  font-size: 0.95rem;
}

/* 버튼 */
button {
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 6px 14px var(--button-shadow);
}

button.secondary {
  background: #e5e7f5;
  color: #555;
  box-shadow: none;
}

button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* 날짜 입력 */
.dob-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dob-wrapper input[type="text"] {
  flex: 1 1 auto;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  min-width: 0;
  font-size: 18px;
  line-height: 1;
}

/* 결과 영역 */
.results {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 900px) {
  .results {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 결과 한 줄 */
.data-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  padding: 3px 0;
  font-size: 0.95rem;
}

.data-row .label {
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}

.data-row .value {
  font-weight: 600;
  text-align: left;
}

/* 젖병 · 쪽쪽이 */
.subsection-title {
  margin: 6px 0 4px;
  font-size: 0.85rem;
  color: var(--highlight);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bottle-box {
  background: var(--bottle-bg);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 2px;
  border: 1px solid var(--bottle-border);
}

.bottle-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr);
  column-gap: 8px;
  align-items: center;
  padding: 2px 0;
  font-size: 0.9rem;
}

.bottle-label {
  color: var(--text-muted);
  white-space: nowrap;
}

.bottle-value {
  font-weight: 600;
  text-align: left;
  word-break: keep-all;
}

.bottle-box .muted {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 4px 0;
}

/* 기타 */
.muted {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 6px;
  line-height: 1.5;
}

.highlight {
  color: var(--highlight);
  font-weight: 600;
}

.error {
  color: #b00020;
  font-size: 0.85rem;
}

footer {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.divider {
  border: none;
  border-top: 1px dashed #dde0ef;
  margin: 8px 0;
}
