/* manual.css — 株主様向けマニュアルページ共通スタイル */

.manual-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
}

@media (max-width: 880px) {
  .manual-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 16px 60px;
  }
}

/* サイドナビ */
.manual-side {
  position: sticky;
  top: 96px;
  align-self: start;
  background: #f7f7f5;
  border: 1px solid #e5e5e0;
  border-radius: 6px;
  padding: 20px;
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 880px) {
  .manual-side {
    position: static;
  }
}

.manual-side__title {
  font-size: 15px;
  font-weight: 700;
  color: #1A2B4A;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #1A2B4A;
}

.manual-side__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.manual-side__list li {
  margin: 0;
}

.manual-side__list a {
  display: block;
  padding: 6px 8px;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

.manual-side__list a:hover {
  background: #fff;
  color: #1A2B4A;
}

.manual-side__list a.is-current {
  background: #1A2B4A;
  color: #fff;
  font-weight: 600;
}

/* 本文 */
.manual-main {
  min-width: 0;
  background: #fff;
  padding: 32px 36px;
  border-radius: 8px;
  border: 1px solid #ececec;
}

@media (max-width: 880px) {
  .manual-main {
    padding: 24px 20px;
  }
}

.manual-main h1 {
  font-size: 28px;
  color: #1A2B4A;
  margin: 0 0 8px;
  line-height: 1.4;
}

.manual-main .manual-lead {
  color: #666;
  margin: 0 0 32px;
  font-size: 15px;
}

.manual-section {
  margin-bottom: 56px;
}

.manual-section h2 {
  font-size: 22px;
  color: #1A2B4A;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #1A2B4A;
}

.manual-section h2:first-child {
  margin-top: 0;
}

.manual-section h3 {
  font-size: 17px;
  margin: 28px 0 12px;
  color: #1A2B4A;
}

.manual-section h4 {
  font-size: 15px;
  margin: 20px 0 10px;
  color: #333;
}

.manual-section p {
  line-height: 1.9;
  margin: 0 0 14px;
}

.manual-section ol,
.manual-section ul {
  margin-left: 1.5em;
  line-height: 1.9;
}

.manual-section a.manual-link {
  word-break: break-all;
  color: #1A2B4A;
  text-decoration: underline;
}

/* 注意ボックス */
.manual-note {
  background: #fff8e1;
  border-left: 4px solid #f0b400;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
  border-radius: 0 4px 4px 0;
}

.manual-note p {
  margin: 0 0 6px;
}

.manual-note p:last-child {
  margin-bottom: 0;
}

.manual-info {
  background: #eef5ff;
  border-left: 4px solid #1A2B4A;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
  border-radius: 0 4px 4px 0;
}

/* 重要注意（目立つアラート）— 各 STEP ページ冒頭の共通注意 */
.manual-alert {
  background: #fff4d6;
  border: 2px solid #f0b400;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 0 0 36px;
  position: relative;
}

.manual-alert::before {
  content: '!';
  position: absolute;
  left: -14px;
  top: -14px;
  width: 28px;
  height: 28px;
  background: #f0b400;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.manual-alert__title {
  font-size: 16px;
  font-weight: 700;
  color: #8a5800;
  margin: 0 0 8px;
}

.manual-alert p {
  margin: 0 0 6px;
  line-height: 1.8;
  font-size: 14px;
}

.manual-alert p:last-child {
  margin-bottom: 0;
}

.manual-alert__domain {
  margin-top: 10px !important;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #f0b400;
  border-radius: 4px;
  font-size: 15px;
  text-align: center;
  letter-spacing: 0.02em;
}

.manual-alert__domain strong {
  color: #1A2B4A;
}

/* 「ご注意」3 項目用バリアント（青系で重要事項を別カテゴリで表示） */
.manual-alert--info {
  background: #eef5ff;
  border-color: #1A2B4A;
}

.manual-alert--info::before {
  background: #1A2B4A;
  content: 'i';
  font-family: "Noto Serif JP", serif;
  font-style: italic;
}

.manual-alert--info .manual-alert__title {
  color: #1A2B4A;
}

.manual-alert__list {
  margin: 0;
  padding-left: 1.4em;
  list-style: disc;
}

.manual-alert__list li {
  margin: 0 0 8px;
  line-height: 1.8;
  font-size: 14px;
}

.manual-alert__list li:last-child {
  margin-bottom: 0;
}

.manual-alert__list strong {
  color: #1A2B4A;
  font-weight: 700;
  background: linear-gradient(transparent 65%, #ffe7a3 65%);
  padding: 0 2px;
}

/* メール文面ボックス（<details> ベースのアコーディオン） */
.manual-mail {
  background: #fafafa;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  margin: 16px 0 24px;
  font-size: 14px;
  overflow: hidden;
}

/* details 版（アコーディオン） */
details.manual-mail summary.manual-mail__subject {
  list-style: none;
  cursor: pointer;
  padding: 14px 48px 14px 20px;
  font-weight: 700;
  font-size: 15px;
  color: #1A2B4A;
  background: #f0f0eb;
  position: relative;
  user-select: none;
  transition: background 0.15s;
}

details.manual-mail summary.manual-mail__subject::-webkit-details-marker {
  display: none;
}

details.manual-mail summary.manual-mail__subject::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #1A2B4A;
  border-bottom: 2px solid #1A2B4A;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}

details.manual-mail[open] summary.manual-mail__subject::after {
  transform: translateY(-30%) rotate(-135deg);
}

details.manual-mail summary.manual-mail__subject:hover {
  background: #e5e5dd;
}

details.manual-mail summary.manual-mail__subject:focus-visible {
  outline: 2px solid #1A2B4A;
  outline-offset: -2px;
}

details.manual-mail summary.manual-mail__subject::before {
  content: 'クリックして開く';
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #888;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

details.manual-mail[open] summary.manual-mail__subject::before {
  content: 'クリックして閉じる';
}

details.manual-mail .manual-mail__body {
  padding: 20px 24px;
}

/* 旧 div 版（subject なしのコードブロック等で利用） */
div.manual-mail {
  padding: 20px 24px;
}

div.manual-mail .manual-mail__subject {
  font-weight: 700;
  font-size: 15px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid #d9d9d9;
  color: #1A2B4A;
}

.manual-mail__body {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.8;
  margin: 0;
}

/* スクショ */
.manual-figure {
  margin: 20px 0 28px;
  text-align: center;
}

.manual-figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid #e5e5e0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.manual-figure figcaption {
  font-size: 13px;
  color: #888;
  margin-top: 8px;
}

/* 前後ナビ */
.manual-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e0;
}

.manual-prevnext a {
  flex: 1;
  display: block;
  padding: 14px 18px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #1A2B4A;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s;
}

.manual-prevnext a:hover {
  background: #f7f7f5;
}

.manual-prevnext .manual-prevnext__label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.manual-prevnext .manual-prevnext__title {
  font-weight: 600;
}

.manual-prevnext .manual-prevnext__next {
  text-align: right;
}

.manual-prevnext__spacer {
  flex: 1;
}

@media (max-width: 600px) {
  .manual-prevnext {
    flex-direction: column;
  }
}

/* 目次カード（index） */
.manual-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

@media (max-width: 600px) {
  .manual-cards {
    grid-template-columns: 1fr;
  }
}

.manual-card {
  display: block;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  color: #1A2B4A;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}

.manual-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.manual-card__num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #B89A5A;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.manual-card__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.manual-card__desc {
  font-size: 13px;
  color: #666;
  margin: 0;
  line-height: 1.7;
}

/* FAQ アコーディオン（<details> ベース） */
.manual-faq {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  margin: 0 0 12px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.manual-faq[open] {
  border-color: #1A2B4A;
  box-shadow: 0 2px 8px rgba(26, 43, 74, 0.08);
}

.manual-faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 56px 18px 20px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
  color: #1A2B4A;
  background: #f6f7f9;
  position: relative;
  user-select: none;
  transition: background 0.15s;
}

.manual-faq__q::-webkit-details-marker {
  display: none;
}

.manual-faq__q::before {
  content: 'Q';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1A2B4A;
  color: #fff;
  font-family: "Noto Serif JP", "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 50%;
  letter-spacing: 0;
  margin-top: -1px;
}

.manual-faq__q::after {
  content: '';
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #1A2B4A;
  border-bottom: 2px solid #1A2B4A;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}

.manual-faq[open] .manual-faq__q::after {
  transform: translateY(-30%) rotate(-135deg);
}

.manual-faq__q:hover {
  background: #eef0f4;
}

.manual-faq[open] .manual-faq__q {
  background: #eef0f4;
  border-bottom: 1px solid #d9d9d9;
}

.manual-faq__q:focus-visible {
  outline: 2px solid #1A2B4A;
  outline-offset: -2px;
}

.manual-faq__a {
  padding: 18px 24px 22px 62px;
  position: relative;
  background: #fff;
  font-size: 14px;
}

.manual-faq__a::before {
  content: 'A';
  position: absolute;
  left: 20px;
  top: 18px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #B89A5A;
  color: #fff;
  font-family: "Noto Serif JP", "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 50%;
}

.manual-faq__a > p:first-child,
.manual-faq__a > ol:first-child,
.manual-faq__a > ul:first-child {
  margin-top: 2px;
}

.manual-faq__a > p:last-child,
.manual-faq__a > ol:last-child,
.manual-faq__a > ul:last-child {
  margin-bottom: 0;
}

.manual-faq__a ol,
.manual-faq__a ul {
  margin-left: 1.3em;
}

@media (max-width: 640px) {
  .manual-faq__q {
    font-size: 15px;
    padding: 16px 44px 16px 16px;
    gap: 10px;
  }

  .manual-faq__q::before,
  .manual-faq__a::before {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .manual-faq__q::after {
    right: 18px;
  }

  .manual-faq__a {
    padding: 16px 18px 18px 50px;
  }

  .manual-faq__a::before {
    left: 16px;
    top: 16px;
  }
}

@media print {
  .manual-faq {
    page-break-inside: avoid;
  }
  .manual-faq__q::after {
    display: none;
  }
}
