/* ============================================================
   SignCascade UD — 和紙クリームテーマ（共通CSS）
   washi-theme.css
   ============================================================ */

/* カスタムプロパティ — ライトモード */
:root {
  /* 基本色 */
  --bg-primary: #FAF8F3;
  --bg-secondary: #F3EFE6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFEF9;

  /* アクセント */
  --accent: #B8943E;
  --accent-hover: #9A7A30;
  --accent-soft: #F5EFD9;
  --accent-text: #8B6F2A;

  /* テキスト */
  --text-primary: #3C3528;
  --text-secondary: #6B6256;
  --text-tertiary: #9A9084;
  --text-on-accent: #FFFFFF;

  /* ボーダー・シャドウ */
  --border: #E8E2D4;
  --border-light: #F0EBE0;
  --shadow-sm: 0 1px 3px rgba(60, 53, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(60, 53, 40, 0.08);
  --shadow-lg: 0 8px 24px rgba(60, 53, 40, 0.10);

  /* ステータス */
  --success: #5A8A5C;
  --success-bg: #EDF5ED;
  --error: #C45B4A;
  --error-bg: #FDF0ED;
  --warning-bg: #FFF8E6;

  /* フォント */
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* サイズ */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 800px;
}

/* ダークモード — OS設定連動 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #1C1A16;
    --bg-secondary: #252219;
    --bg-card: #2A2720;
    --bg-card-hover: #32302A;

    --accent: #D4A843;
    --accent-hover: #E0BA5A;
    --accent-soft: rgba(212, 168, 67, 0.12);
    --accent-text: #E0BA5A;

    --text-primary: #E8E2D4;
    --text-secondary: #B8B0A2;
    --text-tertiary: #8A8278;
    --text-on-accent: #1C1A16;

    --border: #3D3A33;
    --border-light: #33302A;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

    --success: #7CB07E;
    --success-bg: rgba(124, 176, 126, 0.12);
    --error: #E07A6A;
    --error-bg: rgba(224, 122, 106, 0.12);
    --warning-bg: rgba(212, 168, 67, 0.10);
  }
}

/* ダークモード — 手動切り替え */
[data-theme="dark"] {
  --bg-primary: #1C1A16;
  --bg-secondary: #252219;
  --bg-card: #2A2720;
  --bg-card-hover: #32302A;

  --accent: #D4A843;
  --accent-hover: #E0BA5A;
  --accent-soft: rgba(212, 168, 67, 0.12);
  --accent-text: #E0BA5A;

  --text-primary: #E8E2D4;
  --text-secondary: #B8B0A2;
  --text-tertiary: #8A8278;
  --text-on-accent: #1C1A16;

  --border: #3D3A33;
  --border-light: #33302A;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

  --success: #7CB07E;
  --success-bg: rgba(124, 176, 126, 0.12);
  --error: #E07A6A;
  --error-bg: rgba(224, 122, 106, 0.12);
  --warning-bg: rgba(212, 168, 67, 0.10);
}

/* テーマ切り替えボタン */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
}

.theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: scale(1.08);
}

/* アイコン切替 */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { transition: opacity 0.3s; }
.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: inline; }
}

/* ============================================================
   ベーススタイル
   ============================================================ */

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* ============================================================
   共通コンテナ
   ============================================================ */

.washi-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

/* ============================================================
   ヘッダー
   ============================================================ */

.washi-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent);
}

.washi-header h1 {
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 700;
}

.washi-header .app-name {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.5px;
}

.washi-header .updated {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: 10px;
}

/* ============================================================
   コンテンツカード
   ============================================================ */

.washi-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.washi-card h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin-top: 30px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.washi-card h2:first-child { margin-top: 0; }

.washi-card h3 {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 20px;
  margin-bottom: 10px;
}

.washi-card p { margin-bottom: 15px; }
.washi-card ul, .washi-card ol { margin-bottom: 15px; padding-left: 25px; }
.washi-card li { margin-bottom: 8px; }

/* テーブル */
.washi-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.washi-card th, .washi-card td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
}

.washi-card th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

.washi-card td a { color: var(--accent); }

/* 連絡先ボックス */
.contact-box {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 20px;
}

.contact-box p { margin-bottom: 5px; }
.contact-box a { color: var(--accent); font-weight: 500; }

/* ============================================================
   フォーム共通
   ============================================================ */

.washi-form-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.required {
  color: var(--error);
  margin-left: 4px;
}

select, input[type="email"], input[type="text"], textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea { min-height: 150px; resize: vertical; }

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ボタン */
.washi-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.washi-btn:hover {
  background: var(--accent-hover);
  color: var(--text-on-accent);
  transform: translateY(-1px);
}

.washi-btn:active { transform: translateY(0); }

.washi-btn:disabled, .washi-btn.disabled {
  background: var(--border);
  color: var(--text-tertiary);
  cursor: not-allowed;
  transform: none;
}

.washi-btn-full { width: 100%; text-align: center; }

