/* ひとり親の年間支援額シミュレーター（/hitorioya-shien/）専用。共通部品は /css/guide.css。
   カードは白＋罫線＋アクセント文字色（濃い色の背景パネルは使わない） */

.hs-nowrap { display: inline-block; }

/* ---- 入力フォーム ---- */
.hs-form {
  display: grid; gap: 22px; padding: 20px; margin: 0 0 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.hs-field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.hs-label { padding: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.guide-sec .hs-hint { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); }

.hs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hs-chip {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  min-width: 56px; min-height: 44px; padding: 0 16px;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer;
  transition: transform .12s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.hs-chip:hover { border-color: var(--accent); }
.hs-chip[aria-checked="true"] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-ink); }
.hs-chip:active { transform: scale(.95); }
.hs-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent-bg); }

.hs-ages { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.hs-age { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hs-age.is-new { animation: hs-rise .32s cubic-bezier(.2, .8, .2, 1) both; }

.hs-form select,
.hs-input-unit input {
  width: 100%; min-height: 48px; padding: 10px 12px; box-sizing: border-box;
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px;
}
.hs-form select:focus-visible,
.hs-input-unit input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent-bg); border-color: var(--accent); }
.hs-form select:disabled { opacity: .6; }
.hs-input-unit { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.hs-input-unit input { max-width: 180px; text-align: right; font-variant-numeric: tabular-nums; }
.hs-input-unit input[aria-invalid="true"] { border-color: #B42318; }

.hs-region { display: grid; gap: 12px; }
.hs-region-field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }

.guide-sec .hs-error { margin: 0; font-size: 14px; font-weight: 700; color: #B42318; }

.hs-submit {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1.2;
  width: 100%; min-height: 52px; padding: 12px 24px;
  font: inherit; font-size: 16px; font-weight: 700; color: #fff;
  background: var(--accent); border: 0; border-radius: 8px; cursor: pointer;
  transition: transform .12s ease, background-color .2s ease;
}
.hs-submit:hover { background: var(--accent-ink); }
.hs-submit:active { transform: scale(.97); }
.hs-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent-bg); }

/* ---- 結果 ---- */
/* 上端のヘッダー（sticky・約80px）と追従帯（.guide-bar・約53px）に隠れないよう余白を取る */
.hs-result { margin-top: 24px; scroll-margin-top: 148px; }
.hs-total {
  padding: 22px 20px; text-align: center;
  background: var(--surface); border: 1px solid var(--accent); border-radius: 8px;
}
.guide-sec .hs-total-label { margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); line-height: 1.6; }
.guide-sec .hs-total-value {
  margin: 0; font-size: 36px; font-weight: 700; line-height: 1.25; color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}
.hs-total-value small { margin-left: 2px; font-size: 16px; font-weight: 700; }
.guide-sec .hs-total-sub { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

.guide-sec .hs-block-title { margin: 32px 0 10px; font-size: 16px; }
.hs-rows { margin: 0; border-top: 1px solid var(--line); }
.hs-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hs-row dt { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.6; }
.hs-row dd { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.hs-row .hs-row-sub { grid-column: 1 / -1; font-size: 12.5px; font-weight: 400; color: var(--ink-2); line-height: 1.7; white-space: normal; }
.hs-row.is-zero dd { color: var(--ink-3); }
.hs-badge {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  margin-left: 6px; padding: 4px 8px; border-radius: 4px; vertical-align: 2px;
  font-size: 11.5px; font-weight: 700; background: var(--accent-bg); color: var(--accent-ink);
}
.hs-badge.is-muted { background: var(--line-soft); color: var(--ink-2); }
.guide-sec .hs-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }

.hs-cards { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; align-items: stretch; }
.hs-card {
  height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.hs-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hs-card-title { font-size: 15px; font-weight: 700; line-height: 1.5; word-break: auto-phrase; line-break: strict; }
.hs-card-body { flex: 1 0 auto; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.hs-card a { font-size: 13px; font-weight: 700; }

.hs-local { margin-top: 8px; }
.hs-local-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.hs-local-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hs-local-scope { display: inline-block; margin-right: 6px; font-size: 11.5px; font-weight: 700; color: var(--accent-ink); }
.hs-local-name { font-size: 15px; font-weight: 700; line-height: 1.6; }
.hs-local-amount { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.guide-sec .hs-local-summary { margin: 4px 0 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.hs-local-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 700; }
.hs-local-more {
  display: flex; align-items: center; justify-content: center; line-height: 1.3; text-align: center;
  min-height: 52px; margin-top: 14px; padding: 12px 18px; box-sizing: border-box;
  border: 1px solid var(--accent); border-radius: 8px; color: var(--accent-ink); font-size: 15px; font-weight: 700; text-decoration: none;
  transition: transform .12s ease, background-color .2s ease;
}
.guide .hs-local-more { color: var(--accent-ink); }
.hs-local-more:hover { background: var(--accent-bg); }
.hs-local-more:active { transform: scale(.98); }
.hs-local-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent-bg); }
.guide-sec .hs-assume { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* ---- モーション（入場・押下・更新）。動きを減らす設定では止める ---- */
@keyframes hs-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hs-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.hs-result.is-entering .hs-total { animation: hs-rise .4s cubic-bezier(.2, .8, .2, 1) both; }
.hs-result.is-entering .hs-row,
.hs-result.is-entering .hs-card,
.hs-result.is-entering .hs-local-item {
  animation: hs-rise .42s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(.12s + var(--i, 0) * .05s);
}
.hs-total-value.is-updated { animation: hs-pulse .32s ease; }

@media (prefers-reduced-motion: reduce) {
  .hs-chip, .hs-submit, .hs-local-more { transition: none; }
  .hs-chip:active, .hs-submit:active, .hs-local-more:active { transform: none; }
  .hs-age.is-new,
  .hs-result.is-entering .hs-total,
  .hs-result.is-entering .hs-row,
  .hs-result.is-entering .hs-card,
  .hs-result.is-entering .hs-local-item,
  .hs-total-value.is-updated { animation: none; }
}

@media (min-width: 640px) {
  .hs-form { padding: 24px; }
  .hs-region { grid-template-columns: 1fr 1fr; }
  .hs-cards { grid-template-columns: 1fr 1fr; }
  .guide-sec .hs-total-value { font-size: 42px; }
}
