/*
Theme Name: Twenty Twenty-Five Child
Template: twentytwentyfive
*/

/* カード全体の見た目 */
.character-card {
	max-width: 400px;
	background: linear-gradient(to bottom, #1c1c1c, #2b2b2b);
	border: 2px solid #666;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
	padding: 0.5em;
	margin: 1em auto;
	color: #fff;
	font-family: "Segoe UI", "Meiryo", sans-serif;
	font-size: 1em;
}

/* テーブル */
.character-table {
	width: 100%;
	min-width: 280px;
	border-collapse: collapse;
}

.character-table th,
.character-table td {
	border: 1px solid #444;
	padding: 6px;
	text-align: center;
	color: #ccc;
}

/* 名前欄 */
.name-cell {
	text-align: left;
	padding-left: 0.5em;
}

.name-cell .kana {
	font-size: 0.6em;
	color: #ccc;
}

.name-cell .name {
	font-size: 1.2em;
	font-weight: bold;
	color: #fff;
}

/* 名将・低レア用スタイル */
.character-card.meisho .name-cell .name,
.character-card.meisho .name-cell .kana {
	color: #ffcc00;
}
.character-card.low-rare .name-cell .kana {
	color: #bbb;
}

/* ステータスヘッダー */
.stat-header {
	background-color: #333;
	font-weight: bold;
}

span.meisho, span.season {
	color: #ffcc00;
}

/* ステータスの値 */
.stat-values td {
	font-weight: bold;
}

/* コンボ欄の色分け */
.status-row td {
	font-weight: bold;
	color: #fff;
}

.status-tag {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 4px;
	color: #fff;
	font-weight: bold;
	font-size: 0.85em !important;
}

.status-tag.float {
	background-color: #1e88e5;
}
.status-tag.knockdown {
	background-color: #e53935;
}
.status-tag.kb {
	background-color: #8e24aa;
}
.status-tag.none {
	background-color: #000000;
}

/* 名将・シーズン表示 */
.meisho, .season {
	font-size: 0.75em;
	display: block;
	color: #aaa;
}

/* 複数カード用のグリッド */
.character-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 16px;
	padding: 1em;
}

/* 名将専用 */
.character-card.meisho {
	border: 4px solid #ffcc00;
	background-color: #1e1a12;
	box-shadow: 0 0 12px rgba(255, 204, 0, 0.6);
	font-size: 1em;
}

/* レア度による文字色 */
.character-card.meisho .rare-cell {
	color: #ffcc00;
}
.character-card.low-rare .name-cell .name,
.character-card.low-rare .name-cell .kana,
.character-card.low-rare .rare-cell {
	color: #888888;
}

