/*
  案 mail-auth（メール認証の設定代行）の見た目。共通の style.css の後に読む。
  文と部品（フォーム・診断・特商法・個人情報）は共通のまま。ここでは色・書体の太さと字間・余白・
  区画の並び・画像・ボタン・カードだけを変える。要件は design/mail-auth/brief.md。
  色：主 #17325c（紺）、補助 #eef3fa（淡い青）、強調 #c2410c（焼き橙、白の文字で 5.18）、
      背景 #ffffff / #f7f9fc、本文 #1b2838、補足 #5b6b7d（#f7f9fc の上で 5.18）、差し色 #0f766e。
*/
.theme-mail-auth {
  --navy: #17325c;
  --navy-2: #22457a;
  --pale: #eef3fa;
  --hero-bg: #f8f9fd;
  --soft: #f7f9fc;
  --accent: #c2410c;
  --accent-dark: #9a3412;
  --teal: #0f766e;
  --ink: #1b2838;
  --sub: #5b6b7d;
  --line: #dfe6f0;
  --shadow: 0 1px 2px rgba(23, 50, 92, 0.06), 0 8px 24px rgba(23, 50, 92, 0.08);
  color: var(--ink);
  background: #fff;
  line-height: 1.85;
  letter-spacing: 0.03em;
  font-feature-settings: "palt" 0;
}
.theme-mail-auth .wrap {
  max-width: 1080px;
  padding: 0 24px;
}
.theme-mail-auth .narrow {
  max-width: 720px;
}
.theme-mail-auth a {
  color: var(--navy-2);
}
.theme-mail-auth .note {
  color: var(--sub);
}
.theme-mail-auth h1,
.theme-mail-auth h2,
.theme-mail-auth h3 {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--navy);
}

/* ---- ボタン ---- */
.theme-mail-auth .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.8em 2em;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 16px rgba(194, 65, 12, 0.28);
  transition: background 0.15s, transform 0.15s;
}
.theme-mail-auth .btn::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.9em;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: rotate(45deg);
}
.theme-mail-auth .btn:hover,
.theme-mail-auth .btn:focus {
  background: var(--accent-dark);
  color: #fff;
}
.theme-mail-auth .btn:focus-visible {
  outline: 3px solid #f5b841;
  outline-offset: 3px;
}
.theme-mail-auth .hero a.btn {
  color: #fff;
}

/* ---- 上の帯（屋号と主なボタン） ---- */
.theme-mail-auth .topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.theme-mail-auth .topbar .wrap {
  min-height: 60px;
}
.theme-mail-auth .topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1.02rem;
}
.theme-mail-auth .topbar .brand::before {
  content: "";
  width: 26px;
  height: 26px;
  background: url("/themes/mail-auth/mark.svg") center / contain no-repeat;
}
.theme-mail-auth .btn-small {
  min-height: 44px;
  padding: 0.5em 1.3em;
  font-size: 0.92rem;
  box-shadow: none;
}

.theme-mail-auth .topbar .brand {
  white-space: nowrap;
}
@media (max-width: 719px) {
  .theme-mail-auth .topbar .btn-small {
    display: none;
  }
  .theme-mail-auth .topbar .wrap {
    min-height: 52px;
  }
}

/* ---- 最初の画面 ---- */
.theme-mail-auth .hero {
  background: var(--hero-bg);
  color: var(--ink);
  padding: 22px 0 30px;
  overflow: hidden;
}
.theme-mail-auth .hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.theme-mail-auth .hero p {
  max-width: none;
}
.theme-mail-auth .hero .eyebrow {
  display: inline-block;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #c9d6ea;
  margin-bottom: 0.9em;
}
.theme-mail-auth .hero h1 {
  font-size: 1.62rem;
  line-height: 1.4;
  margin-bottom: 0.45em;
}
.theme-mail-auth .hero .price {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8em;
}
.theme-mail-auth .hero .price strong {
  white-space: nowrap;
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-left: 0.15em;
}
.theme-mail-auth .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 1.1em;
}
.theme-mail-auth .cta a {
  flex: 1 1 100%;
}
.theme-mail-auth .cta .btn {
  font-size: 1.08rem;
}
.theme-mail-auth .btn-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6em 1.6em;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.theme-mail-auth .cta .btn-sub {
  margin-left: 0;
}
.theme-mail-auth .hero a.btn-sub {
  color: var(--navy);
}
.theme-mail-auth .btn-sub:hover,
.theme-mail-auth .btn-sub:focus {
  background: var(--pale);
}
.theme-mail-auth .points {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  display: grid;
  gap: 6px;
}
.theme-mail-auth .points li {
  position: relative;
  margin: 0;
  padding-left: 30px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.6;
}
.theme-mail-auth .points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12em;
  width: 20px;
  height: 20px;
  background: url("/themes/mail-auth/check.svg") center / contain no-repeat;
}
.theme-mail-auth .hero .lead {
  color: #34445a;
  font-size: 0.93rem;
}
.theme-mail-auth .hero .note {
  color: var(--sub);
  font-size: 0.82rem;
  border-left: 3px solid #d3dceb;
  padding-left: 0.9em;
  margin-bottom: 0.6em;
}

