/*
 * 保育ピアノナビ by PIANEST — 公開画面
 *
 * 方針：やさしい・清潔感・読みやすい。スマホ優先。
 * グラデーション・強い影・大きな角丸は使わず、余白と細い線で区切ります。
 * すべて .phd 配下に限定し、テーマに影響しないようにしています。
 */

.phd {
	/* 色 */
	--ink: #3b3431;          /* 本文（あたたかい濃いグレー） */
	--sub: #665b56;
	--muted: #7a6f69;        /* アイボリー上で 4.5:1 以上 */
	--bg: #fbf8f3;           /* アイボリー */
	--paper: #ffffff;
	--beige: #f4ede3;
	--line: #e8dfd3;
	--coral: #e08a7c;        /* 装飾用 */
	--coral-ink: #b04f40;    /* 重要ボタン（白文字 4.5:1 以上） */
	--coral-soft: #f8e3de;
	--mint: #e3f1ea;
	--mint-ink: #2f6f5a;
	--yellow: #fbf1d3;
	--yellow-ink: #7a5d10;
	--sky: #e6eef4;
	--pink: #f6e4e6;

	/* 5段階 */
	--lv0: #4f9a7f;
	--lv1: #7aae6a;
	--lv2: #d1a73a;
	--lv3: #de8a55;
	--lv4: #c4594b;

	--font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
	--font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "YuGothic", Meiryo, system-ui, sans-serif;
	--r: 8px;
	--focus: 0 0 0 3px #fff, 0 0 0 5px #2e6fb7;

	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.8;
	letter-spacing: 0.03em;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

.phd *,
.phd *::before,
.phd *::after {
	box-sizing: border-box;
}

body.phd-page {
	background: #fbf8f3;
}

/* テーマのブロック間余白を打ち消す（ヘッダー・本文・フッターを隙間なくつなぐ）。 */
body.phd-page .wp-site-blocks > * {
	margin-block-start: 0;
}

.phd p,
.phd ul,
.phd ol,
.phd dl,
.phd dd,
.phd figure,
.phd h1,
.phd h2,
.phd h3 {
	margin: 0;
}

.phd ul,
.phd ol {
	padding: 0;
	list-style: none;
}

.phd a {
	color: var(--coral-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.phd img {
	max-width: 100%;
	height: auto;
	display: block;
}

.phd a:focus-visible,
.phd button:focus-visible,
.phd input:focus-visible,
.phd select:focus-visible,
.phd summary:focus-visible {
	outline: none;
	box-shadow: var(--focus);
	border-radius: 4px;
}

.phd-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.phd-wrap {
	width: 100%;
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 20px;
}

.phd-muted { color: var(--muted); }
.phd-small { font-size: 0.85rem; color: var(--sub); }
.phd-hint { font-size: 0.88rem; color: var(--sub); margin-bottom: 14px !important; }
.phd-link { font-weight: 700; }
.phd a.phd-link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- 見出し ---------- */

.phd .phd-h1 {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: clamp(1.6rem, 6.4vw, 2.2rem);
	line-height: 1.4;
	letter-spacing: 0.05em;
}

.phd .phd-h2 {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: clamp(1.2rem, 4.8vw, 1.45rem);
	line-height: 1.5;
	letter-spacing: 0.05em;
	margin-bottom: 16px;
}

.phd .phd-h2::after {
	content: "";
	display: block;
	width: 28px;
	height: 3px;
	margin-top: 8px;
	border-radius: 2px;
	background: var(--coral);
}

.phd-sec {
	margin-top: 48px;
	scroll-margin-top: 16px;
}

/* ---------- ボタン ---------- */

.phd-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 22px;
	border: 1.5px solid transparent;
	border-radius: var(--r);
	font: inherit;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.phd-btn small {
	font-size: 0.75rem;
	font-weight: 500;
}

.phd a.phd-btn--primary,
.phd button.phd-btn--primary {
	background: var(--coral-ink);
	color: #fff;
}

.phd a.phd-btn--primary:hover,
.phd button.phd-btn--primary:hover {
	background: #9a4234;
}

.phd a.phd-btn--ghost,
.phd button.phd-btn--ghost {
	background: var(--paper);
	color: var(--coral-ink);
	border-color: var(--coral);
}

.phd a.phd-btn--pianest {
	background: var(--mint-ink);
	color: #fff;
}

.phd-btn--small {
	min-height: 44px;
	padding: 8px 16px;
	font-size: 0.92rem;
}

.phd a.phd-btn--small:not(.phd-btn--primary):not(.phd-btn--ghost) {
	background: var(--paper);
	color: var(--ink);
	border-color: var(--line);
}

.phd-btn--disabled {
	background: var(--beige);
	color: var(--muted);
	cursor: default;
}

/* ---------- ヘッダー・フッター ---------- */

.phd-skip {
	position: absolute;
	left: -9999px;
}

.phd-skip:focus {
	left: 12px;
	top: 12px;
	z-index: 100;
	padding: 8px 12px;
	background: #fff;
}

.phd-header {
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}

.phd-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 60px;
}

.phd .phd-logo {
	display: inline-flex;
	flex-direction: column;
	gap: 0;
	padding: 8px 0;
	line-height: 1.3;
	white-space: nowrap;
	color: var(--ink);
	text-decoration: none;
}

.phd-logo__name {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: 0.06em;
}

.phd-logo__by {
	font-size: 0.72rem;
	color: var(--sub);
	letter-spacing: 0.04em;
}

.phd-nav ul {
	display: flex;
	gap: 4px;
}

.phd .phd-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 10px;
	color: var(--ink);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

@media (min-width: 600px) {
	.phd .phd-logo { flex-direction: row; align-items: baseline; gap: 8px; }
}

.phd-footer {
	margin-top: 72px;
	padding: 36px 0 44px;
	background: var(--beige);
	color: var(--sub);
	font-size: 0.88rem;
}

.phd-footer__logo {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--ink);
}

.phd-footer__logo span {
	font-size: 0.75rem;
	color: var(--sub);
}

.phd-footer__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
	margin: 16px 0 !important;
}