/* 所属色分け */
.shozoku-shoku { background-color: #2e7d32; color: #fff; }
.shozoku-gi    { background-color: #1565c0; color: #fff; }
.shozoku-go    { background-color: #c62828; color: #fff; }
.shozoku-gun   { background-color: #6a1b9a; color: #fff; }
.shozoku-ya    { background-color: #43464B; color: #fff; }

/* フィルター */
.character-filter {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1em;
	padding: 1.5em;
	background-color: #f9f9f9;
	border-radius: 10px;
	font-size: 14px;
	align-items: start;
}
.character-filter label {
	display: block;
	font-weight: bold;
}
.character-filter select,
.character-filter input[type="number"] {
	width: 100%;
	padding: 4px 8px;
	margin-top: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

/* 所属 */
.shozoku-group {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	margin-bottom: 1em;
}
.shozoku-group span {
	font-weight: bold;
	min-width: 3em;
}
.shozoku-option {
	background-color: #e0e0e0;
	padding: 6px 10px;
	border-radius: 6px;
	font-weight: bold;
	cursor: pointer;
	white-space: nowrap;
}
.shozoku-option input {
	margin-right: 4px;
}

/* 特殊技フィルター */
.waza-filters {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	padding: 1em;
	border: 1px solid #ccc;
	border-radius: 6px;
	background-color: #fff;
	margin-top: 1em;
}
.waza-filters strong {
	width: 100%;
	margin-bottom: 0.5em;
}

/* レベル・凸・レア度選択ボタン共通 */
.level-selector, .totsu-selector, .min-rare-filter {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-top: 0.5em;
	flex-wrap: wrap;
}
.level-selector label,
.totsu-selector label,
.min-rare-filter label {
	font-weight: bold;
}
/* 共通ボタンスタイル */
.totsu-btn,
.global-lv-btn,
.min-rare-btn {
  background-color: #ddd;
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
}

.totsu-btn:hover,
.global-lv-btn:hover,
.min-rare-btn:hover {
  background-color: #bbb;
}

.totsu-btn.active,
.global-lv-btn.active,
.min-rare-btn.active {
  background-color: #444;
  color: #fff;
  font-weight: bold;
  border-color: #222;
}


/* ステータス最大値 */
.stat-max {
	font-size: 0.65em;
	color: #555;
	display: block;
	margin-top: 2px;
	line-height: 1;
}

/* 技タグ */
.waza-tag {
	display: inline-block;
	background-color: #fff;
	color: #c00;
	font-weight: bold;
	border: 1px solid #c00;
	border-radius: 4px;
	padding: 2px 6px;
	margin: 2px 4px 2px 0;
	font-size: 0.8em;
}

/* 索引 */
.character-index a {
	font-size: 0.85em;
	text-decoration: underline;
	color: #ccc;
}
.character-index a:hover {
	color: #fff;
}

/* モバイル */
@media (max-width: 600px) {
	.character-filter {
		grid-template-columns: 1fr;
	}
	.shozoku-group,
	.waza-filters {
		grid-column: 1 / -1;
	}
}

.totsu-stars {
  text-align: center;
  margin-bottom: 0.2em;
}

.display-level {
  text-align: center;
  font-size: 0.7em;
  color: #ccc;
  margin-bottom: 0.5em;
}
#gattai-ranking-wrapper {
  margin: 2em auto;
  max-width: 960px;
  padding: 1em;
  background-color: #1a1a1a;
  color: #ccc;
  border-radius: 12px;
}

#gattai-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
  margin-bottom: 1em;
}

#gattai-ranking-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  color: #ccc;
  gap: 16px;
}
























.gattai-tabs {
  margin: 2em auto;
  max-width: 960px;
  padding: 1em;
  background-color: #1a1a1a;
  border-radius: 12px;
  color: #fff;
  font-family: "Segoe UI", "Meiryo", sans-serif;
}

.gattai-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
}

.gattai-tab-button {
  background-color: #ddd;
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
}

.gattai-tab-button:hover {
  background-color: #bbb;
}

.gattai-panel {
  padding: 1em;
  background-color: #2a2a2a;
  border-radius: 8px;
}

.gattai-form {
  margin-bottom: 1em;
}

.gattai-form strong {
  display: block;
  margin-bottom: 0.5em;
}

.gattai-ranking-area table {
  width: 100%;
  border-collapse: collapse;
  background-color: #1e1e1e;
  color: #fff;
}

.gattai-ranking-area th,
.gattai-ranking-area td {
  border: 1px solid #444;
  padding: 6px;
  text-align: center;
}

.gattai-ranking-area th {
  background-color: #333;
}

.gattai-ranking-area td {
  background-color: #2a2a2a;
}


.gattai-tab-button.active {
  background-color: #444;
  color: #fff;
  font-weight: bold;
  border-color: #222;
}
.char-group {
  margin: 8px 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
}
.char-group-title {
  font-weight: bold;
  margin-right: 0.8em;
  min-width: 100px;
}
.char-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}
.char-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}


.combo-ranking-toplevel {
  margin: 2em 0;
}
.combo-ranking-cards-list {
  display: flex;
  flex-direction: column;
  gap: 2.5em;
  margin-bottom: 2em;
}
.combo-ranking-set {
  background: #222;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  padding: 1.2em 0.7em 0.7em 0.7em;
}
.combo-ranking-set-score {
  font-weight: bold;
  font-size: 1.15em;
  margin-bottom: 0.7em;
  color: #e8c440;
}
.combo-ranking-set-cards {
  display: flex;
  gap: 1em;
  justify-content: center;
  margin-bottom: 0.2em;
  flex-wrap: wrap;
}
.combo-ranking-list-area {
  margin-top: 3em;
}
.combo-ranking-table {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 2em auto;
  border-collapse: collapse;
  background: #1a1a1a;
  font-size: 1em;
}
.combo-ranking-table th, .combo-ranking-table td {
  border: 1px solid #444;
  padding: 7px 12px;
  text-align: center;
}
.combo-ranking-table th {
  background: #262626;
  color: #ffd966;
  font-weight: bold;
}
.combo-ranking-table tr:nth-child(even) {
  background: #242424;
}
.combo-ranking-table tr:nth-child(odd) {
  background: #191919;
}