/* 区画の間の主なボタン */
.theme-mail-auth .cta-band {
  padding: 0 0 56px;
}
.theme-mail-auth .cta-band .cta {
  justify-content: center;
  margin: 0;
}
.theme-mail-auth #flow + .cta-band {
  background: #fff;
}

/* スマホの下に固定する主なボタン（最初の画面とフォームが見えている間は隠す。スクリプトが無ければ常に出す） */
.theme-mail-auth .sticky-cta {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  margin: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(23, 50, 92, 0.08);
  transition: transform 0.2s;
}
.theme-mail-auth .sticky-cta .btn {
  width: 100%;
  min-height: 50px;
}
.theme-mail-auth.js-sticky .sticky-cta {
  transform: translateY(110%);
}
.theme-mail-auth.js-sticky .sticky-cta.is-shown {
  transform: none;
}
.theme-mail-auth footer {
  padding-bottom: 96px;
}

/* ---- 区画の共通 ---- */
.theme-mail-auth section {
  padding: 64px 0 56px;
}
.theme-mail-auth section h2 {
  border: 0;
  padding: 0;
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 1.4em;
}
.theme-mail-auth section h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin: 0.55em auto 0;
  border-radius: 2px;
  background: var(--teal);
}
.theme-mail-auth #work,
.theme-mail-auth #not,
.theme-mail-auth #faq {
  background: var(--soft);
}

/* 無料の診断：最初の画面のすぐ下の帯 */
.theme-mail-auth .diag {
  background: var(--pale);
  padding: 40px 0 32px;
}
.theme-mail-auth .diag h2 {
  font-size: 1.2rem;
  margin-bottom: 0.8em;
}
.theme-mail-auth .diag .wrap > p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.92rem;
}
.theme-mail-auth .diag form,
.theme-mail-auth .consult form {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.theme-mail-auth .diag .btn {
  width: 100%;
  background: var(--navy);
  box-shadow: none;
}
.theme-mail-auth .diag .btn:hover,
.theme-mail-auth .diag .btn:focus {
  background: var(--navy-2);
}
.theme-mail-auth input[type="text"],
.theme-mail-auth input[type="email"],
.theme-mail-auth select,
.theme-mail-auth textarea {
  min-height: 48px;
  border: 1.5px solid #b8c4d4;
  border-radius: 10px;
  padding: 0.65em 0.9em;
  background: #fff;
}
.theme-mail-auth input:focus,
.theme-mail-auth select:focus,
.theme-mail-auth textarea:focus {
  outline: 3px solid rgba(34, 69, 122, 0.25);
  border-color: var(--navy-2);
}
.theme-mail-auth .req {
  color: #b42318;
}

/* こんなとき：アイコンつきのカード */
.theme-mail-auth #when ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 1.4em;
}
.theme-mail-auth #when li {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px 16px 76px;
  min-height: 76px;
  display: flex;
  align-items: center;
  position: relative;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.6;
}
.theme-mail-auth #when li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 12px;
  background: var(--pale) url("/themes/mail-auth/when-1.svg") center / 32px no-repeat;
}
.theme-mail-auth #when li:nth-child(2)::before {
  background-image: url("/themes/mail-auth/when-2.svg");
}
.theme-mail-auth #when li:nth-child(3)::before {
  background-image: url("/themes/mail-auth/when-3.svg");
}
.theme-mail-auth #when li:nth-child(4)::before {
  background-image: url("/themes/mail-auth/when-4.svg");
}
.theme-mail-auth #when li:nth-child(5)::before {
  background-image: url("/themes/mail-auth/when-5.svg");
}
.theme-mail-auth #when .note {
  text-align: center;
}

/* していること：番号つきの2列 */
.theme-mail-auth #work ul {
  list-style: none;
  counter-reset: work;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px 22px 8px;
  margin-bottom: 1.4em;
}
.theme-mail-auth #work li {
  counter-increment: work;
  position: relative;
  padding-left: 44px;
  margin-bottom: 1em;
  font-size: 0.95rem;
}
.theme-mail-auth #work li::before {
  content: counter(work);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  letter-spacing: 0;
}
.theme-mail-auth #work .note,
.theme-mail-auth #how .note {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 14px 18px;
}