.phd .phd-footer__nav a {
	display: inline-block;
	padding: 10px 0;
	color: var(--ink);
	font-weight: 700;
}

.phd-footer__copy {
	margin-top: 8px !important;
	font-size: 0.8rem;
}

/* ---------- パンくず・お知らせ ---------- */

.phd-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding-top: 8px;
	font-size: 0.82rem;
	color: var(--sub);
}

.phd-breadcrumb li + li::before {
	content: "›";
	margin: 0 6px;
	color: var(--muted);
}

.phd .phd-breadcrumb a {
	display: inline-block;
	padding: 12px 0;
	color: var(--sub);
}

.phd-note {
	margin: 4px 0 16px !important;
	padding: 10px 14px;
	border-left: 3px solid var(--coral);
	background: var(--coral-soft);
	font-size: 0.88rem;
}

/* ---------- タグ・ラベル ---------- */

.phd-badge,
.phd-tag {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 4px;
	background: var(--beige);
	color: var(--sub);
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.7;
	white-space: nowrap;
}

.phd-badge--good,
.phd-tag--good { background: var(--mint); color: var(--mint-ink); }
.phd-tag--sing { background: var(--yellow); color: var(--yellow-ink); }
.phd-badge--caution { background: var(--coral-soft); color: var(--coral-ink); }
.phd-badge--sample,
.phd-tag--sample { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.phd-badge--type { background: var(--paper); color: var(--sub); border: 1px solid var(--line); }
.phd-badge--pianest { background: var(--mint-ink); color: #fff; }

.phd-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px !important;
}

/* 5段階（●＝難しさ） */
.phd-steps {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.phd-steps__dots {
	display: inline-flex;
	gap: 3px;
}

.phd-steps__dots i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #e6ddd1;
}

.phd-steps--lv0 .on { background: var(--lv0); }
.phd-steps--lv1 .on { background: var(--lv1); }
.phd-steps--lv2 .on { background: var(--lv2); }
.phd-steps--lv3 .on { background: var(--lv3); }
.phd-steps--lv4 .on { background: var(--lv4); }

.phd-steps__word {
	font-size: 0.9rem;
	font-weight: 700;
}

/* 星（★＝評価） */
.phd-stars {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.phd-stars__icons {
	color: #e0a526;
	letter-spacing: 1px;
}

.phd-stars__off {
	color: #e6ddd1;
}

.phd-stars__num {
	font-weight: 700;
	font-size: 0.9rem;
}

/* 写真が無いときの表紙（季節の色＋1文字） */
.phd-cover {
	background: var(--beige);
}

.phd-cover--spring { background: var(--pink); }
.phd-cover--summer { background: var(--mint); }
.phd-cover--autumn { background: var(--yellow); }
.phd-cover--winter { background: var(--sky); }
.phd-cover--all_year { background: var(--coral-soft); }

.phd-cover__char {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1.8rem;
	color: rgba(59, 52, 49, 0.55);
}

/* ---------- トップ：ファーストビュー ---------- */

.phd-hero {
	padding: 20px 0 8px;
}

.phd-hero__photo {
	margin: 0 -20px 20px !important;
}

.phd-hero__photo img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.phd-hero__site {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--coral-ink);
	letter-spacing: 0.08em;
}

.phd-hero__site span {
	font-weight: 500;
	color: var(--sub);
}

.phd .phd-hero__title {
	margin: 8px 0 12px;
	font-family: var(--font-head);
	font-weight: 700;
	font-size: clamp(1.75rem, 7.6vw, 2.6rem);
	line-height: 1.45;
	letter-spacing: 0.04em;
}

.phd-hero__title span {
	display: inline-block;
}

.phd-hero__lead {
	color: var(--sub);
}

.phd-search {
	display: flex;
	gap: 8px;
	margin-top: 20px;
}

.phd-search input {
	flex: 1;
	min-width: 0;
	min-height: 50px;
	padding: 8px 14px;
	border: 1.5px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
	color: var(--ink);
	font: inherit;
	font-size: 16px; /* iOS のズームを防ぐ */
}

.phd-search input:focus {
	border-color: var(--coral);
}

.phd-hero__quick {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
	margin-top: 8px !important;
	font-size: 0.9rem;
}

.phd .phd-hero__quick a {
	display: inline-block;
	padding: 10px 0;
	font-weight: 700;
}

/* ---------- トップ：入口 ---------- */

.phd-tiles {
	display: grid;
	gap: 10px;
}

.phd-tiles--season {
	grid-template-columns: 1fr 1fr;
}

.phd-tiles--row {
	grid-auto-flow: column;
	grid-auto-columns: 42%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	margin: 0 -20px;
	padding: 0 20px 6px;
	scrollbar-width: none;
}

.phd-tiles--row::-webkit-scrollbar {
	display: none;
}

.phd-tiles--row li {
	scroll-snap-align: start;
}

.phd .phd-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 108px;
	padding: 12px 14px;
	border-radius: var(--r);
	overflow: hidden;
	color: var(--ink);
	text-decoration: none;
}