.gattai-tabs-btns {
  display: flex; gap: 1em; justify-content: center; margin-bottom: 0em;
}
.gattai-tab-btn {
  padding: 0.7em 1.5em; border-radius: 8px 8px 0 0;
  background: #222; color: #fff; text-decoration: none;
  border: 1px solid #aaa; border-bottom: none; font-weight: bold;
  transition: background .2s;
}
.gattai-tab-btn.active, .gattai-tab-btn:hover {
  background: #ffd966; color: #222; border-color: #ffd966;
}
.gattai-tabs-ranking { margin-top: 0; }


/* ===========================
   合体技ランキングタブ
   =========================== */
.gattai-tabs {
  margin: 2em auto;
  max-width: 960px;
  padding: 1em;
  background: #1a1a1a;
  border-radius: 12px;
  color: #eee;
}

.gattai-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
}

.gattai-tab-button,
.gattai-tab-btn {
  background: #222;
  color: #eee;
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gattai-tab-button.active,
.gattai-tab-btn.active,
.gattai-tab-button:hover,
.gattai-tab-btn:hover {
  background: #ffd966;
  color: #222;
  font-weight: bold;
  border-color: #ffd966;
}

.gattai-tab-content,
.gattai-panel {
  padding: 1em;
  background: #202020;
  border-radius: 8px;
  color: #eee;
}

/* ===========================
   合体技フォーム/ランキング領域
   =========================== */
.gattai-form {
  margin-bottom: 1em;
}
.gattai-form strong {
  display: block;
  margin-bottom: 0.5em;
}
.gattai-ranking-area {
  margin-top: 1em;
  color: #eee;
  background: #222;
  border-radius: 8px;
  padding: 1em 0.5em;
}

/* ===========================
   テーブル（ランキング用）
   =========================== */
.gattai-ranking-area table {
  width: 100%;
  border-collapse: collapse;
  background: #202020;
}
.gattai-ranking-area th,
.gattai-ranking-area td {
  border: 1px solid #444;
  padding: 7px 12px;
  text-align: center;
}
.gattai-ranking-area th {
  background: #262626;
  color: #ffd966;
  font-weight: bold;
}
.gattai-ranking-area tr:nth-child(even) {
  background: #242424;
}
.gattai-ranking-area tr:nth-child(odd) {
  background: #191919;
}

/* ===========================
   チェックリスト・グループ分け
   =========================== */
.char-group {
  margin: 8px 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
}
.char-group-title {
  font-weight: bold;
  margin-right: 0.8em;
  min-width: 100px;
}
.char-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}
.char-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.gattai-form label {
  display: inline-block;
  margin: 0 0.6em 0.5em 0;
  font-size: 1em;
  cursor: pointer;
  color: #eee;
}

/* ===========================
   モバイル対応
   =========================== */
@media (max-width: 600px) {
  .gattai-tabs,
  .gattai-panel,
  .gattai-tab-content,
  .gattai-ranking-area {
    padding: 0.7em;
  }
  .gattai-tab-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5em;
  }
}

/* ===========================
   補足・リセット用
   =========================== */
.gattai-tabs input[type='checkbox'] {
  accent-color: #ffd966;
}


.gattai-panel,
.gattai-tab-content,
.gattai-form,
.gattai-ranking-area,
.gattai-ranking-area table th,
.gattai-ranking-area table td,
.gattai-form label {
  color: #eee;
}

.gattai-ranking-area table th,
.gattai-ranking-area table td {
  background-color: #222;
  border: 1px solid #444;
}

.gattai-ranking-area td,
.gattai-ranking-area th {
  color: #ffd966;   /* 明るい黄色推奨。白がよければ #fff に */
}

.combo-ranking-table,
.combo-ranking-table th,
.combo-ranking-table td {
  color: #fff;
}
.combo-ranking-table th {
  color: #ffd966;
}






















/* ===========================
   サイトヘッダー・タイトル・メニュー
   =========================== */
