main {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 2rem 1rem;
  background: #f0f0f0;
  box-sizing: border-box;
}

.container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  padding: 28px;
  width: min(880px, 94vw);
  display: grid;
  gap: 22px;
}

.tool-header {
  display: flex;
  flex-direction: column;
  align-items: center; /* ← タイトルを左右中央に */
  justify-content: center;
  text-align: center;  /* テキスト内容も中央揃え */
}

.tool-header h1 {
  margin: 0 auto 0.3rem; /* 左右中央揃え */
  font-size: 1.6rem;
  font-weight: 700;
}

.tool-header .sub {
  margin: 0;
  color: #666;
  font-size: .95rem;
  text-align: center; /* 念のためサブも中央に */
}

/* ---------- 横並びフォーム ---------- */
.form-horizontal {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2rem;
  text-align: center;
}

.field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}
.field label {
  font-weight: 700;
  font-size: .95rem;
}
.field select {
  padding: .55rem .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  background: #fafafa;
  width: 220px; /* バランスの取れた幅 */
}

/* 生年月日入力 */
.dob-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.dob-input {
  width: 7ch;
  padding: .45rem .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  font-size: 1rem;
  text-align: right;
}
.dob-input.y { width: 10ch; }
.dob-input.m, .dob-input.d { width: 6ch; }
.sep { color:#555; }
.dob-input.is-invalid {
  border-color: #e03131;
  background: #fff5f5;
}

/* ボタン中央寄せ */
.actions-center {
  display: flex;
  justify-content: center;
}
.actions-center button {
  padding: .6rem 1.2rem;
  border: 2px solid #000;
  background: #fff;
  color: #000;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
}
.actions-center button:hover {
  background: #000;
  color: #fff;
}

/* ---------- 結果テーブル ---------- */
.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 1rem;
}

.result-table-wrap {
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.result-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
  font-size: 0.98rem;
}
.result-table thead th {
  background: #f6f8fb;
  border-bottom: 2px solid #cfd6e4;
  text-align: left;
  padding: .6rem .75rem;
  font-weight: 700;
}
.result-table tbody td {
  border-top: 1px solid #e6e9ef;
  padding: .55rem .75rem;
}
.result-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
.col-label { width: 40%; }
.col-when  { width: 24%; }
.col-note  { width: 36%; color:#555; }

.result-empty {
  color:#777;
  text-align:center;
  padding: .5rem 0;
}

.note {
  color:#666;
  font-size:.9rem;
  line-height:1.7;
  text-align:center;
}