/* 進め方：A・Bの2枚のカード */
.theme-mail-auth #how .wrap > p:not(.note) {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.theme-mail-auth #how ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 1.4em 0;
}
.theme-mail-auth #how li {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  font-size: 0.95rem;
}
.theme-mail-auth #how li:first-child {
  border-top-color: var(--teal);
}

/* しないこと：×の印 */
.theme-mail-auth #not ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-width: 900px;
  margin: 0 auto 1em;
}
.theme-mail-auth #not li {
  margin: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 16px 12px 50px;
  position: relative;
  font-size: 0.95rem;
}
.theme-mail-auth #not li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 15px;
  width: 22px;
  height: 22px;
  background: url("/themes/mail-auth/cross.svg") center / contain no-repeat;
}

/* 流れ：番号の丸と線 */
.theme-mail-auth .steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  position: relative;
}
.theme-mail-auth .steps li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px 16px 68px;
  margin: 0 0 18px;
  font-size: 0.93rem;
}
.theme-mail-auth .steps li::before {
  left: 16px;
  top: 16px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  background: var(--navy);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 0 0 4px var(--pale);
}

/* よくある質問 */
.theme-mail-auth .faq {
  max-width: 860px;
  margin: 0 auto;
}
.theme-mail-auth .faq dt {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  padding: 16px 20px 6px;
  margin-top: 14px;
  color: var(--navy);
  border-left: 5px solid var(--navy);
}
.theme-mail-auth .faq dd {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 2px 20px 16px;
  margin: 0;
  border-left: 5px solid var(--teal);
  font-size: 0.95rem;
}

/* 料金の表 */
.theme-mail-auth #terms table.kv {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
}
.theme-mail-auth table.kv th,
.theme-mail-auth table.kv td,
.theme-mail-auth table.result th,
.theme-mail-auth table.result td {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.9em 1.1em;
}
.theme-mail-auth table.kv tr:last-child th,
.theme-mail-auth table.kv tr:last-child td {
  border-bottom: 0;
}
.theme-mail-auth table.kv th,
.theme-mail-auth table.result th {
  background: var(--pale);
  color: var(--navy);
}
.theme-mail-auth #terms tr:first-child td {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.15rem;
}
.theme-mail-auth #terms .note {
  text-align: center;
}

/* 申込みのフォーム */
.theme-mail-auth .consult {
  background: linear-gradient(180deg, var(--pale) 0%, #e3ecf8 100%);
  margin-top: 0;
  padding: 64px 0 64px;
}
.theme-mail-auth .consult .wrap > p {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.theme-mail-auth .consult .btn {
  width: 100%;
  font-size: 1.1rem;
  min-height: 56px;
  margin-top: 0.4em;
}
.theme-mail-auth .consult form > .note:last-child {
  text-align: center;
}

/* 診断の結果の頁 */
.theme-mail-auth #result table.result {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.theme-mail-auth #result .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0;
}
.theme-mail-auth #result .cta a {
  font-size: 1rem;
}

/* 下の帯 */
.theme-mail-auth footer {
  background: var(--navy);
  color: #d9e2ef;
  padding: 36px 0;
}
.theme-mail-auth footer a {
  color: #fff;
}