.phd-tile__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.phd-tile.has-img::before {
	content: "";
	position: absolute;
	inset: 40% 0 0;
	background: linear-gradient(to top, rgba(40, 30, 25, 0.55), rgba(40, 30, 25, 0));
	z-index: 1;
}

.phd-tile__name,
.phd-tile__count {
	position: relative;
	z-index: 2;
}

.phd-tile__name {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1.1rem;
}

.phd-tile__count {
	font-size: 0.8rem;
	color: var(--sub);
}

.phd .phd-tile.has-img,
.phd .phd-tile.has-img .phd-tile__count {
	color: #fff;
}

.phd-links li + li {
	border-top: 1px solid var(--line);
}

.phd .phd-links a {
	display: block;
	position: relative;
	padding: 14px 32px 14px 0;
	color: var(--ink);
	text-decoration: none;
}

.phd-links a::after {
	content: "›";
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--coral);
	font-size: 1.4rem;
}

.phd-links strong {
	display: block;
	font-family: var(--font-head);
	font-size: 1.05rem;
}

.phd-links span {
	font-size: 0.85rem;
	color: var(--sub);
}

.phd-chiprow {
	margin-top: 22px;
}

.phd .phd-chiprow__title {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--sub);
	margin-bottom: 8px;
}

.phd-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.phd .phd-chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--paper);
	color: var(--ink);
	font-size: 0.92rem;
	text-decoration: none;
}

