/* --- 基本スタイル --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  color: #333;
  line-height: 1.7;
  background-color: white;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
  text-align: center;
}

.section h2 {
  font-size: 2em;
  margin-bottom: 40px;
}

/* --- ランディングページ専用スタイル --- */
.hero {
  text-align: center;
  padding: 60px 20px;
  background-color: #f8f9fa;
}

.hero h1 {
  font-size: 2.2em;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.hero p {
  font-size: 1.1em;
  margin-bottom: 30px;
}

.character {
  max-width: 150px;
  margin-bottom: 20px;
}

.checklist {
  list-style: none;
  padding: 0;
  text-align: left;
  max-width: 500px;
  margin: 0 auto 40px auto;
}

.checklist li {
  margin-bottom: 15px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%238A2BE2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>') no-repeat left center;
  padding-left: 40px;
  font-size: 1.1em;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.steps {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  text-align: left;
}

.step { flex: 1; }

.step h3 {
  font-size: 1.2em;
  color: #8A2BE2;
}

.campaign {
  background-color: #FFF9C4;
  border: 2px dashed #8A2BE2;
  padding: 40px 20px;
  border-radius: 10px;
}

.final-cta {
  background-color: #8A2BE2;
  color: white;
}

/* --- スマートフォン向けスタイル --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.3em; } /* ← 1.8em から 1.5em に変更 */
  .hero p { font-size: 1em; }
  .section h2 { font-size: 1.1em; }

  .steps {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .checklist li { text-align: left; }
}

/* --- フォームページ専用スタイル --- */
.form-page-wrapper {
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

.form-container {
  background-color: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 100%;
}

.form-container h1 {
  text-align: center;
  color: #8A2BE2;
  font-size: 1.8em;
  margin-top: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1em;
  box-sizing: border-box;
}

/* --- 完了・メッセージページ専用スタイル --- */
.message-page-wrapper {
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

.message-box {
  background-color: white;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 100%;
}

.message-box h1 {
  color: #8A2BE2;
  font-size: 1.8em;
  margin-top: 0;
}

.message-box-link {
  color: #8A2BE2;
  font-weight: bold;
  text-decoration: none;
}

.message-box-link:hover {
  text-decoration: underline;
}

/* --- フォームのfieldsetとlegendのスタイル --- */
.form-container fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.form-container fieldset legend {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 15px;
  border-bottom: 2px solid #8A2BE2;
  padding-bottom: 5px;
  width: 100%;
  box-sizing: border-box; /* paddingを含めて幅を100%にする */
}

/* --- ヘッダースタイル --- */
.site-header {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}
.header-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #8A2BE2;
  text-decoration: none;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-header nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}
.site-header nav .header-button {
  background-color: #8A2BE2;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.2s ease-in-out;
}

.site-header nav .header-button:hover {
  background-color: #7B1FA2;
}
.errorlist {
    color: #dc3545; /* 文字色を赤に設定 */
    margin: 5px 0 0 0;
    padding: 0;
    list-style-type: none; /* 先頭の黒丸を削除 */
    font-size: 0.9em;
    font-weight: bold;
}
/* --- フォームの必須項目を示すマークのスタイル --- */
.form-group label.required::after,
.form-group-checkbox label.required::after {
    content: '必須'; /* 表示するテキスト */
    display: inline-block;
    margin-left: 8px; /* ラベルの文字との間隔 */
    padding: 2px 6px; /* マークの内側の余白 */
    background-color: #dc3545; /* 背景色を赤に */
    color: white; /* 文字色を白に */
    font-size: 0.75em; /* 文字を少し小さく */
    font-weight: bold;
    border-radius: 3px; /* 角を少し丸める */
    vertical-align: middle; /* 上下の位置を調整 */
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}
.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}
.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 500;
    text-align: left;
}
.table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* --- Added for Receipt Table Summary --- */
.receipt-table .summary-row-spacer td {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.receipt-table .summary-row td {
  padding: 8px 0;
}
.receipt-table .summary-label {
  text-align: right;
  padding-right: 20px;
}
.receipt-table .summary-total {
  font-weight: bold;
}
.receipt-table .summary-total td {
  border-top: 1px solid #333;
  padding-top: 10px;
}

.pdf .receipt-table .summary-row-spacer td {
    border-bottom: 1px solid #eee !important;
}

.pdf .receipt-table .summary-total td {
    border-top: 1px solid #333 !important;
}

.dashboard-buttons {
    display: flex;
    flex-direction: column; /* ←【修正】縦並びに変更 */
    align-items: flex-start;  /* ←【追加】左揃えに */
    gap: 15px;
    margin-top: 20px;
}

/* ▼▼▼【追加】ボタンの幅を統一して、より美しく見せます ▼▼▼ */
.dashboard-buttons .btn {
    width: 300px; /* 以前のスタイルに近い幅を指定 */
    text-align: center;
}

.user-info {
  display: inline-block;
  padding: 8px 12px;
  background-color: #f0f0f0; /* 背景を薄い灰色に */
  border-radius: 6px;
  margin-right: 15px;
  font-size: 0.9em;
  color: #333; /* 文字色を黒系の色に */
  border: 1px solid #ddd; /* 枠線を薄い灰色に */
}

/* --- Secondary Button Style --- */
.header-button.secondary {
  background-color: transparent;
  color: #555;
  border: 1px solid #ccc;
}

.site-header nav .header-button.secondary:hover {
  background-color: #f0f0f0;
  color: #dc3545;
}

/* =================================== */
/* New Button System (Safe Add)      */
/* =================================== */
.btn {
  display: inline-block;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  line-height: 1.5;
}

.btn-primary {
  color: #fff;
  background-color: #8A2BE2;
  border-color: #8A2BE2;
}
.btn-primary:hover {
  background-color: #7B1FA2;
}

.btn-secondary {
  color: #333;
  background-color: #f0f0f0;
  border-color: #ddd;
}
.btn-secondary:hover {
  background-color: #e0e0e0;
}

.btn-danger {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}
.btn-danger:hover {
  background-color: #c82333;
}

.btn-link {
  color: #8A2BE2;
  text-decoration: none;
  background-color: transparent;
  border: none;
  padding: 0;
}
.btn-link:hover {
  text-decoration: underline;
}

/* =================================== */
/* Responsive Styles (for Tenant UI) */
/* =================================== */
@media (max-width: 768px) {

  /* --- ヘッダーのスマホ対応 --- */
  .header-container {
    flex-direction: column; /* ロゴとナビを縦積みに */
    align-items: flex-start; /* 左揃えに */
    gap: 15px;
  }
  .site-header nav {
    width: 100%;
    flex-direction: column; /* ナビ項目を縦積みに */
    align-items: stretch; /* ナビ項目を幅いっぱいに */
    gap: 10px;
  }
  .user-info {
    text-align: center;
    margin-right: 0;
  }
  .site-header nav .header-button {
    width: 100%;
    text-align: center;
    box-sizing: border-box; /* width:100% を正しく計算させる */
  }

  /* --- ダッシュボードボタンのスマホ対応 --- */
  .dashboard-buttons {
    align-items: stretch; /* 左揃えから幅いっぱいに変更 */
  }
  .dashboard-buttons .btn {
    width: 100%; /* 300px固定をやめ、幅いっぱいに */
    box-sizing: border-box;
  }

}

.site-footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid #eee;
  background-color: #f9f9f9;
  margin-top: auto;
}
.site-footer p {
  margin: 0;
  color: #666;
  font-size: 0.85em;
  line-height: 1.6;
}

/* ▼▼▼ 以下のスタイルを2ブロック追加 ▼▼▼ */
/* (フッターのリンク化で必要だったスタイル) */
.footer-brand-line {
  font-size: 0.9em;
  color: #999;
}

/* (今回のモーダルで追加するスタイル) */
.footer-legal-links {
  font-size: 0.9em;
  color: #999;
}
.footer-legal-links a {
  color: #555;
  text-decoration: underline;
}
.modal-confirm-btn {
  display: inline-block;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  line-height: 1.5;
  color: #fff;
  background-color: #8A2BE2;
  border-color: #8A2BE2;
}
.modal-confirm-btn:hover {
  background-color: #7B1FA2;
}

.legal-inline-box {
  height: 200px; /* ボックスの高さを固定 */
  overflow-y: scroll; /* 縦方向にスクロールバーを表示 */
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px 15px;
  background-color: #f9f9f9;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 0.9em;
}

/* (サインアップフォームのチェックボックスとスタイルを共通化) */
.form-group-checkbox {
  display: flex;
  align-items: center;
  margin-top: 15px;
  flex-wrap: wrap;
}
.form-group-checkbox input[type="checkbox"] {
  margin-right: 8px;
}
.form-group-checkbox label {
  font-weight: bold;
}
.form-group-checkbox a.modal-link {
  color: #8A2BE2;
  font-weight: bold;
  text-decoration: none;
  margin: 0 4px;
}
.form-group-checkbox a.modal-link:hover {
  text-decoration: underline;
}