.site-header,
header,
.wp-site-blocks .site-title {
  background: linear-gradient(100deg, #18543a 0%, #2e7d32 65%, #38b48b 100%);
  color: #fff !important;
  padding: 0.9em 0 0.5em 0;  /* ← ここを短縮 */
  text-align: center;
  border-bottom: 7px solid;
  border-image: linear-gradient(90deg, #e0b072 0%, #b97a56 60%, #ad6c3b 100%) 1;
  box-shadow: 0 3px 22px rgba(32,97,70,0.13);
  position: relative;
}

.site-title, .wp-site-blocks .site-title {
  color: #fff !important;
  font-size: 1.5em;           /* ← ここをやや小さく */
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow:
    0 2px 10px #20614699,
    0 1px 0 #b97a56;
  display: inline-block;
  padding: 0.1em 1.1em 0.1em 1.1em;
  border-bottom: 7px solid;
  border-image: linear-gradient(90deg, #e0b072 0%, #b97a56 60%, #ad6c3b 100%) 1;
  border-radius: 0 0 12px 12px;
  background: none;
}

/* メニュー帯本体は枠なし、緑背景のみ */
.site-header nav,
header nav,
.menu,
.wp-block-navigation,
#site-navigation,
.wp-block-navigation__responsive-container,
.wp-block-navigation__responsive-dialog,
.wp-block-navigation__responsive-container-content {
  margin-top: 0.6em;       /* ← gapを0.5減らす */
  background: #236343 !important;
  padding: 0.25em 1em;     /* ← 上下padding縮小 */
  border-radius: 12px;
  box-shadow: 0 1px 12px rgba(32,97,70,0.06);
  display: flex;
  justify-content: center;
  gap: 0.7em;              /* ← gap減らす */
  border: none !important;
}

/* 内側メニューリストのみ上下2px単色（#e0b072）枠線 */
.wp-block-navigation__container {
  border-top: 2px solid #e0b072 !important;
  border-bottom: 2px solid #e0b072 !important;
  border-left: none !important;
  border-right: none !important;
  background: none !important;
  padding: 0.12em 0;       /* ← 上下padding縮小 */
  margin: 0;
  border-radius: 0;
  display: flex;
  gap: 0.5em;              /* ← gap減らす */
  justify-content: center;
}

/* サブulにも枠不要 */
.wp-block-navigation__container > .wp-block-page-list {
  border: none !important;
  background: none !important;
}

/* メニュー内リンク：装飾は色のみ（明るい銅ゴールドで視認性UP） */
.wp-block-navigation__container a {
  color: #e0b072 !important;
  font-weight: 700;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.18em 0.6em;  /* ← padding少し縮小 */
  text-decoration: none !important;
  margin: 0 2px;
  box-shadow: none !important;
  opacity: 1;
  font-size: 1em;
  text-shadow: 0 1px 3px #2e7d3240, 0 0 2px #fff3;
  transition: color 0.13s, font-weight 0.15s, text-shadow 0.13s;
}
.wp-block-navigation__container a:hover {
  color: #ffe3b0 !important;
  font-weight: 800;
  text-shadow: 0 1px 4px #2e7d3230, 0 0 4px #fff7;
  opacity: 1;
  text-decoration: none !important;
  background: none !important;
}

/* ===========================
   見出し（h1〜h6）
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-family: "Segoe UI", "Meiryo", sans-serif;
  margin-top: 2em;
  margin-bottom: 0.8em;
  font-weight: 800;
  line-height: 1.28;
  background: none;
  box-shadow: none;
}
h1, h2, h3 {
  color: #206146;
  position: relative;
  display: block;
  padding-bottom: 0.15em;
}
h1::after, h2::after, h3::after {
  content: "";
  display: block;
  height: 5px;
  width: 48%;
  min-width: 96px;
  max-width: 260px;
  margin-top: 0.17em;
  border-radius: 4px;
  background: linear-gradient(90deg, #e0b072 0%, #b97a56 60%, #ad6c3b 100%);
  box-shadow: 0 2px 7px rgba(185,122,86,0.11);
}
h1 {
  font-size: 2.1em;
}
h1::after {
  height: 7px;
  width: 65%;
  min-width: 160px;
  max-width: 340px;
}
h2 {
  font-size: 1.45em;
}
h3 {
  font-size: 1.13em;
}
h3::after {
  height: 4px;
  width: 40%;
  min-width: 60px;
  max-width: 150px;
}
h4, h5, h6 {
  color: #227953;
  border-left: 7px solid #b97a56;
  padding-left: 0.5em;
  font-size: 1em;
  margin-top: 1.3em;
  margin-bottom: 0.6em;
  font-weight: 700;
  background: none;
}
h5, h6 {
  border-left-width: 4px;
  font-weight: 600;
}

/* ===========================
   フッター（ページ下部）
   =========================== */
.site-footer, footer, .wp-block-footer, #colophon {
  background: linear-gradient(100deg, #18543a 0%, #236343 60%, #38b48b 100%);
  color: #fff;
  padding: 2em 0 1.5em 0;
  text-align: center;
  border-top: 7px solid;
  border-image: linear-gradient(90deg, #b97a56 0%, #e0b072 70%, #ad6c3b 100%) 1;
  box-shadow: 0 -2px 18px rgba(32,97,70,0.12);
  position: relative;
  font-size: 1.03em;
}

.site-footer a, footer a, .wp-block-footer a, #colophon a {
  color: #e0b072 !important;
  font-weight: 700;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.3em 0.7em;
  text-decoration: none !important;
  margin: 0 2px;
  box-shadow: none !important;
  opacity: 1;
  font-size: 1em;
  text-shadow: 0 1px 3px #2e7d3240, 0 0 2px #fff3;
  transition: color 0.13s, font-weight 0.15s, text-shadow 0.13s;
}
.site-footer a:hover, footer a:hover, .wp-block-footer a:hover, #colophon a:hover {
  color: #ffe3b0 !important;
  font-weight: 800;
  text-shadow: 0 1px 4px #2e7d3230, 0 0 4px #fff7;
  opacity: 1;
  text-decoration: none !important;
  background: none !important;
}

/* コピーライト等をやや淡い色で */
.site-footer .copyright,
footer .copyright,
.wp-block-footer .copyright,
#colophon .copyright {
  color: #b6c8bc;
  font-size: 0.92em;
  margin-top: 1.2em;
}

/* 区切り線などがある場合も銅色で */
.site-footer hr,
footer hr,
.wp-block-footer hr,
#colophon hr {
  border: none;
  border-top: 2px solid #b97a56;
  width: 60%;
  margin: 1.6em auto;
  opacity: 0.75;
}