.phd-more {
	margin-top: 20px !important;
	text-align: center;
}

.phd-media {
	display: grid;
	gap: 18px;
}

.phd-media__photo img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--r);
}

.phd-media__text p + p,
.phd-media__text p + ul,
.phd-media__text ul + p {
	margin-top: 12px !important;
}

.phd-points li {
	position: relative;
	padding-left: 1.1em;
	margin-top: 6px;
}

.phd-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.75em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--coral);
}

/* ---------- 曲カード（リスト型） ---------- */

.phd-cards {
	display: grid;
	gap: 0;
	border-top: 1px solid var(--line);
}

.phd-card {
	position: relative;
	display: grid;
	grid-template-columns: 84px 1fr;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}

.phd-card__thumb {
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	border-radius: var(--r);
	overflow: hidden;
}

.phd-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.phd .phd-card__title {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.45;
}

.phd .phd-card__title a {
	color: var(--ink);
	text-decoration: none;
}

/* カード全体をタップできるように。 */
.phd-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.phd-card__title a:focus-visible::after {
	box-shadow: var(--focus);
}

.phd-card__meta {
	font-size: 0.85rem;
	color: var(--sub);
}

.phd-card__level {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px !important;
}

.phd-card__label {
	font-size: 0.82rem;
	color: var(--sub);
}

.phd-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px !important;
}

.phd-card__reco {
	margin-top: 8px !important;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--mint-ink);
}

/* ---------- 一覧：見出し・検索 ---------- */

.phd-listhead {
	display: grid;
	gap: 16px;
	margin: 4px 0 20px;
}

.phd-listhead__photo img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--r);
}

.phd-lead {
	margin-top: 8px !important;
	color: var(--sub);
}

.phd-search--list {
	margin-top: 0;
}

.phd-panel {
	margin-top: 12px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
}

.phd-panel__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 50px;
	padding: 0 16px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.phd-panel__toggle::-webkit-details-marker,
.phd-panel__more summary::-webkit-details-marker {
	display: none;
}

.phd-panel__toggle::after {
	content: "＋";
	color: var(--coral-ink);
}

.phd-panel[open] > .phd-panel__toggle::after {
	content: "－";
}

.phd-panel__body {
	padding: 4px 16px 16px;
	border-top: 1px solid var(--line);
}

.phd-facet {
	margin: 14px 0 0;
	padding: 0;
	border: 0;
}

.phd-facet legend {
	padding: 0;
	margin-bottom: 8px;
	font-size: 0.9rem;
	font-weight: 700;
}

.phd-facet legend small {
	font-weight: 500;
	color: var(--sub);
}

.phd-facet__opts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.phd-opt {
	position: relative;
}

.phd-opt input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.phd-opt span {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--bg);
	font-size: 0.92rem;
	cursor: pointer;
}

.phd-opt input:checked + span {
	border-color: var(--coral-ink);
	background: var(--coral-soft);
	color: var(--coral-ink);
	font-weight: 700;
}

.phd-opt input:focus-visible + span {
	box-shadow: var(--focus);
}

.phd-panel__more {
	margin-top: 16px;
}

.phd-panel__more summary {
	min-height: 44px;
	display: flex;
	align-items: center;
	color: var(--coral-ink);
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.phd-panel__actions {
	position: sticky;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 18px;
	padding: 12px 0 4px;
	background: var(--paper);
}

.phd-active {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px !important;
}

.phd .phd-active a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 12px;
	border-radius: 20px;
	background: var(--coral-soft);
	color: var(--coral-ink);
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
}

.phd-resultbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 20px 0 4px;
}

.phd-result strong {
	font-size: 1.3rem;
	margin-right: 2px;
}

.phd-sort select {
	min-height: 44px;
	padding: 0 10px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
	color: var(--ink);
	font: inherit;
	font-size: 0.92rem;
}

