/* ===== Reset-ish ===== */
.agecalc-wrap * { box-sizing: border-box; }
.agecalc-wrap { width: 100%; }
.agecalc-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: #111;
}

/* ===== Header ===== */
.agecalc-header { text-align: center; margin: 10px 0 18px; }
.agecalc-title { font-size: 34px; line-height: 1.2; margin: 0 0 8px; font-weight: 800; }
.agecalc-subtitle { margin: 0; color: #666; font-size: 14px; }

/* ===== Card ===== */
.agecalc-card {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.05);
}

.agecalc-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #e9edf3;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
}

.field input[type="date"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  outline: none;
  font-size: 15px;
  background: #fff;
}

.field input[type="date"]:focus {
  border-color: #7bb2ff;
  box-shadow: 0 0 0 3px rgba(123, 178, 255, 0.18);
}

.hint { margin: 8px 0 0; font-size: 12px; color: #777; }

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn {
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #d8e0ea;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.btn.primary {
  border-color: #2b7cff;
  background: #2b7cff;
  color: #fff;
}

.btn.primary:hover { filter: brightness(0.98); }
.btn.ghost:hover { background: #f6f8fb; }

/* ===== Result ===== */
.agecalc-result { padding-top: 16px; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.result-box {
  border: 1px solid #e9edf3;
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: #fbfcff;
  position: relative;
  min-height: 92px;
}

.result-label {
  font-size: 13px;
  color: #556;
  font-weight: 700;
  margin-bottom: 10px;
}

.result-value {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: inline-block;
}

.result-unit {
  display: inline-block;
  margin-left: 6px;
  font-size: 16px;
  font-weight: 800;
  color: #333;
}

.result-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: #667;
  font-size: 12px;
}

.meta-item {
  padding: 6px 10px;
  background: #f6f8fb;
  border: 1px solid #e9edf3;
  border-radius: 999px;
}

.result-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ffd1d1;
  background: #fff5f5;
  color: #b10000;
  font-size: 13px;
  display: none;
}

/* ===== Notes ===== */
.agecalc-notes { margin-top: 18px; }
.notes-title { font-size: 18px; margin: 0 0 10px; font-weight: 900; }

.notes-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.note-item {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 14px;
  padding: 14px;
}

.note-head { font-weight: 900; margin-bottom: 8px; }
.note-body { color: #444; font-size: 14px; line-height: 1.6; }

/* ===== Footer ===== */
.agecalc-footer {
  text-align: center;
  margin-top: 18px;
  color: #999;
  font-size: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 560px) {
  .agecalc-title { font-size: 28px; }
  .result-grid { grid-template-columns: 1fr; }
  .actions { justify-content: stretch; }
  .btn { flex: 1; }
}
.hint-sub {
  margin-left: 6px;
  color: #888;
  font-weight: 600;
}
