:root {
  --bg: #FFFFFF;
  --sidebar-bg: #F7F8FA;
  --text: #1A1A1A;
  --muted: #6B7280;
  --line: #E5E7EB;
  --accent: #2E6BE6;
  /* アプリのブランドグラデーション(DesignSystem.swift spotGradient と統一) */
  --grad: linear-gradient(90deg, #8FBCEE 0%, #C2DCF2 50%, #EBC68D 100%);
  --grad-v: linear-gradient(180deg, #8FBCEE 0%, #C2DCF2 50%, #EBC68D 100%);
  --sidebar-w: 280px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.8;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

/* ===== サイドバー ===== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 3px solid transparent;
  border-image: var(--grad-v) 1;
  padding: 28px 20px;
  overflow-y: auto;
}
.sidebar-brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: .02em;
}
.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a {
  display: block;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  padding: 9px 10px;
  border-radius: 8px;
  margin-bottom: 2px;
}
.sidebar nav a:hover { background: #ECEEF2; color: var(--text); }
.sidebar-group {
  font-size: 12px;
  font-weight: 700;
  color: #9CA3AF;
  margin: 20px 0 6px;
  padding: 0 10px;
  letter-spacing: .04em;
}

/* アクティブページのハイライト(body クラスで指定) */
body.page-about    nav a[href="/"],
body.page-terms    nav a[href="/terms"],
body.page-privacy  nav a[href="/privacy"],
body.page-tokusho  nav a[href="/tokushoho"],
body.page-guidelines nav a[href="/guidelines"],
body.page-faq      nav a[href="/faq"],
body.page-contact  nav a[href="/contact"] {
  background: #E4ECFB;
  color: var(--accent);
  font-weight: 600;
}

/* ===== 問い合わせフォーム ===== */
.contact-form { max-width: 560px; margin: 8px 0 0; }
.contact-form .field { margin: 18px 0; }
.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}
.contact-form label .req { color: #DC2626; font-weight: 700; margin-left: 4px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,107,230,.15);
}
/* ハニーポット(画面外に隠す) */
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .submit {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  padding: 13px 28px;
  cursor: pointer;
}
.contact-form .submit:disabled { opacity: .5; cursor: not-allowed; }
.form-note { color: var(--muted); font-size: 13px; margin: 6px 0 20px; }
.form-result { margin: 18px 0; padding: 14px 16px; border-radius: 10px; font-size: 14px; display: none; }
.form-result.ok  { display: block; background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.form-result.ng  { display: block; background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

/* ===== メイン ===== */
.content {
  margin-left: var(--sidebar-w);
  padding: 48px 56px 80px;
  max-width: 920px;
}
.doc h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 16px;
  padding-bottom: 20px;
  border-bottom: 2px solid transparent;
  border-image: var(--grad) 1;
}
.doc h2 { font-size: 21px; margin: 40px 0 12px; }
.doc h3 { font-size: 16px; margin: 26px 0 8px; }
.doc p { margin: 8px 0; }
.doc ol, .doc ul { margin: 8px 0; padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.doc ol[type="a"] { margin-top: 8px; }
.doc a { color: var(--accent); }
.doc hr { border: none; border-top: 2px solid transparent; border-image: var(--grad) 1; margin: 32px 0 16px; }
.doc .meta { color: var(--muted); font-size: 13px; }
.lead { font-size: 16px; color: #374151; }

/* テーブル */
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.doc th, .doc td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.doc thead th { background: #F3F4F6; }
.doc table.kv th { width: 34%; background: #F3F4F6; white-space: nowrap; }

/* 機能カード(PhotoLocationとは) */
.feature-list { list-style: none; padding: 0; margin: 12px 0; }
.feature-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0;
}
.feature-list b { display: block; margin-bottom: 2px; }

/* FAQ アコーディオン */
.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0;
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 52px 18px 20px;
  font-weight: 700;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 20px 18px; color: #374151; }

/* ===== モバイル(ハンバーガー / チェックボックスハック) ===== */
.nav-toggle { display: none; }
.topbar { display: none; }

@media (max-width: 860px) {
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0; z-index: 20;
    background: var(--bg);
    border-bottom: 2px solid transparent;
    border-image: var(--grad) 1;
    padding: 12px 16px;
  }
  .topbar-title { font-weight: 700; }
  .hamburger {
    font-size: 22px; line-height: 1;
    cursor: pointer; padding: 4px 8px;
    user-select: none;
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 30;
    box-shadow: 2px 0 12px rgba(0,0,0,.12);
  }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); }
  .nav-toggle:checked ~ .scrim {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 25;
  }
  .scrim { display: none; }
  .content {
    margin-left: 0;
    padding: 24px 18px 64px;
  }
  .doc h1 { font-size: 24px; }
  body { font-size: 14px; }
  .doc table.kv th { width: 42%; }
}