.phd-pagination {
	margin-top: 24px;
	text-align: center;
}

.phd-pagination .page-numbers {
	display: inline-block;
	min-width: 44px;
	padding: 10px 12px;
}

.phd-empty {
	padding: 28px 0;
	color: var(--sub);
}

/* ---------- 曲詳細：冒頭 ---------- */

.phd-songhead {
	display: grid;
	gap: 18px;
}

.phd-songhead__photo {
	margin: 0 -20px !important;
}

.phd-songhead__photo img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.phd-credit {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
	margin-top: 4px !important;
	font-size: 0.88rem;
	color: var(--sub);
}

.phd-songhead__lead {
	margin-top: 14px !important;
	font-size: 1.02rem;
}

.phd-facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	margin-top: 18px !important;
	border-top: 1px solid var(--line);
}

.phd-facts > div {
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
}

.phd-facts > div:nth-child(odd):not(.phd-facts__wide) {
	padding-right: 12px;
}

.phd-facts__wide {
	grid-column: 1 / -1;
}

.phd-facts dt {
	font-size: 0.8rem;
	color: var(--sub);
}

.phd-facts dd {
	font-weight: 700;
}

.phd-facts__wide dd {
	font-weight: 500;
}

.phd-terms {
	margin-top: 18px !important;
	display: grid;
	gap: 8px;
}

.phd-terms > div {
	display: grid;
	grid-template-columns: 5.5em 1fr;
	align-items: start;
	gap: 8px;
}

.phd-terms dt {
	padding-top: 9px;
	font-size: 0.82rem;
	color: var(--sub);
}

.phd-terms dd {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.phd .phd-term {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--paper);
	color: var(--ink);
	font-size: 0.9rem;
	text-decoration: none;
}

/* ---------- 曲詳細：あなたに合う楽譜 ---------- */

.phd-fit li {
	padding: 14px 0;
	border-top: 1px solid var(--line);
}

.phd-fit li:last-child {
	border-bottom: 1px solid var(--line);
}

.phd-fit__who {
	font-weight: 700;
}

.phd-fit__who span {
	display: block;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--sub);
}

.phd-fit__pick {
	margin: 4px 0 !important;
	font-family: var(--font-head);
	font-size: 1.15rem;
	font-weight: 700;
}

.phd-fit__pick::before {
	content: "→ ";
	color: var(--coral);
}

.phd .phd-fit__pick a {
	display: inline-block;
	padding: 4px 0;
	color: var(--coral-ink);
}

.phd-fit__reason {
	font-size: 0.88rem;
	color: var(--sub);
}

/* ---------- 曲詳細：楽譜くらべ ---------- */

.phd-compare {
	display: grid;
	gap: 12px;
}

.phd-score {
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
	scroll-margin-top: 16px;
}

.phd .phd-score__title {
	margin-top: 6px;
	font-family: var(--font-head);
	font-size: 1.12rem;
	font-weight: 700;
}

.phd-score__feature {
	font-size: 0.9rem;
	color: var(--sub);
}

.phd-score__rows {
	margin-top: 12px !important;
}

.phd-score__rows > div,
.phd-rating__rows > div {
	display: grid;
	grid-template-columns: 5em 1fr;
	align-items: center;
	gap: 8px;
	min-height: 34px;
}

.phd-score__rows dt,
.phd-rating__rows dt {
	font-size: 0.85rem;
	color: var(--sub);
}

.phd-score__for {
	margin-top: 12px !important;
	font-size: 0.9rem;
}

.phd-score__for span {
	display: inline-block;
	margin-right: 8px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--mint-ink);
}

.phd-score__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px !important;
}

.phd-score__actions .phd-btn {
	flex: 1 1 0;
}

.phd-reco {
	padding: 20px;
	border-radius: var(--r);
	background: var(--mint);
}

.phd .phd-reco__label {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--mint-ink);
}

.phd-reco__name {
	margin: 4px 0 8px !important;
	font-family: var(--font-head);
	font-size: 1.3rem;
	font-weight: 700;
}

/* ---------- 動画 ---------- */

