/* ═══════════════════════════════════════════════════════════════
   わがこと日本 — shell v2 追加コンポーネント
   （会員導線・マイページ・我がこと帳・さがす。shell.css の後に読み込む）
   ═══════════════════════════════════════════════════════════════ */

/* CTA ピル */
.sh-auth a.sh-cta { background: var(--shu); color: #fff8ef; border-color: var(--shu); font-weight: 700; }

/* タブ（登録／ログイン） */
.sh-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.sh-tab {
  font: inherit; font-size: 15px; font-weight: 700; padding: 10px 18px;
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--ink-soft); cursor: pointer;
}
.sh-tab[aria-selected="true"] { color: var(--shu); border-bottom-color: var(--shu); }
.sh-tab:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; border-radius: 4px; }

/* 縦フォーム */
.sh-vform { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.sh-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink-soft); }
.sh-field input, .sh-field select, .sh-field textarea {
  font: inherit; font-size: 15px; width: 100%; padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--card); color: var(--ink);
}
.sh-field textarea { min-height: 90px; resize: vertical; line-height: 1.8; }
.sh-field input:focus-visible, .sh-field select:focus-visible, .sh-field textarea:focus-visible,
.sh-form input:focus-visible, .sh-form select:focus-visible {
  outline: 2px solid var(--shu); outline-offset: 1px;
}
.sh-field .field-err { color: var(--risk-high); font-size: 12.5px; margin-top: 5px; min-height: 1em; }
.sh-field.invalid input { border-color: var(--risk-high); }
.sh-pw { position: relative; }
.sh-pw input { padding-right: 74px; }
.sh-pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 12px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg-dim); color: var(--ink-soft); cursor: pointer;
}

/* 選択チップ（興味） */
.sh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-chip {
  font: inherit; font-size: 13.5px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink-soft); cursor: pointer;
}
.sh-chip.on { background: var(--shu-soft); border-color: var(--shu); color: var(--shu); font-weight: 700; }
.sh-chip:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }

/* マイページ */
.sh-hero-card {
  background: linear-gradient(135deg, var(--card), var(--bg-dim));
  border: 1px solid var(--line); border-radius: var(--rad);
  padding: 26px 28px; box-shadow: var(--shadow);
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
}
.sh-hero-card h2 { font-family: var(--serif); font-size: 21px; margin: 4px 0 2px; }
.sh-statrow { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-top: 16px; }
.sh-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); padding: 14px 16px; }
.sh-stat b { font-family: var(--serif); font-size: 26px; display: block; line-height: 1.3; }
.sh-stat b small { font-size: 13px; font-weight: 400; margin-left: 2px; }
.sh-stat span { font-size: 12px; color: var(--ink-soft); letter-spacing: .06em; }

/* 読了タイムライン */
.sh-timeline { list-style: none; margin-top: 6px; margin-left: 6px; padding-left: 18px; border-left: 2px solid var(--line-strong); }
.sh-timeline li { position: relative; padding: 8px 0 8px 14px; }
.sh-timeline li::before {
  content: ""; position: absolute; left: -24px; top: 18px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--shu); border: 2px solid var(--bg);
}
.sh-timeline .tl-date { font-size: 12px; color: var(--ink-soft); letter-spacing: .05em; }
.sh-timeline .tl-title { font-family: var(--serif); font-size: 16px; }
.sh-timeline .tl-title a { text-decoration: none; }
.sh-timeline .tl-title a:hover { color: var(--shu); }
.sh-timeline .tl-quiz { font-size: 12px; color: var(--ok); margin-left: 8px; }

/* 我がこと帳（手帖） */
.sh-journal { display: grid; gap: 14px; }
.sh-journal-entry {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--rad);
  padding: 18px 20px 16px; box-shadow: var(--shadow); position: relative;
}
.sh-journal-entry::before {
  content: "我"; position: absolute; top: 14px; right: 16px;
  font-family: var(--serif); font-size: 13px; color: #fff8ef;
  background: var(--shu); width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center; opacity: .85;
}
.sh-journal-entry .je-meta { font-size: 12px; color: var(--ink-soft); letter-spacing: .05em; }
.sh-journal-entry .je-title { font-family: var(--serif); font-size: 16.5px; margin: 2px 0 8px; }
.sh-journal-entry .je-choice {
  display: inline-block; font-size: 13px; font-weight: 700;
  background: var(--shu-soft); color: var(--shu);
  border-radius: 999px; padding: 4px 12px; margin-bottom: 8px;
}
.sh-journal-entry .je-text { font-family: var(--serif); line-height: 2; font-size: 15px; }
.sh-journal-entry .je-del {
  font-size: 12px; border: 0; background: none; color: var(--ink-soft);
  cursor: pointer; padding: 4px 0; margin-top: 6px; text-decoration: underline;
}
.sh-journal-entry .je-del:hover { color: var(--risk-high); }

/* さがす：フィルタとページ送り */
.sh-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.sh-filters select {
  font: inherit; font-size: 14px; padding: 9px 12px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--card); color: var(--ink); min-width: 130px;
}
.sh-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }
.sh-pager button {
  font: inherit; font-size: 14px; padding: 8px 18px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); cursor: pointer;
}
.sh-pager button:disabled { opacity: .35; cursor: default; }
.sh-pager .pg-state { font-size: 13px; color: var(--ink-soft); }

/* エピソードカード（一覧） */
a.sh-epcard {
  display: block; text-decoration: none; margin-top: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--rad);
  padding: 20px 22px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
a.sh-epcard:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(35,28,18,.10), 0 16px 44px rgba(35,28,18,.16); }
a.sh-epcard h2 { font-family: var(--serif); font-size: 19px; margin: 4px 0; }
a.sh-epcard .ep-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
a.sh-epcard .ep-tag {
  font-size: 11.5px; padding: 2px 10px; border-radius: 999px;
  background: var(--bg-dim); color: var(--ink-soft); border: 1px solid var(--line);
}
@media (prefers-reduced-motion: reduce) { a.sh-epcard { transition: none; } a.sh-epcard:hover { transform: none; } }

/* 空状態・スケルトン */
.sh-empty {
  text-align: center; padding: 36px 24px; border: 1px dashed var(--line-strong);
  border-radius: var(--rad); color: var(--ink-soft); background: var(--bg-dim);
}
.sh-empty .em-mark { font-family: var(--serif); font-size: 30px; color: var(--shu); display: block; margin-bottom: 8px; }
.sh-empty a { color: var(--shu); font-weight: 700; }
.sh-skel { height: 76px; border-radius: var(--rad); background: linear-gradient(100deg, var(--bg-dim) 40%, var(--card) 50%, var(--bg-dim) 60%); background-size: 200% 100%; animation: shSkel 1.4s infinite linear; margin-top: 14px; }
@keyframes shSkel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sh-skel { animation: none; } }

/* 危険地帯（退会） */
.sh-danger { border-color: color-mix(in srgb, var(--risk-high) 45%, var(--line)); }
.sh-danger h2 { color: var(--risk-high); }
.sh-btn.danger { background: var(--risk-high); }
.sh-btn.danger:disabled { opacity: .4; cursor: default; }

/* 404 */
.sh-404 { text-align: center; padding: 70px 20px 40px; }
.sh-404 .code { font-family: var(--serif); font-size: 68px; color: var(--shu); letter-spacing: .1em; }

/* [hidden]は何よりも優先して非表示（.sh-vform等のdisplay指定に負けない） */
[hidden] { display: none !important; }
