/* =========================
   FAQ CSS（黒背景＋白文字、モバイル前提）
   ========================= */

/* 変数 */
:root {
  --bg: #050505;
  --panel: #020617;
  --panel2: #111827;
  --border: #27272a;

  --text: #f9fafb;
  --text-sub: #e5e7eb;
  --text-muted: #9ca3af;

  --accent: #facc15;
  --accent-hover: #fbbf24;
  --danger: #f97373;
}

/* ベース */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; }

.support-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
}

/* =========================
   上部（ロゴ＋ユーザーサポート）
   ========================= */
.faq-top-header {
  background: #000;
  border-bottom: 1px solid var(--border);
}

.faq-top-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
}

.faq-logo-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.faq-logo {
  width: min(420px, 78vw);
  height: auto;
  display: block;
}

.faq-subtitle {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0;
}

/* =========================
   言語切り替え（独立帯）
   ========================= */
.lang-switch {
  background: rgba(255,255,255,0.015);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-switch button {
  appearance: none;
  border: 1px solid #1f2937;
  background: #0a0f1a;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px; 
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.lang-switch button.active {
  background: var(--accent);
  color: #111827;
  border-color: rgba(0,0,0,0.2);
  font-weight: 600;
}

.lang-switch button:active {
  transform: scale(0.98);
}

/* =========================
   よくあるご質問ヘッダー
   ========================= */
.support-header {
  background: #000;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding: 18px 0 14px;
}

.support-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
}

.support-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(250,204,21,0.45);
}

.contact-link:hover {
  border-bottom-color: rgba(250,204,21,0.75);
}

/* =========================
   検索エリア（帯）
   ========================= */
.faq-search-section {
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
}

.search-note {
  margin: 6px 0 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.faq-search-box {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 6px 0 6px;
}

#faqSearch {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #4b5563;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
  outline: none;
}

#faqSearch::placeholder {
  color: #6b7280;
}

#faqSearchButton {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #111827;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

#faqSearchButton:hover {
  background: var(--accent-hover);
}

#faqSearchButton:active {
  transform: scale(0.97);
  box-shadow: none;
}

.search-result {
  margin: 4px 0 10px;
  font-size: 12px;
  color: var(--text-sub);
}

/* =========================
   カテゴリタブ（独立帯）
   ========================= */
.faq-tabs-section {
  background: rgba(255,255,255,0.015);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.faq-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.faq-tabs::-webkit-scrollbar { display: none; }

.faq-tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid #1f2937;
  background: #0a0f1a;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.faq-tabs button.active {
  background: var(--accent);
  color: #111827;
  border-color: rgba(0,0,0,0.2);
  font-weight: 700;
}

.faq-tabs button:active {
  transform: scale(0.98);
}

/* PC：中央寄せ＋折り返し（スマホは横スクロール） */
@media (min-width: 900px) {
  .faq-tabs {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .faq-tabs button {
    min-width: 160px;
    text-align: center;
  }
}

/* =========================
   FAQ本体
   ========================= */
.faq-section {
  padding-bottom: 18px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 28px;
}

/* detailsをカード風 */
.faq-item {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

/* summary */
.faq-question {
  list-style: none;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
}

/* デフォルト三角を消す */
.faq-question::-webkit-details-marker { display: none; }

/* トグルアイコン */
.faq-question::before {
  content: "▼";
  font-size: 14px;
  display: inline-block;
  width: 1.4em;
  text-align: center;
  color: var(--accent);
}

.faq-item[open] .faq-question::before {
  content: "▲";
  color: var(--danger);
}

.faq-question:active {
  background: rgba(255,255,255,0.03);
}

/* 回答 */
.faq-answer {
  padding: 0 14px 14px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.faq-answer p {
  margin: 14px 0;
}

/* ジャンプリンク */
.faq-jump {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(250,204,21,0.45);
}

.faq-jump:hover {
  border-bottom-color: rgba(250,204,21,0.75);
}

.faq-jump-missing {
  color: #fca5a5;
}

/* =========================
   本文中の [[img/...]] 画像（崩れ対策）
   ========================= */
.faq-inline-image-wrap {
  margin: 20px 0;
  padding: 0 2px;
}

.faq-inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #000;
}

/* 超縦長スクショの圧迫を軽減 */
@media (max-width: 480px) {
  .faq-inline-image {
    max-height: 70vh;
    object-fit: contain;
  }
}

@media (min-width: 768px) {
  .faq-inline-image {
    max-width: 520px; 
    margin: 0 auto; 
  }
}

/* =========================
   ジャンプ後のハイライト
   ========================= */
.faq-item.flash {
  outline: 2px solid rgba(250,204,21,0.65);
  outline-offset: 0;
}

/* =========================
   フッター
   ========================= */
.faq-footer {
  border-top: 1px solid var(--border);
  padding: 14px 16px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* =========================
   タブレット以上
   ========================= */
@media (min-width: 768px) {
  .support-inner { padding: 16px 24px; }

  .support-title { font-size: 22px; }

  .faq-subtitle { font-size: 16px; }

  .lang-switch button { font-size: 14px; }

  #faqSearch { font-size: 15px; }

  #faqSearchButton { font-size: 15px; }
}

/* =========================
   エラーページ共通
   ========================= */

.error-page {
  padding: 48px 0 64px;
  text-align: center;
}

.error-code {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
  color: var(--text);
}

.error-message {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-sub);
  margin: 0;
}

.error-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.error-actions a {
  font-size: 14px;
}

/* PCでは少し余裕を出す */
@media (min-width: 768px) {
  .error-page {
    padding: 64px 0 80px;
  }

  .error-code {
    font-size: 56px;
  }

  .error-message {
    font-size: 17px;
  }
}

/* =========================
   エラーページ画像
   ========================= */

.error-image {
  margin: 20px 0 18px;
  display: flex;
  justify-content: center;
}

.error-image img {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
