/* ========================================================
   伝奇歴史小説『ののうノ野』公式人物カード（上部名前版）
   ・インポータント全廃
   ・カード天辺に肩書き＆名前配置
   ・PC：3列センタリング ／ スマホ：1列＆画像上下切れゼロ
======================================================== */

/* --------------------------------------------------------
   公式ヘッダー＆ナビゲーション
-------------------------------------------------------- */
.card-page-header {
  width: 100%;
  background: radial-gradient(circle at 50% 30%, #26201b 0%, #110e0c 100%);
  border-bottom: 2px solid #8c7042;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  padding: 30px 20px 35px 20px;
  text-align: center;
  box-sizing: border-box;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: #e6ded3;
  margin-bottom: 35px;
}

.card-page-header .header-inner {
  max-width: 960px;
  margin: 0 auto;
}

.card-page-header .header-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 25px;
}

.card-page-header .nav-btn {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #d4af37;
  background: rgba(30, 24, 20, 0.9);
  border: 1px solid #8c7042;
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.card-page-header .nav-btn:hover {
  background: #8c7042;
  color: #110e0c;
  border-color: #f7d57f;
  transform: translateY(-2px);
}

.card-page-header .header-badge {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  color: #f7d57f;
  background: rgba(122, 28, 28, 0.85);
  border: 1px solid #d4af37;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.card-page-header .header-title {
  margin: 0 0 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.card-page-header .title-main {
  font-size: 2.2rem;
  font-weight: bold;
  letter-spacing: 0.18em;
  color: #fffbf0;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.4), 2px 2px 4px #000;
  line-height: 1.25;
}

.card-page-header .title-sub {
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  color: #c2ab87;
  text-shadow: 1px 1px 2px #000;
}

.card-page-header .header-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #8c7042 50%, transparent 100%);
  margin: 18px auto;
  max-width: 360px;
}

.card-page-header .divider-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1a1614;
  padding: 0 10px;
  color: #a82e2e;
  font-size: 0.75rem;
}

.card-page-header .header-lead {
  font-size: 0.9rem;
  line-height: 1.85;
  color: #d6ccbe;
  margin: 0 auto;
  max-width: 680px;
  letter-spacing: 0.05em;
  text-align: justify;
  text-align-last: center;
  overflow-wrap: break-word;
}

.card-page-header .pc-br {
  display: inline;
}

/* --------------------------------------------------------
   カード配置用グリッドラッパー（完全センタリング）
-------------------------------------------------------- */
.sengoku-card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto 50px auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* --------------------------------------------------------
   カード本体
