.hbd-acc {
  --hbd-ink: #111;
  --hbd-muted: #767676;
  --hbd-line: #e5e5e5;
  --hbd-soft: #f7f7f7;
  --hbd-accent: #b41d2b;

  box-sizing: border-box;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 48px;
  color: var(--hbd-ink);
  font-size: 15px;
  line-height: 1.7;
}
.hbd-acc *, .hbd-acc *::before, .hbd-acc *::after { box-sizing: border-box; }
/* 個別の指定より弱くするため :where で詳細度を0にする */
:where(.hbd-acc) :where(p, ol, ul, dl, dd, h1, h2) { margin: 0; }
:where(.hbd-acc) a { color: inherit; }

/* 見出しはテーマのページタイトルに任せ、ここは説明文だけ */
.hbd-acc p.hbd-lg-lead { margin-bottom: 16px; color: #444; font-size: 14px; }
.hbd-acc-h2 { font-size: 16px; font-weight: 700; line-height: 1.4; }
/* テーマが本文の見出しに付ける線や飾りを消す */
.hbd-acc .hbd-acc-h2 { margin: 0; padding: 0; border: 0; background: none; }
.hbd-acc .hbd-acc-h2::before,
.hbd-acc .hbd-acc-h2::after { content: none; }

.hbd-acc-card {
  margin-top: 16px;
  padding: 28px;
  border: 1px solid var(--hbd-line);
  background: #fff;
}
.hbd-acc-card:first-child,
.hbd-lg-lead + .hbd-acc-card,
.hbd-lg-msg + .hbd-acc-card { margin-top: 0; }
.hbd-lg-card { border-top: 3px solid var(--hbd-ink); }

/* お知らせ（入力の誤り・完了） */
.hbd-acc p.hbd-lg-msg {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-left: 3px solid;
  font-size: 13px;
  font-weight: 700;
}
.hbd-lg-msg.is-error { border-color: var(--hbd-accent); background: #fbf1f2; color: var(--hbd-accent); }
.hbd-lg-msg.is-success { border-color: #2e7d4f; background: #eef6f1; color: #2e7d4f; }

/* フォーム */
.hbd-lg-form { display: grid; gap: 18px; }
.hbd-lg-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.hbd-acc .hbd-lg-field input {
  display: block;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #ccc;
  border-radius: 0;
  background: #fff;
  color: var(--hbd-ink);
  font: inherit;
  font-size: 16px;
  box-shadow: none;
}
.hbd-acc .hbd-lg-field input:focus { border-color: var(--hbd-ink); outline: 2px solid rgba(17, 17, 17, .12); outline-offset: 0; }
.hbd-lg-pass { position: relative; }
.hbd-acc .hbd-lg-pass input { padding-right: 64px; }
.hbd-acc .hbd-lg-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 4px 10px;
  border: 0;
  background: none;
  color: var(--hbd-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.hbd-acc .hbd-lg-toggle:hover { color: var(--hbd-ink); }
.hbd-acc p.hbd-lg-hint { margin-top: 6px; color: var(--hbd-muted); font-size: 12px; }
.hbd-lg-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.hbd-lg-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--hbd-ink); }

.hbd-acc p.hbd-lg-link { margin-top: 18px; text-align: center; font-size: 13px; }
.hbd-lg-link a,
.hbd-lg-help a { text-decoration: underline; text-underline-offset: 3px; }
.hbd-acc p.hbd-lg-text { font-size: 14px; }

/* はじめての方 */
.hbd-lg-join { border-color: var(--hbd-soft); background: var(--hbd-soft); }
.hbd-lg-join .hbd-lg-text { margin-top: 6px; color: #444; }

/* メール送信済み */
.hbd-lg-sent { border-top: 3px solid var(--hbd-accent); text-align: center; }
.hbd-lg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fbf1f2;
  color: var(--hbd-accent);
}
.hbd-acc .hbd-lg-help { margin: 18px 0 0; padding: 0; list-style: none; color: var(--hbd-muted); font-size: 12px; }
.hbd-acc .hbd-lg-help li { margin: 0; }
.hbd-lg-sent .hbd-acc-actions { justify-content: center; }

/* ボタン */
.hbd-acc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hbd-acc .hbd-acc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 12px 22px;
  border: 1px solid var(--hbd-ink);
  border-radius: 0;
  background: #fff;
  color: var(--hbd-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.hbd-acc .hbd-acc-btn:hover { background: var(--hbd-ink); color: #fff; }
.hbd-acc .hbd-acc-btn.is-primary { background: var(--hbd-ink); color: #fff; }
.hbd-acc .hbd-acc-btn.is-primary:hover { border-color: var(--hbd-accent); background: var(--hbd-accent); }
.hbd-acc .hbd-lg-submit { width: 100%; margin-top: 4px; padding: 14px 22px; font-size: 15px; }

@media (max-width: 600px) {
  .hbd-acc { font-size: 14px; }
  .hbd-acc-card { padding: 22px 18px; }
  .hbd-acc .hbd-acc-btn { width: 100%; }
}
