/* パズドラデータ モンスター詳細（/monster/<No>/）。見出し（h2/h3）は SWELL のまま触らない */

/* 主属性の色をページの差し色にする（pzl.css と同じ5色。どれも白地・薄い地で 4.5:1 以上） */
.pzl-detail { --pzl-c: #6b737c; --pzl-tint: color-mix(in srgb, var(--pzl-c) 7%, #fff); }
.pzl-detail[data-attr="fire"] { --pzl-c: #c9361f; }
.pzl-detail[data-attr="water"] { --pzl-c: #1f68bd; }
.pzl-detail[data-attr="wood"] { --pzl-c: #217a38; }
.pzl-detail[data-attr="light"] { --pzl-c: #8f6800; }
.pzl-detail[data-attr="dark"] { --pzl-c: #7140b8; }

/* ---- 余白。プラグインの出力は SWELL の .post_content > * の余白が効かないので、ここで揃える ---- */
:where(.pzl-detail) p { margin: 0 0 1em; }
.pzl-detail .pzl-detail__lead + .pzl-detail__lead { margin-top: -.4em; }
:where(.pzl-detail) .pzl-note { margin: -.6em 0 1.6em; }
.pzl-detail .pzl-scroll { margin-bottom: 1.2em; }

/* ---- プロフィール（立ち絵・名前・ステータス・覚醒の帯を1枚に） ---- */
.pzl-detail__profile {
	margin: 0 0 2em;
	border: 1px solid var(--pzl-line, rgba(0, 0, 0, .1));
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.pzl-detail__body { padding: 16px; }

.pzl-detail__id { display: flex; gap: 14px; align-items: center; }
.pzl-detail .pzl-detail__ico { width: 88px; height: 88px; border-radius: 12px; font-size: 1.6em; }
.pzl-detail__idbody { flex: 1; min-width: 0; }
.pzl-detail__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; font-size: .85em; line-height: 1.5; }
.pzl-detail__meta .pzl-attrs { font-size: 1.15em; }
.pzl-detail__rar { font-weight: 700; color: var(--pzl-c); }
.pzl-detail__no { color: var(--pzl-muted, #5f6670); font-variant-numeric: tabular-nums; }
.pzl-detail .pzl-detail__name { margin: .2em 0 .15em; font-weight: 700; font-size: 1.2em; line-height: 1.4; overflow-wrap: anywhere; }
.pzl-detail__sub { display: flex; flex-wrap: wrap; gap: 0 1em; margin: 0; color: var(--pzl-muted, #5f6670); font-size: .85em; }

/* 最大のステータス3つ */
.pzl-detail__key { margin: 14px 0 0; }
.pzl-detail__keystats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin: 0;
	border-radius: 8px;
	background: var(--pzl-tint);
}
.pzl-detail__keystats > div { padding: 8px 10px; min-width: 0; }
.pzl-detail__keystats > div + div { border-left: 1px solid color-mix(in srgb, var(--pzl-c) 18%, #fff); }
.pzl-detail__keystats dt { color: var(--pzl-muted, #5f6670); font-size: .78em; font-weight: 400; }
.pzl-detail__keystats dd { margin: 0; font-weight: 700; font-size: 1.35em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.pzl-detail__keylv { margin: 4px 0 0; color: var(--pzl-muted, #5f6670); font-size: .75em; text-align: right; }

/* 覚醒の帯（ゲームの詳細画面と同じ並び） */
.pzl-detail__strips { margin: 12px 0 0; }
.pzl-detail__strip { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.pzl-detail__strip .pzl-awk { min-width: 24px; height: 24px; }
.pzl-detail__strip .pzl-awk img { width: 24px; height: 24px; }
.pzl-detail__strip.is-super { margin-top: 6px; }
.pzl-detail__strip.is-super .pzl-awk { min-width: 20px; height: 20px; }
.pzl-detail__strip.is-super .pzl-awk img { width: 20px; height: 20px; }
.pzl-detail__striplabel { margin-right: 4px; color: var(--pzl-muted, #5f6670); font-size: .75em; }

/* アシスト・潜在・シリーズ */
.pzl-detail__facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--pzl-line, rgba(0, 0, 0, .1)); font-size: .85em; }
.pzl-detail__fact { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.pzl-detail__fact dt { flex: none; color: var(--pzl-muted, #5f6670); font-weight: 400; }
.pzl-detail__fact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* PC: アイコン＋名前とステータスを左右に */
@media (min-width: 700px) {
	.pzl-detail__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); grid-template-areas: "id key" "strips strips" "facts facts"; gap: 0 24px; padding: 18px 20px; }
	.pzl-detail__id { grid-area: id; }
	.pzl-detail__key { grid-area: key; align-self: end; }
	.pzl-detail__strips { grid-area: strips; }
	.pzl-detail__facts { grid-area: facts; }
}

/* ---- ステータス・倍率 ---- */
.pzl-detail__stats td { font-variant-numeric: tabular-nums; text-align: right; }
.pzl-detail__stats tr.is-top th, .pzl-detail__stats tr.is-top td { background: var(--pzl-tint); font-weight: 700; }

.pzl-detail__mults {
	display: flex;
	flex-wrap: wrap;
	gap: 1px;
	margin: 0 0 .6em;
	border: 1px solid var(--pzl-line, rgba(0, 0, 0, .1));
	border-radius: 8px;
	background: var(--pzl-line, rgba(0, 0, 0, .1));
	overflow: hidden;
}
.pzl-detail__mults > div { flex: 1 1 90px; padding: 8px 10px; background: #fff; text-align: center; }
.pzl-detail__mults dt { color: var(--pzl-muted, #5f6670); font-size: .78em; font-weight: 400; }
.pzl-detail__mults dd { margin: 0; font-weight: 700; font-size: 1.35em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.pzl-detail__mults > .is-atk { background: var(--pzl-tint); }
.pzl-detail__mults > .is-atk dd { color: var(--pzl-c); }

/* ---- 覚醒の一覧（2列の行。線で区切る） ---- */
.pzl-detail__awklist {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0 20px;
	margin: 0 0 1.6em;
	padding: 0;
	list-style: none;
}
.pzl-detail__awklist > li { display: flex; gap: 10px; align-items: center; margin: 0; padding: 8px 2px; border-bottom: 1px solid var(--pzl-line, rgba(0, 0, 0, .1)); line-height: 1.4; }
.pzl-detail__awklist > li::before { display: none; }
.pzl-detail__awklist .pzl-awk, .pzl-detail__awklist .pzl-awk img { width: 32px; height: 32px; }
.pzl-detail__awkname { min-width: 0; overflow-wrap: anywhere; }
.pzl-detail__awkn { margin-left: .3em; color: var(--pzl-muted, #5f6670); font-size: .9em; }

/* ---- スキル ---- */
.pzl-detail__turn { display: inline-flex; gap: 8px; align-items: baseline; margin: 0 0 1em; padding: 4px 12px; border-radius: 6px; background: var(--pzl-tint); }
.pzl-detail__turn > span { color: var(--pzl-muted, #5f6670); font-size: .85em; }
.pzl-detail__turn > strong { font-size: 1.2em; font-variant-numeric: tabular-nums; }
.pzl-detail__skilltext { margin-bottom: 1.4em; line-height: 1.8; }
.pzl-detail__mults + .pzl-note { margin-top: 0; }

/* ---- 進化（1体1枚。上にモンスター、下に素材） ---- */
.pzl-detail__evos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 0 0 1.6em; padding: 0; list-style: none; }
.pzl-detail__evos > .pzl-detail__evo { margin: 0; padding: 12px; border: 1px solid var(--pzl-line, rgba(0, 0, 0, .1)); border-radius: 10px; background: #fff; }
.pzl-detail__evos > .pzl-detail__evo::before { display: none; }
.pzl-detail__evolink { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.pzl-detail .pzl-detail__evoico { width: 56px; height: 56px; border-radius: 8px; }
.pzl-detail__evobody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pzl-detail__evoname { color: var(--color_link, #1a5fc0); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.pzl-detail__evolink:hover .pzl-detail__evoname { text-decoration: underline; }
.pzl-detail__evosub { display: flex; gap: 6px; align-items: center; color: var(--pzl-muted, #5f6670); font-size: .8em; }
.pzl-detail__mats { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--pzl-line, rgba(0, 0, 0, .1)); }
.pzl-detail__matlabel { display: block; margin: 0 0 6px; color: var(--pzl-muted, #5f6670); font-size: .8em; }
.pzl-detail__matlist { display: flex; flex-wrap: wrap; gap: 6px; }
.pzl-detail__mat { display: inline-flex; text-decoration: none; }
.pzl-detail .pzl-detail__matico { width: 40px; height: 40px; border-radius: 6px; font-size: .9em; }
a.pzl-detail__mat:hover .pzl-detail__matico { opacity: .85; }

/* 同じシリーズ・素材の使い道は pzl.css のカード（.pzl-cards） */
.pzl-detail .pzl-cards { margin-bottom: 1.6em; }
/* SWELL の .post_content ul の字下げを打ち消す */
.pzl-detail ul.pzl-detail__awklist, .pzl-detail ul.pzl-detail__evos { padding: 0; margin-left: 0; margin-right: 0; }

.pzl-detail__foot { margin-top: 2em; }

@media (max-width: 600px) {
	.pzl-detail__body { padding: 14px 12px; }
	.pzl-detail .pzl-detail__ico { width: 72px; height: 72px; }
	.pzl-detail__keystats dd { font-size: 1.2em; }
	.pzl-detail__keystats > div { padding: 7px 8px; }
	.pzl-detail__awklist { grid-template-columns: 1fr; }
	.pzl-detail__awklist > li { font-size: .92em; }
	.pzl-detail__stats { font-size: .82em; }
	.pzl-detail__stats th, .pzl-detail__stats td { padding: .4em .45em; }
	.pzl-detail__mults > div { flex-basis: 30%; padding: 7px 6px; }
	.pzl-detail__mults dd { font-size: 1.15em; }
}