/* フォームの任意の欄（たたむ） */
.theme-mail-auth details.more {
  border: 1.5px dashed #c3cfe0;
  border-radius: 12px;
  padding: 4px 16px;
  margin-bottom: 1.2em;
}
.theme-mail-auth details.more[open] {
  padding-bottom: 8px;
}
.theme-mail-auth details.more summary {
  color: var(--navy-2);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---- 広い画面 ---- */
@media (min-width: 720px) {
  .theme-mail-auth #when ul,
  .theme-mail-auth #how ul,
  .theme-mail-auth #not ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .theme-mail-auth .diag .btn {
    width: auto;
  }
  .theme-mail-auth .cta a {
    flex: 0 0 auto;
  }
  .theme-mail-auth section h2 {
    font-size: 1.65rem;
  }
  .theme-mail-auth .sticky-cta {
    display: none;
  }
  .theme-mail-auth footer {
    padding-bottom: 36px;
  }
  .theme-mail-auth .hero h1 {
    font-size: 2.1rem;
  }
}
@media (min-width: 960px) {
  .theme-mail-auth .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(6px);
  }
  .theme-mail-auth .hero {
    padding: 52px 0 64px;
  }
  .theme-mail-auth[data-page="case"] .hero .wrap {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    column-gap: 32px;
    align-items: center;
  }
  .theme-mail-auth[data-page="case"] .hero .wrap::after {
    content: "";
    aspect-ratio: 1 / 1;
    margin-right: -24px;
    background: url("/themes/mail-auth/hero.webp") center / contain no-repeat;
  }
  .theme-mail-auth .hero h1 {
    font-size: 2.45rem;
    line-height: 1.36;
  }
  .theme-mail-auth .hero .price strong {
    font-size: 2.7rem;
  }
  .theme-mail-auth .points {
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }
  .theme-mail-auth #when ul {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .theme-mail-auth #when li {
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
    padding: 84px 16px 20px;
    font-size: 0.9rem;
  }
  .theme-mail-auth #when li::before {
    left: 50%;
    top: 20px;
    margin: 0 0 0 -26px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-size: 34px;
  }
  .theme-mail-auth #work ul {
    columns: 2;
    column-gap: 48px;
    padding: 30px 34px 14px;
  }
  .theme-mail-auth #work li {
    break-inside: avoid;
  }
  .theme-mail-auth .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }
  .theme-mail-auth .steps::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 18px;
    height: 2px;
    background: var(--navy);
    opacity: 0.25;
  }
  .theme-mail-auth .steps li {
    padding: 56px 16px 18px;
    margin: 18px 0 0;
    font-size: 0.88rem;
    position: relative;
  }
  .theme-mail-auth .steps li::before {
    left: 50%;
    top: -18px;
    margin-left: -18px;
  }
}

/* ---- 仕上げ（2回目） ---- */
.theme-mail-auth .btn {
  white-space: nowrap;
}
.theme-mail-auth .consent input {
  width: 22px;
  height: 22px;
  margin-top: 0.2em;
  accent-color: var(--navy);
}
.theme-mail-auth .consent label {
  min-height: 44px;
  align-items: center;
}
@media (max-width: 719px) {
  .theme-mail-auth .btn {
    padding-left: 1.2em;
    padding-right: 1.2em;
    letter-spacing: 0.03em;
  }
  .theme-mail-auth section {
    padding: 48px 0 40px;
  }
  .theme-mail-auth table.kv th,
  .theme-mail-auth table.kv td {
    display: block;
    width: 100%;
  }
  .theme-mail-auth table.kv th {
    border-bottom: 0;
    padding-bottom: 0.4em;
  }
  .theme-mail-auth table.kv td {
    padding-top: 0.6em;
  }
}
@media (min-width: 960px) {
  .theme-mail-auth #work ul {
    columns: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 48px;
  }
}
.theme-mail-auth .hero .wrap > .eyebrow,
.theme-mail-auth .hero-text > .eyebrow {
  justify-self: start;
}
.theme-mail-auth #result table.result + h2 {
  margin-top: 2em;
}
.theme-mail-auth #result .cta {
  margin-top: 1.4em;
}

/* ---- Terraの点検（問い合わせない理由）を受けて ---- */
.theme-mail-auth .brand-box {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.theme-mail-auth .brand-sub {
  font-size: 0.72rem;
  color: var(--sub);
  margin-left: 34px;
  letter-spacing: 0.04em;
}
.theme-mail-auth .brand-sub a {
  color: var(--sub);
}
.theme-mail-auth .hero .price {
  margin-bottom: 0.2em;
}
.theme-mail-auth .hero .price-note {
  color: var(--navy);
  font-size: 0.85rem;
  margin-bottom: 1em;
}
.theme-mail-auth .points li {
  font-weight: 500;
  color: var(--ink);
  font-size: 0.9rem;
}
.theme-mail-auth .points li:first-child {
  font-weight: 700;
  color: var(--navy);
}
.theme-mail-auth #work li + li {
  border-top: 1px solid var(--line);
  padding-top: 1em;
}
.theme-mail-auth #work li + li::before {
  top: 1.15em;
}
@media (min-width: 960px) {
  .theme-mail-auth #work li + li {
    border-top: 0;
    padding-top: 0;
  }
  .theme-mail-auth #work li + li::before {
    top: 0.15em;
  }
  .theme-mail-auth .points li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
.theme-mail-auth .diag {
  padding: 56px 0 48px;
}
@media (max-width: 719px) {
  .theme-mail-auth .hero .price-note {
    font-size: 0.8rem;
    line-height: 1.6;
  }
}
@media (max-width: 719px) {
  /* スマホでは安心の点を3つに絞る（4・5は流れと料金の表にある）。Terra 2回目「点がボタンの下に長く続く」 */
  .theme-mail-auth .points li:nth-child(n + 4) {
    display: none;
  }
}