/* ノート・お知らせ */
.washi-note {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 15px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.washi-note-warning {
  background: var(--warning-bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.washi-note-warning .note-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* エラー表示 */
.washi-errors {
  background: var(--error-bg);
  border: 1px solid #F0C6BE;
  border-radius: var(--radius-sm);
  padding: 15px;
  margin-bottom: 20px;
}

.washi-errors ul { margin: 0; padding-left: 20px; }
.washi-errors li { color: var(--error); }

/* 成功アイコン */
.washi-success-icon {
  width: 80px;
  height: 80px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 40px;
  color: white;
}

/* ID表示ボックス */
.washi-id-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.washi-id-box .id-label {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.washi-id-box .id-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

/* ============================================================
   フッター共通
   ============================================================ */

.washi-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 14px;
}

.washi-footer a {
  color: var(--accent);
  text-decoration: none;
}

.washi-footer a:hover { color: var(--accent-hover); }

/* FAQ アコーディオン */
.washi-faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.washi-faq-item:hover {
  box-shadow: var(--shadow-sm);
}
.washi-faq-item[open] {
  border-color: var(--accent);
}
.washi-faq-q {
  padding: 16px 40px 16px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  position: relative;
  line-height: 1.6;
}
.washi-faq-q::-webkit-details-marker { display: none; }
.washi-faq-q::before {
  content: "Q";
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
  vertical-align: middle;
}
.washi-faq-q::after {
  content: "＋";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.2s;
}
.washi-faq-item[open] .washi-faq-q::after {
  content: "−";
}
.washi-faq-a {
  padding: 0 16px 16px 50px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.washi-faq-a strong {
  color: var(--accent);
  font-weight: 600;
}
.washi-faq-a a {
  color: var(--accent);
  text-decoration: underline;
}
.washi-faq-a a:hover {
  color: var(--accent-hover);
}

/* 言語切り替え */
.lang-switch {
  text-align: right;
  margin-bottom: 20px;
  padding-right: 50px; /* テーマトグルとの重なり回避 */
}

.lang-switch a {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

/* ============================================================
   瞬解 LP 専用スタイル
   ============================================================ */

.shunkai-hero { text-align: center; margin-bottom: 50px; }

.shunkai-app-icon {
  width: 120px; height: 120px;
  background: linear-gradient(135deg, var(--accent), #D4A843);
  border-radius: 28px;
  margin: 0 auto 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px;
  box-shadow: 0 10px 40px rgba(184, 148, 62, 0.25);
}

.shunkai-app-name {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent);
}

.shunkai-subtitle {
  font-size: 18px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

.shunkai-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 8px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 40px;
}

.shunkai-catchphrase {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--text-primary);
  text-align: center;
}

.shunkai-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 50px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* 統計 */
.shunkai-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.shunkai-stat { text-align: center; }

.shunkai-stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
}

.shunkai-stat-label {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* 特徴カード */
.shunkai-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
  text-align: left;
}

.shunkai-feature {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.shunkai-feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.shunkai-feature-icon { font-size: 32px; margin-bottom: 12px; }
.shunkai-feature-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.shunkai-feature-desc { font-size: 14px; color: var(--text-secondary); }

/* 学習アルゴリズム紹介セクション */
.shunkai-algorithm {
  margin-top: 48px;
  padding: 32px 24px;
  background: var(--bg-secondary, #F5F1E8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}
.shunkai-algorithm-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.shunkai-algorithm-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.shunkai-algorithm-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.shunkai-algo-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}
.shunkai-algo-card:hover {
  transform: translateY(-2px);
}
.shunkai-algo-icon {
  font-size: 24px;
  margin-bottom: 8px;
}
.shunkai-algo-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.shunkai-algo-detail {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: left;
}

/* CTA */
.shunkai-cta {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 48px;
  margin-bottom: 50px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.shunkai-cta-title {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text-primary);
  color: var(--text-on-accent);
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text-on-accent);
}

.store-btn.coming-soon {
  opacity: 0.5;
  cursor: not-allowed;
}

.store-btn small { font-size: 11px; opacity: 0.8; }

/* LP フッター */
.shunkai-footer {
  border-top: 1px solid var(--border);
  padding-top: 30px;
  margin-top: 50px;
  text-align: center;
}

.shunkai-footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.shunkai-footer-links a {
  color: var(--text-tertiary);
  font-size: 14px;
  transition: color 0.2s;
}

.shunkai-footer-links a:hover { color: var(--accent); }

.shunkai-copyright {
  font-size: 12px;
  color: var(--text-tertiary);
}

.shunkai-copyright a { color: inherit; }

/* ============================================================
   レスポンシブ
   ============================================================ */

@media (max-width: 600px) {
  .washi-card { padding: 20px; }
  .washi-card table { font-size: 12px; }
  .washi-card th, .washi-card td { padding: 8px; }
  .shunkai-app-name { font-size: 32px; }
  .shunkai-catchphrase { font-size: 20px; }
  .shunkai-stats { gap: 20px; }
  .shunkai-stat-number { font-size: 28px; }
  .shunkai-cta { padding: 24px; }
  .shunkai-algorithm { padding: 24px 16px; margin-top: 32px; }
  .shunkai-algorithm-cards { grid-template-columns: 1fr; }
  .shunkai-algo-card { padding: 16px; }
  .shunkai-algorithm-title { font-size: 18px; }
}