.phd-videos {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 85%;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	margin: 0 -20px 12px;
	padding: 0 20px 6px;
}

.phd-videos:has(> :only-child) {
	grid-auto-columns: 100%;
}

.phd-videos__item {
	scroll-snap-align: start;
	scroll-margin-top: 16px;
}

.phd-videos__score {
	margin-bottom: 6px !important;
	font-weight: 700;
	font-size: 0.92rem;
}

.phd-video {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--r);
	overflow: hidden;
	background: #2b2623;
}

.phd-video__link,
.phd-video iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.phd-video img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.phd-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 60px;
	height: 42px;
	transform: translate(-50%, -50%);
	border-radius: 10px;
	background: rgba(204, 0, 0, 0.9);
}

.phd-video__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #fff;
}

.phd-video--external,
.phd-video--empty {
	display: grid;
	place-items: center;
	background: var(--beige);
}

.phd-video-item figcaption {
	margin-top: 4px;
	font-size: 0.82rem;
	color: var(--sub);
}

/* ---------- 難しさ・評価 ---------- */

.phd-explain > div {
	padding: 14px 0;
	border-top: 1px solid var(--line);
}

.phd-explain dt {
	font-weight: 700;
	margin-bottom: 4px;
}

.phd-explain .phd-points {
	margin-top: 6px !important;
	font-size: 0.92rem;
	color: var(--sub);
}

.phd-ratings {
	display: grid;
	gap: 12px;
}

.phd-rating {
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
}

.phd .phd-rating__title {
	font-size: 1rem;
	font-weight: 700;
}

.phd-rating__title small {
	margin-left: 8px;
	font-weight: 500;
	font-size: 0.8rem;
	color: var(--sub);
}

.phd-rating__quote {
	margin: 8px 0 10px !important;
	color: var(--ink);
}

.phd-rating__rows > div {
	grid-template-columns: 1fr auto;
}

.phd-rating__more summary {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--coral-ink);
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
}

/* ---------- 購入・PIANEST・本文 ---------- */

.phd-buy li {
	display: grid;
	gap: 10px;
	padding: 16px 0;
	border-top: 1px solid var(--line);
	scroll-margin-top: 16px;
}

.phd-buy li:last-child {
	border-bottom: 1px solid var(--line);
}

.phd-buy__name {
	font-weight: 700;
}

.phd-buy__src {
	font-size: 0.85rem;
	color: var(--sub);
}

.phd-buy .phd-btn {
	width: 100%;
}

.phd-buy + .phd-small {
	margin-top: 10px !important;
}

.phd-pianest {
	padding: 22px 20px;
	border-radius: var(--r);
	background: var(--yellow);
}

.phd-pianest__list {
	display: grid;
	gap: 12px;
	margin-top: 14px !important;
}

.phd-pianest__list li {
	padding: 14px;
	border-radius: var(--r);
	background: var(--paper);
}

.phd-pianest__list strong {
	margin-right: 8px;
}

.phd-pianest__list .phd-btn {
	width: 100%;
	margin-top: 10px;
}

.phd-prose p + p {
	margin-top: 1em !important;
}

/* ---------- 曲数・カードの件数 ---------- */

.phd-count {
	margin-left: 6px;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--muted);
}

.phd-opt input:checked + span .phd-count {
	color: var(--coral-ink);
}

.phd-tile.is-empty {
	opacity: 0.55;
}

.phd-listhead__count {
	margin-top: 2px !important;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--mint-ink);
}

.phd-card__counts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
	margin-top: 8px !important;
	font-size: 0.85rem;
	color: var(--sub);
}

.phd-card__counts strong {
	color: var(--ink);
	margin: 0 1px;
}

.phd-card__go {
	margin-left: auto;
	color: var(--coral-ink);
	font-weight: 700;
}

.phd-card__go::after {
	content: " ›";
}

/* ---------- 楽譜ごとのまとまり（動画 → 評価 → 購入） ---------- */

.phd-units {
	display: grid;
	gap: 20px;
}

.phd-unit {
	padding: 18px 16px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
	scroll-margin-top: 12px;
}

