/*
 * SecureMail v2 単一スタイルシート
 *
 * - モバイルファースト、@media でタブレット・デスクトップ拡張
 * - システムフォントのみ（Google Fonts / Font Awesome 不使用）
 * - 汎用クラスを優先再利用、1 画面専用の一回性クラスは作らない
 */

/* ========== リセット & ベース ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Yu Gothic", "Meiryo", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #222;
  background: #fafafa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #1a6ee0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========== レイアウト ========== */
.page {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

.page--narrow {
  max-width: 640px;
}

.site-header {
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
  padding: 0.75rem 1rem;
}

.site-header__logo {
  height: 40px;
  width: auto;
}

.site-footer {
  border-top: 1px solid #e0e0e0;
  background: #fff;
  padding: 1rem;
  text-align: center;
  margin-top: 2rem;
}

.site-footer img {
  height: 32px;
  width: auto;
}

/* デスクトップで readmsg の 2 カラム（本文 + 右 AdSense） */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr) 336px;
  }
}

/* ========== 見出し・テキスト ========== */
h1, h2, h3 {
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

.muted {
  color: #666;
  font-size: 0.9rem;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }

/* ========== フォーム ========== */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form__row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: inherit;
  border: 1px solid #c4c4c4;
  border-radius: 4px;
  background: #fff;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: 2px solid #1a6ee0;
  outline-offset: 0;
  border-color: #1a6ee0;
}

.form__textarea {
  min-height: 10rem;
  resize: vertical;
  font-family: inherit;
}

.form__hint {
  font-size: 0.85rem;
  color: #666;
}

.form__error {
  color: #c62828;
  font-size: 0.9rem;
}

/* ハニーポット: 視覚上完全に隠すが、表示領域は保持（BOT に非表示と気づかせない） */
.honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ========== ボタン ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: #1a6ee0;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px; /* モバイル押しやすさ */
}

.btn:hover {
  background: #155cbb;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--secondary {
  background: #fff;
  color: #1a6ee0;
  border-color: #c4c4c4;
}

.btn--secondary:hover {
  background: #f0f4fa;
}

.btn--danger {
  background: #c62828;
}

.btn--danger:hover {
  background: #a61b1b;
}

/* ========== 通知 / アラート ========== */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  border: 1px solid transparent;
  margin-bottom: 1rem;
}

.alert--info {
  background: #e7f1fd;
  border-color: #b9d6f5;
  color: #0d4f9a;
}

.alert--success {
  background: #e7f5ea;
  border-color: #a6d8b4;
  color: #1e6b35;
}

.alert--error {
  background: #fbe9e7;
  border-color: #f2b7b0;
  color: #a61b1b;
}

/* ========== メッセージ閲覧 ========== */
.message-meta {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  background: #fff;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.message-meta__row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px dashed #eee;
}

.message-meta__row:last-child {
  border-bottom: none;
}

.message-meta__label {
  font-weight: 600;
  color: #555;
}

.message-body {
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1rem;
  min-height: 10rem;
}

/* ========== タブ（登録/削除切替） ========== */
.tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tabs__item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  border: none;
  background: transparent;
  font: inherit;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tabs__item--active {
  color: #1a6ee0;
  border-bottom-color: #1a6ee0;
  font-weight: 600;
}

/* リンク型タブ (例: 別ページへのナビゲーション)。下線なし、登録タブの隣に左寄せ */
.tabs__item--link {
  text-decoration: none;
}
.tabs__item--link:hover {
  color: #1a6ee0;
}

/* ========== AdSense ブロックの余白 ========== */
.ad-slot {
  margin: 1.5rem 0;
  text-align: center;
}

.ad-slot--right {
  margin: 0;
}

/* ========== Tabler Icons サイズ補正 ========== */
.ti {
  font-size: 1.1em;
  vertical-align: -0.1em;
}

/* ========== Site header (ロゴ + 言語切替の flex コンテナ) ========== */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header__logo-link {
  display: inline-flex;
  align-items: center;
}

