/* このファイルのスタイルは .page-terms の中だけで効く(ページ移動で他ページのCSSが残っても干渉しないように)。
   日本語版は app/(site) のページが外側に .page-terms を付け、英語版は <body class="page-terms"> を付けている。 */
/* ===== Page-specific base ===== */
.page-terms { line-height: 1.8; min-height: 100vh; }
.page-terms a { color: var(--brown); }
.page-terms a:hover { text-decoration: underline; }

/* ===== Header (subpage back-link variant) ===== */
.page-terms .header-back { font-size: 0.85rem; color: var(--grey); display: flex; align-items: center; gap: 6px; transition: color 0.2s; }
.page-terms .header-back::before { content: '←'; }
.page-terms .header-back:hover { color: var(--brown); }

/* ===== Main ===== */
.page-terms .main { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }

.page-terms .page-heading { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 2px solid var(--border); }
.page-terms .page-heading h1 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--brown-dark); margin-bottom: 8px; }
.page-terms .page-heading p { font-size: 0.875rem; color: var(--grey); }

/* ===== Section ===== */
.page-terms .section { margin-bottom: 36px; }
.page-terms .section-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 800;
  color: var(--brown-dark);
  padding: 10px 16px;
  background: var(--warm);
  border-left: 4px solid var(--brown);
  border-radius: 0 8px 8px 0;
  margin-bottom: 16px;
}
.page-terms .section-body { font-size: 0.9rem; color: var(--ink); padding: 0 4px; }
.page-terms .section-body p { margin-bottom: 10px; }
.page-terms .section-body p:last-child { margin-bottom: 0; }
.page-terms .section-body ul { padding-left: 1.4em; margin-bottom: 10px; }
.page-terms .section-body ul li { margin-bottom: 6px; }
.page-terms .section-body ul li:last-child { margin-bottom: 0; }

/* ===== Table ===== */
.page-terms .terms-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-bottom: 12px; }
.page-terms .terms-table th, .page-terms .terms-table td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.page-terms .terms-table th { background: var(--warm); font-weight: 700; color: var(--brown-dark); width: 140px; }

/* ===== Warning Box ===== */
.page-terms .warn-box {
  background: #fff8e1; border: 1px solid #f0d060; border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 12px; font-size: 0.875rem;
}
.page-terms .warn-box strong { color: var(--brown-dark); }

/* ===== Footer (subpage sizing) ===== */
.page-terms footer { padding: 28px 6%; font-size: 0.78rem; }
.page-terms .footer-logo { font-size: 1rem; margin-bottom: 6px; }

@media (max-width: 600px) {
  .page-terms .main { padding: 32px 16px 60px; }
  .page-terms .terms-table th { width: 100px; }
  .page-terms .lang-switch { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; }
  .page-terms .header-back { min-height: 44px; }
}

/* ===== Agreement Bar ===== */
.page-terms #terms-confirm-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 3px solid var(--brown);
  padding: 16px 6%;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.18);
  z-index: 9999;
}
.page-terms .terms-bar-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.page-terms .terms-bar-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.page-terms .terms-bar-label input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--brown);
  flex-shrink: 0;
}
.page-terms #terms-agree-btn {
  background: var(--honey);
  color: white;
  border: none;
  border-radius: 32px;
  padding: 13px 24px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}
.page-terms #terms-agree-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-terms #terms-agree-btn:not(:disabled):hover { opacity: 0.85; }