.phd .phd-unit__title {
	margin-top: 6px;
	font-family: var(--font-head);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.45;
}

.phd-unit__biblio {
	margin-top: 2px !important;
	font-size: 0.85rem;
	color: var(--sub);
}

.phd-unit__level {
	margin-top: 8px !important;
}

.phd-unit__video {
	margin-top: 14px;
	scroll-margin-top: 12px;
}

.phd-unit__video .phd-video-item + .phd-video-item {
	margin-top: 12px;
}

.phd-unit__note {
	margin-top: 6px !important;
	font-size: 0.82rem;
	color: var(--sub);
}

.phd-unit__novideo {
	padding: 12px 14px;
	border-radius: var(--r);
	background: var(--beige);
	font-size: 0.88rem;
	color: var(--sub);
}

.phd-unit__explain {
	margin-top: 14px !important;
	font-size: 0.95rem;
}

.phd-unit__rating {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--line);
}

.phd-unit__rating .phd-points {
	margin: 8px 0 !important;
	font-size: 0.9rem;
	color: var(--sub);
}

.phd-unit__buy {
	display: grid;
	gap: 6px;
	margin-top: 16px;
	scroll-margin-top: 12px;
}

.phd-unit__buy .phd-btn {
	width: 100%;
}

.phd-pr {
	justify-self: start;
	padding: 0 6px;
	border: 1px solid var(--line);
	border-radius: 3px;
	font-size: 0.75rem;
	line-height: 1.6;
	color: var(--muted);
}

.phd .phd-sublink {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: 0.9rem;
	font-weight: 700;
}

.phd-disclose {
	margin-top: 14px !important;
}

.phd-pianest__list .phd-pr {
	display: inline-block;
	margin-top: 6px;
}

/* ---------- 広い画面 ---------- */

@media (min-width: 600px) {
	.phd-tiles--season { grid-template-columns: repeat(4, 1fr); }
	.phd-tiles--row { grid-auto-columns: 180px; }
	.phd .phd-tile { min-height: 132px; }
	.phd-compare { grid-template-columns: repeat(2, 1fr); }
	.phd-ratings { grid-template-columns: repeat(2, 1fr); }
	.phd-units { grid-template-columns: repeat(2, 1fr); }
	.phd-buy li { grid-template-columns: 1fr auto; align-items: center; }
	.phd-buy .phd-btn { width: auto; min-width: 200px; }
	.phd-videos { grid-auto-columns: calc(50% - 6px); }
	.phd-cards { grid-template-columns: 1fr 1fr; column-gap: 32px; }
	.phd-card { grid-template-columns: 96px 1fr; }
	.phd-card__thumb { width: 96px; height: 96px; }
}

@media (min-width: 860px) {
	.phd-hero { padding: 48px 0 24px; }
	.phd-hero.has-img .phd-hero__inner {
		display: grid;
		grid-template-columns: 1fr 440px;
		align-items: center;
		gap: 48px;
	}
	.phd-hero.has-img .phd-hero__photo { order: 2; margin: 0 !important; }
	.phd-hero__photo img { border-radius: var(--r); }
	.phd-songhead.has-img { grid-template-columns: 1fr 380px; align-items: start; }
	.phd-songhead.has-img .phd-songhead__photo { order: 2; margin: 0 !important; }
	.phd-songhead__photo img { border-radius: var(--r); }
	.phd-media.has-img { grid-template-columns: 380px 1fr; align-items: center; gap: 40px; }
	.phd-listhead.has-img { grid-template-columns: 1fr 360px; align-items: center; }
	.phd-listhead.has-img .phd-listhead__photo { order: 2; }
	.phd-compare:has(> :nth-child(3)) { grid-template-columns: repeat(3, 1fr); }
	.phd-compare:has(> :nth-child(4)) { grid-template-columns: repeat(4, 1fr); }
	.phd-fit { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
	.phd-fit li:last-child { border-bottom: 0; }
	.phd-videos { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; margin: 0 0 12px; padding: 0; }
	.phd-pianest__list { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.phd * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

@media print {
	.phd-header nav,
	.phd-finder,
	.phd-video { display: none; }
}