/* ========== Hero section ========== */
.hero {
  background: linear-gradient(180deg, #f4f8fd 0%, #fafafa 100%);
  padding: 2.5rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid #e7ebf1;
}

.hero__title {
  font-size: clamp(1.5rem, 4vw + 0.5rem, 2.25rem);
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: #1a3a6e;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: #444;
  max-width: 32em;
  margin: 0 auto 1.25rem;
  line-height: 1.7;
}

/* Hero の CTA 下の小さな reassurance テキスト (EN LP の "No credit card..." 等) */
.hero__note {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

/* 社会的証明バッジ: pill 型 */
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #c8d4e6;
  color: #1a3a6e;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
}

/* ========== Section (Features / How it works 共通外殻) ========== */
.section {
  padding: 2.5rem 0;
}

.section--alt {
  background: #f4f6fa;
  border-top: 1px solid #e7ebf1;
  border-bottom: 1px solid #e7ebf1;
}

.section__heading {
  text-align: center;
  margin: 0 0 2rem;
  font-size: 1.35rem;
  color: #1a3a6e;
}

/* ========== Features grid ========== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 58, 110, 0.08);
}

.feature-card__icon {
  font-size: 2rem;
  color: #1a6ee0;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.feature-card__icon .ti {
  font-size: inherit;
}

.feature-card__title {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: #222;
}

/* マイページ訴求セクション (LP の Features と How の間に配置) */
.mypage-promo { text-align: center; }
.mypage-promo__head { max-width: 640px; margin: 0 auto 1.75rem; }
.mypage-promo__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: #1a6ee0;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.mypage-promo__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.mypage-promo__item {
  background: #f4f6fa;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
}
.mypage-promo__icon {
  font-size: 1.75rem;
  color: #1a6ee0;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.mypage-promo__title {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  color: #1a3a6e;
}
.mypage-promo__desc {
  font-size: 0.875rem;
  color: #555;
  margin: 0;
  line-height: 1.55;
}

.feature-card__desc {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  line-height: 1.6;
}

/* ========== How it works (3 ステップ) ========== */
.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 780px;
  margin: 0 auto;
}

@media (min-width: 720px) {
  .how-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.how-step {
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  padding: 1.5rem 1rem 1.25rem;
  text-align: center;
  position: relative;
}

.how-step__num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: #1a6ee0;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.how-step__icon {
  font-size: 1.75rem;
  color: #1a6ee0;
  margin: 0.5rem 0 0.5rem;
  line-height: 1;
}

.how-step__icon .ti {
  font-size: inherit;
}

.how-step__title {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.how-step__desc {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  line-height: 1.6;
}

/* ========== アップセル (FormOK 売り込みブロック) ========== */
.upsell {
  position: relative;
  background: linear-gradient(135deg, #fff8ec 0%, #fdf2e0 100%);
  border: 1px solid #e8d39a;
  border-radius: 12px;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(163, 116, 28, 0.06);
}

.upsell__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #c47a1a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.upsell__heading {
  font-size: clamp(1.2rem, 3vw + 0.3rem, 1.5rem);
  color: #6b3f08;
  margin: 0 0 0.75rem;
}

.upsell__lead {
  color: #5a4620;
  margin: 0 auto 1.25rem;
  max-width: 38em;
  line-height: 1.7;
}

.upsell__lead a {
  color: #8b4a0a;
  font-weight: 700;
  text-decoration: underline;
}

.upsell__features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 1.5rem;
  text-align: left;
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .upsell__features {
    grid-template-columns: 1fr 1fr;
  }
}

.upsell__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: #4a3813;
  line-height: 1.55;
}

.upsell__features .ti {
  color: #c47a1a;
  flex-shrink: 0;
  margin-top: 0.15em;
}

.upsell__action {
  margin: 0;
}

/* 「SecureMail のままで OK」の控えめな逃げ道リンク */
.upsell__alt {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.upsell__alt a {
  color: #8a7a4e;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.15em;
}

.upsell__alt a:hover {
  color: #6b3f08;
  text-decoration-style: solid;
}

.upsell .btn--secondary {
  background: #fff;
  color: #8b4a0a;
  border-color: #c47a1a;
}

.upsell .btn--secondary:hover {
  background: #c47a1a;
  color: #fff;
  border-color: #c47a1a;
}

/* ========== Footer ナビリンク ========== */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: #555;
}

.footer-meta {
  text-align: center;
  color: #888;
  font-size: 0.8rem;
  line-height: 1.6;
}
