/* ============================================================
   SOLE AI — help.css
   Design: Dark theme, minimal, consistent with main site
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080808;
  --bg-card: #111111;
  --bg-card2: #161616;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text-primary: #f5f5f5;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #c8a96e;
  --accent-dim: rgba(200,169,110,0.15);
  --accent-glow: rgba(200,169,110,0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
}

html { scroll-behavior: smooth; }

body.help-body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---- Background ---- */
.help-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.help-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}
.help-bg-orb.orb1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #c8a96e, transparent);
  top: -100px; right: -100px;
}
.help-bg-orb.orb2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #4a6fa5, transparent);
  bottom: 100px; left: -100px;
}
.help-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ---- Header ---- */
.help-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.help-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.help-logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #c8a96e, #e8c98e);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  color: #080808;
}
.help-logo-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.help-nav {
  display: flex;
  gap: 24px;
}
.help-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.help-nav-link:hover { color: var(--text-primary); }

/* ---- Main ---- */
.help-main {
  position: relative;
  z-index: 1;
}

/* ---- Container ---- */
.help-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Hero ---- */
.help-hero {
  padding: 80px 24px 60px;
  text-align: center;
}
.help-hero-inner {
  max-width: 600px;
  margin: 0 auto;
}
.help-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.help-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.help-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

/* ---- Section Title ---- */
.help-section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.help-section-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 32px;
}

/* ---- FAQ Section ---- */
.help-faq-section {
  padding: 20px 0 60px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 32px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover {
  border-color: var(--border-hover);
}
.faq-item.open {
  border-color: rgba(200,169,110,0.3);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background 0.2s;
}
.faq-question:hover {
  background: var(--bg-card2);
}
.faq-icon {
  flex-shrink: 0;
  color: var(--accent);
  transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background: var(--bg-card);
  padding: 0 20px;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 20px 18px;
}
.faq-answer p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ---- Chat Section ---- */
.help-chat-section {
  padding: 20px 0 80px;
}
.help-chat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
}
.help-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.help-chat-messages::-webkit-scrollbar {
  width: 4px;
}
.help-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.help-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}
.help-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 80%;
}
.help-msg--ai {
  align-self: flex-start;
}
.help-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.help-msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8a96e, #e8c98e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 13px;
  color: #080808;
  flex-shrink: 0;
}
.help-msg--user .help-msg-avatar {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}
.help-msg-bubble {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  padding: 12px 16px;
}
.help-msg--user .help-msg-bubble {
  background: var(--accent-dim);
  border-color: rgba(200,169,110,0.2);
  border-radius: 12px 12px 4px 12px;
}
.help-msg-bubble p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}
.help-msg-time {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ---- Chat Input ---- */
.help-chat-input-area {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  background: var(--bg-card);
}
.help-chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color 0.2s;
}
.help-chat-input-wrap:focus-within {
  border-color: rgba(200,169,110,0.4);
}
.help-chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  max-height: 120px;
  overflow-y: auto;
}
.help-chat-input::placeholder {
  color: var(--text-muted);
}
.help-chat-send {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #080808;
  transition: background 0.2s, transform 0.15s;
}
.help-chat-send:hover {
  background: #e8c98e;
  transform: scale(1.05);
}
.help-chat-send:active {
  transform: scale(0.97);
}
.help-chat-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.6;
}

/* ---- Contact Cards ---- */
.help-contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.help-contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.help-contact-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.help-contact-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.help-contact-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ---- Footer ---- */
.help-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.help-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.help-footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}
.help-footer-links {
  display: flex;
  gap: 20px;
}
.help-footer-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.help-footer-link:hover {
  color: var(--text-secondary);
}

/* ---- Contact Section ---- */
.help-contact-section {
  padding: 20px 0 80px;
}
.help-contact-note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}
.help-contact-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.help-contact-link:hover {
  opacity: 0.75;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .help-header { padding: 0 16px; height: 52px; }
  .help-nav { display: none; }
  .help-hero { padding: 56px 16px 36px; }
  .help-title { font-size: clamp(22px, 6vw, 32px); }
  .help-subtitle { font-size: 14px; }
  .help-container { padding: 0 16px; }
  .help-faq-section { padding: 16px 0 48px; }
  .help-chat-section { padding: 16px 0 56px; }
  .faq-question { padding: 14px 16px; font-size: 13px; }
  .faq-answer { padding: 0 16px; }
  .faq-item.open .faq-answer { padding: 0 16px 14px; }
  .faq-answer p { font-size: 13px; }
  .help-section-title { font-size: 18px; }
  .help-section-desc { font-size: 13px; }
  .help-contact-cards { grid-template-columns: 1fr; }
  .help-contact-card { padding: 16px 18px; }
  .help-footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .help-footer-links { flex-wrap: wrap; gap: 12px; }
  .help-chat-box { height: 380px; }
  .help-msg { max-width: 92%; }
  .help-chat-input-area { padding: 10px 12px 12px; }
  .help-chat-messages { padding: 16px 14px; }
}

/* ===== LIGHT THEME OVERRIDE (help) ===== */
html.theme-light {
  --bg: #F5F5F3;
  --bg-card: #FFFFFF;
  --bg-card2: #EFEFED;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.18);
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
}
html.theme-light .help-nav { background: #FFFFFF; border-bottom-color: rgba(0,0,0,0.08); }
html.theme-light .help-chat-input { background: #EFEFED; color: #111; }