/* フッター内のアイコンなども銅色アクセント */
.site-footer .icon,
footer .icon,
.wp-block-footer .icon,
#colophon .icon {
  color: #b97a56;
  margin: 0 0.25em;
}

/* ===========================
   モバイル対応
   =========================== */
@media (max-width: 600px) {
  .site-title, .wp-site-blocks .site-title { font-size: 1em; padding: 0.13em 0.2em; }  /* ← さらに小さく */
  h1 { font-size: 1.3em; }
  h2 { font-size: 1.08em; }
  h3 { font-size: 0.97em; }
  h4, h5, h6 { font-size: 0.95em; }
  h1::after, h2::after, h3::after { min-width: 48px; max-width: 120px; }
  .site-header, header, .wp-site-blocks .site-title { padding: 0.4em 0 0.2em 0; }  /* ← さらに短縮 */
  .site-header nav, header nav, .menu, .wp-block-navigation, #site-navigation,
  .wp-block-navigation__responsive-container,
  .wp-block-navigation__responsive-dialog,
  .wp-block-navigation__responsive-container-content {
    flex-direction: column;
    gap: 0.17em;
    padding: 0.07em 0.18em;
  }
  .site-footer, footer, .wp-block-footer, #colophon {
    padding: 1.1em 0 1em 0;
    font-size: 0.98em;
  }
}



         /* 既存のLuxury Folder CSS */
        .library-grid::after { content:""; display:table; clear:both; }

        .folio{
            --tab-bg: linear-gradient(180deg,#f8eac2 0%,#e9cd7a 100%);
            --tab-ink:#3a2a05;
            --body-bg-top:#ffffff; --body-bg-mid:#faf6ee; --body-bg-bottom:#fffdf7;
            --ink:#1f1f1f;
            --gold:#d9b879;

            float:left;
            width:450px;
            margin:18px 18px 28px 0;
            position:relative;

            border-radius:14px;
            border:1px solid var(--gold);
            border-top:none;

            box-shadow:
                0 1px 0 rgba(255,255,255,0.7) inset,
                0 0 0 3px rgba(255,255,255,0.35) inset,
                0 14px 26px rgba(0,0,0,0.16),
                0 6px 16px rgba(0,0,0,0.10);

            padding: 46px 18px 18px;
            color:var(--ink);
            background: linear-gradient(180deg,var(--body-bg-top) 0%,var(--body-bg-mid) 16%,var(--body-bg-bottom) 100%);
        }

        .folio-header{
            position:absolute;
            top:-1px; left:0; right:0;
            height:38px;

            display:flex; align-items:center; gap:10px;
            padding:0;

            background:var(--tab-bg);
            color:var(--tab-ink);
            border:1px solid var(--gold);
            border-bottom:none;
            border-radius:12px 12px 0 0;
            box-shadow:
                inset 0 6px 14px rgba(255,255,255,0.45),
                inset 0 -6px 12px rgba(0,0,0,0.05);
            box-sizing:border-box;
            z-index:2;
        }

        .folio-title{
            padding-left:14px;
            font-weight:800;
            letter-spacing:.02em;
            white-space:nowrap;
            overflow:hidden; text-overflow:ellipsis;
        }

        .folio-vsep{
            width:1px; height:18px;
            background:linear-gradient(180deg,rgba(0,0,0,0.15),rgba(0,0,0,0.05));
            flex:0 0 1px;
            border-radius:1px;
            opacity:.75;
        }

        .folio-desc{
            padding-right:14px;
            font-size:.78em; line-height:1.2;
            opacity:.9;
            white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
            flex:1 1 auto;
        }

        .folio .folio-sep{
            height:6px; margin:0 0 6px;
            background:linear-gradient(180deg,rgba(0,0,0,0.06),rgba(0,0,0,0));
            border-radius:0 0 8px 8px;
        }

        .folio-list{ 
            list-style:none; 
            margin:8px 0 0; 
            padding:0; 
        }
        
        .folio-list a{ 
            color:var(--ink); 
            text-decoration:none; 
            font-weight:700; 
            letter-spacing:.01em; 
        }
        
        .folio-list a:hover{ 
            text-decoration:underline; 
        }
        
        .badge{ 
            display:inline-block; 
            padding:3px 10px; 
            border-radius:999px; 
            font-size:12px;
            border:1px solid rgba(0,0,0,0.12); 
            background:linear-gradient(180deg,#ffffff,#f5f5f5); 
        }

        .folio{ 
            transition:transform .18s ease, box-shadow .18s ease; 
        }
        
        .folio:hover{ 
            transform:translateY(-2px); 
            box-shadow:0 16px 30px rgba(0,0,0,0.18), 0 0 0 3px rgba(255,255,255,0.4) inset; 
        }
        
        .folio:focus-within{ 
            outline:2px solid #c9a85c; 
            outline-offset:2px; 
        }

/* カラーバリエーション */
.folio.green { 
    --tab-bg:linear-gradient(180deg,#d6f3e2 0%,#9ddfb9 100%); 
    --tab-ink:#123b2a;
    --body-bg-top:#f0faf4; 
    --body-bg-mid:#ffffff; 
    --body-bg-bottom:#f0faf4; 
}

.folio.blue { 
    --tab-bg:linear-gradient(180deg,#e0e8ff 0%,#b7c9ff 100%); 
    --tab-ink:#162e68;
    --body-bg-top:#f2f6ff; 
    --body-bg-mid:#ffffff; 
    --body-bg-bottom:#f2f6ff; 
}

.folio.amber { 
    --tab-bg:linear-gradient(180deg,#ffe9b0 0%,#ffd36a 100%); 
    --tab-ink:#5a3f12;
    --body-bg-top:#fff7e3; 
    --body-bg-mid:#ffffff; 
    --body-bg-bottom:#fff7e3; 
}

.folio.purple { 
    --tab-bg:linear-gradient(180deg,#e8deff 0%,#c7b3ff 100%); 
    --tab-ink:#2a1865;
    --body-bg-top:#f5f2ff; 
    --body-bg-mid:#ffffff; 
    --body-bg-bottom:#f5f2ff; 
}

.folio.rose { 
    --tab-bg:linear-gradient(180deg,#ffdeea 0%,#ffb3d1 100%); 
    --tab-ink:#5c1835;
    --body-bg-top:#fff2f6; 
    --body-bg-mid:#ffffff; 
    --body-bg-bottom:#fff2f6; 
}

.folio.slate { 
    --tab-bg:linear-gradient(180deg,#e2e8f0 0%,#b8c5d1 100%); 
    --tab-ink:#1e293b;
    --body-bg-top:#f6f7f9; 
    --body-bg-mid:#ffffff; 
    --body-bg-bottom:#f6f7f9; 
}


        /* 統合フォルダ専用スタイル */
        .category-section {
            margin-bottom: 20px;
        }

        .category-section:last-child {
            margin-bottom: 0;
        }

        .category-header {
            font-size: 14px;
            font-weight: 800;
            color: #ffffff;
            margin-bottom: 10px;
            padding: 10px 16px;
            background: linear-gradient(135deg, #4a5568, #2d3748);
            border-radius: 6px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            box-shadow: 0 2px 4px rgba(0,0,0,0.15);
        }



        .compact-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .compact-item {
            display: inline-block;
            padding: 8px 12px;
            border: 1px solid rgba(0,0,0,0.12);
            border-radius: 6px;
            background: linear-gradient(180deg, #ffffff, #fafafa);
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            transition: all 0.15s ease;
            text-decoration: none;
            color: var(--ink);
            font-weight: 600;
            font-size: 13px;
            letter-spacing: 0.01em;
        }

        .compact-item:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 8px rgba(0,0,0,0.15);
            border-color: var(--gold);
            text-decoration: none;
            background: linear-gradient(180deg, #ffffff, #f8f8f8);
        }

        @media (max-width:500px){
            .folio{ 
                float:none; 
                width:100%; 
                margin:14px 0 22px; 
            }
            
            .folio-header{ 
                height:36px; 
                gap:8px; 
            }
            
            .folio-desc{ 
                font-size:.75em; 
            }

            .category-section {
                margin-bottom: 16px;
            }

            .category-header {
                font-size: 13px;
                padding: 8px 12px;
                margin-bottom: 8px;
            }

            .compact-grid {
                gap: 4px;
            }

            .compact-item {
                font-size: 12px;
                padding: 6px 10px;
            }
        }

/* 右上のトグルボタン */
.folio-toggle{
  margin-left: auto; margin-right: 6px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid rgba(0,0,0,0.15);
  background: linear-gradient(180deg,#fff,#f5f5f5);
  color: var(--tab-ink); font-weight: 800; line-height: 1;
  cursor: pointer; box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 2px 6px rgba(0,0,0,0.08);
}
.folio-toggle:hover{ filter: brightness(1.05); }
.folio-toggle:active{ transform: translateY(1px); }

/* 本文ラッパー（自動追加にも対応） */
.folio-body{ padding: 0 18px 18px; }
.folio .folio-sep + .folio-body{ padding-top: 0; }
.folio.collapsed .folio-body{ display: none; }










/* ── モバイル：カードは横50%・縦は内容にフィット ───────────── */
@media (max-width: 768px) {

  /* 親が grid の minmax(300px,1fr) で幅を上書きしないよう、モバイル時は柔らかく */
  .character-list,
  #gattai-ranking-result,
  .combo-ranking-set-cards {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5em;
    justify-content: flex-start;
  }

  /* テーブルが横幅を押し広げないように（← 280pxの制約を解除） */
  .character-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed;
    word-break: break-word;
  }

  /* ここが本題：幅は50%、高さは auto（＝中身にフィット） */
  .character-card {
    box-sizing: border-box !important;

    /* 横幅を常に50%に固定（ビューポート基準） */
    flex: 0 0 50vw !important;
    width: 50vw !important;
    min-width: 140px !important;
    max-width: auto !important;

    /* 縦は内容に合わせて縮む */
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    /* 余白は軽めに */
    margin: 0 0.25em 0.5em 0.25em !important;

    /* 均等伸びを防ぐため、flexレイアウトは使わない */
    display: block !important;
    overflow: visible !important;
  }

  /* 以前の指定でテーブルを伸ばす flex が残っていた場合の打ち消し */
  .character-card .character-table {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}


@media (max-width: 768px) {
  .character-card .character-table {
    font-size: 80% !important;      /* 全体フォントサイズを80%に縮小 */
    white-space: nowrap !important; /* 改行なし */
    min-width: 140px !important;    /* 前回指定の最小幅 */
  }

  /* セルごとに改行なし＆縮小を確実に適用 */
  .character-card .character-table th,
  .character-card .character-table td {
    font-size: 90% !important;
    white-space: nowrap !important;
    padding: 4px !important;        /* 狭くなった分パディングも調整 */
  }
}