-------------------------------------------------------- */
.sengoku-card {
  display: flex;
  flex-direction: column;
  flex: 0 1 calc(33.333% - 24px);
  width: 100%;
  max-width: 380px;
  min-width: 290px;
  box-sizing: border-box;

  position: relative;
  background: radial-gradient(circle at 50% 15%, #221c17 0%, #110e0c 100%);
  border: 2px solid #8c7042;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(140, 112, 66, 0.15);
  border-radius: 8px;
  overflow: hidden;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: #e6ded3;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sengoku-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8), 0 0 12px rgba(212, 175, 55, 0.35);
}

/* --------------------------------------------------------
   ★最上部：肩書き＆名前エリア
-------------------------------------------------------- */
.sengoku-card .char-top-title {
  padding: 16px 16px 12px 16px;
  background: linear-gradient(180deg, rgba(35, 28, 23, 0.95) 0%, rgba(18, 14, 12, 0.9) 100%);
  border-bottom: 1px solid rgba(140, 112, 66, 0.4);
  box-sizing: border-box;
}

/* 身分・肩書きバッジ */
.sengoku-card .role-badge {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: #d4af37;
  background: rgba(45, 35, 25, 0.85);
  border: 1px solid #8c7042;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  word-break: break-all;
}

/* キャラクター名とルビ */
.sengoku-card .char-name {
  margin: 0;
  font-size: 1.65rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: #fffbf0;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.sengoku-card .char-name span {
  font-size: 0.8rem;
  font-weight: normal;
  letter-spacing: 0.08em;
  color: #c2ab87;
}

/* --------------------------------------------------------
   中央：イラストエリア（画像上下切れ完全防止）
-------------------------------------------------------- */
.sengoku-card .char-visual {
  position: relative;
  width: 100%;
  height: 360px;
  background: radial-gradient(circle at center, #1c1613 0%, #080605 100%);
  border-bottom: 2px solid #5a4525;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.sengoku-card .char-visual img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* 上下切れゼロの絶対防壁 */
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.sengoku-card .vertical-catch {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  writing-mode: vertical-rl;
  -webkit-writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: bold;
  color: #fff8e7;
  background: rgba(122, 28, 28, 0.92);
  border: 1px solid #d4af37;
  padding: 10px 5px;
  border-radius: 4px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  text-shadow: 1px 1px 2px #000;
  max-height: 300px;
}

/* --------------------------------------------------------
   下部：図鑑データ
-------------------------------------------------------- */
.sengoku-card .char-info {
  position: relative;
  flex: 1;
  padding: 16px 18px 16px 18px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  z-index: 1;
}

.sengoku-card .watermark {
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 5.5rem;
  font-weight: 900;
  color: rgba(212, 175, 55, 0.04);
  font-family: "Yuji Boku", "HGS行書体", serif;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: -1;
  transform: rotate(4deg);
}

/* 能力パラメータ */
.sengoku-card .stats-box {
  background: rgba(12, 9, 8, 0.75);
  border: 1px solid #4a3a22;
  border-radius: 5px;
  padding: 8px 10px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
}

.sengoku-card .stat-row {
  display: flex;
  align-items: center;
  margin: 4px 0;
  font-size: 0.76rem;
}

.sengoku-card .stat-label {
  flex: 0 0 92px;
  color: #c9bda8;
  font-weight: 500;
  white-space: nowrap;
}

.sengoku-card .stat-bar-bg {
  flex: 1;
  height: 7px;
  background-color: #241c15;
  border: 1px solid #483822;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 8px;
}

.sengoku-card .stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #993333 0%, #d4af37 100%);
  border-radius: 3px;
}

.sengoku-card .stat-val {
  flex: 0 0 34px;
  text-align: right;
  font-family: "Consolas", monospace, serif;
  font-weight: bold;
  font-size: 0.8rem;
  color: #f7d57f;
}

/* 説明文 */
.sengoku-card .char-desc {
  font-size: 0.84rem;
  line-height: 1.7;
  color: #d6ccbe;
  margin: 0 0 12px 0;
  letter-spacing: 0.03em;
  text-align: justify;
  overflow-wrap: break-word;
}

.sengoku-card .secret-box {
  background: rgba(122, 28, 28, 0.15);
  border-left: 3px solid #a82e2e;
  padding: 7px 10px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e8ded1;
  margin-bottom: 12px;
  border-radius: 0 4px 4px 0;
  overflow-wrap: break-word;
}

.sengoku-card .secret-box b {
  color: #ff9999;
  margin-right: 4px;
}

.sengoku-card .card-footer {
  font-size: 0.7rem;
  color: #8c7653;
  letter-spacing: 0.08em;
  text-align: right;
  border-top: 1px dotted rgba(140, 112, 66, 0.3);
  padding-top: 5px;
  margin-top: auto;
}

/* ========================================================
   レスポンシブ
======================================================== */
@media screen and (max-width: 1080px) {
  .sengoku-card {
    flex: 0 1 calc(50% - 20px);
    max-width: 420px;
  }
}

@media screen and (max-width: 680px) {
  .card-page-header {
    padding: 25px 15px 25px 15px;
    margin-bottom: 20px;
  }

  .card-page-header .header-nav {
    gap: 8px;
    margin-bottom: 18px;
  }

  .card-page-header .nav-btn {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  .card-page-header .title-main {
    font-size: 1.65rem;
  }

  .card-page-header .title-sub {
    font-size: 0.85rem;
  }

  .card-page-header .header-lead {
    font-size: 0.82rem;
    line-height: 1.7;
    text-align: left;
    text-align-last: left;
  }

  .card-page-header .pc-br {
    display: none;
  }

  .sengoku-card-grid {
    gap: 18px;
    padding: 0 10px;
  }

  .sengoku-card {
    flex: 0 1 100%;
    max-width: 480px;
  }

  .sengoku-card .char-visual {
    height: 330px;
  }
}

/* ========================================================
   Amazon上品和風フローティングボタン
======================================================== */
.amazon-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999; /* 常に最前面に表示 */

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, #241d18 0%, #110e0c 100%);
  border: 1.5px solid #d4af37;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7), inset 0 0 8px rgba(212, 175, 55, 0.2);

  padding: 10px 22px;
  text-decoration: none;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  transition: all 0.3s ease;
}

/* サブテキスト（小さく上品に） */
.amazon-float-btn .float-btn-sub {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: #c2ab87;
  line-height: 1.2;
  margin-bottom: 2px;
}

/* メインテキスト（金文字） */
.amazon-float-btn .float-btn-main {
  font-size: 0.95rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  color: #fffbf0;
  text-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
  line-height: 1.2;
}

/* パソコンでのホバー（触れた時）の上品な浮き上がり */
.amazon-float-btn:hover {
  transform: translateY(-3px);
  border-color: #f7d57f;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.85), 0 0 12px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #302620 0%, #161210 100%);
}

/* --------------------------------------------------------
   スマートフォン対応（画面を遮らないスリム設計）
-------------------------------------------------------- */
@media screen and (max-width: 768px) {
  .amazon-float-btn {
    bottom: 16px;
    right: 16px;
    padding: 8px 16px;
    border-radius: 4px;
  }

  .amazon-float-btn .float-btn-sub {
    font-size: 0.62rem;
  }

  .amazon-float-btn .float-btn-main {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
  }
}

<!-- ==========================================
     『ののうノ野』公式人物名鑑 勢力別ジャンプ＆絞り込みナビ
     （※入れ子構造でも絶対にカードが道連れで消えない完全突破版！）
========================================== -->
  .nonou-nav-container {
    max-width: 1000px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #2b221e;
    border: 2px solid #b89b67;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    font-family: 'Yu Mincho', 'Hiragino Mincho ProN', serif;
    color: #fdfbf7;
  }
  .nonou-nav-title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: bold;
    color: #e8d8b9;
    margin: 0 0 14px;
    letter-spacing: 0.12em;
    border-bottom: 1px solid #6b5a3e;
    padding-bottom: 10px;
  }
  .nonou-faction-tabs {
    text-align: center;
    margin-bottom: 14px;
  }
  .faction-btn {
    background-color: #3a2e28;
    color: #e8d8b9;
    border: 1px solid #8c7355;
    border-radius: 6px;
    padding: 8px 14px;
    margin: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
  }
  .faction-btn:hover {
    background-color: #524139;
    border-color: #d4b886;
  }
  .faction-btn.active {
    background-color: #b89b67;
    color: #1a1412;
    border-color: #fff2d6;
  }
  .nonou-char-jump-box {
    background-color: #221a17;
    border: 1px dashed #8c7355;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    max-height: 240px;
    overflow-y: auto;
  }
  .char-jump-btn {
    display: inline-block;
    background-color: #fdfbf7;
    color: #2b221e;
    border: 1px solid #b89b67;
    border-radius: 4px;
    padding: 5px 11px;
    margin: 3px;
    font-size: 0.82rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
  }
  .char-jump-btn:hover {
    background-color: #8c2323;
    color: #ffffff;
    border-color: #ffcccc;
  }
  .char-jump-btn span.no-small {
    font-size: 0.7rem;
    color: #7a6855;
    margin-right: 3px;
  }
  .char-jump-btn:hover span.no-small {
    color: #ffd6d6;
  }
  #nonou-back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #8c2323;
    color: #ffffff;
    border: 2px solid #e8d8b9;
    border-radius: 50px;
    padding: 10px 16px;
    font-family: 'Yu Mincho', serif;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  }
  #nonou-back-to-top:hover {
    background-color: #a82b2b;
  }
