/*
 * Yabu Meizan Archive: styles for the ym- classes used in page content
 * (biography, history, marks, museums, auction intro, contact, home).
 * Loaded on archive views and on any page whose content uses class="ym-…".
 * Also loaded inside the Classic Editor (TinyMCE) so editors see the same design.
 */
:root {
	--ym-cream: #FAF7F0;
	--ym-paper: #F3EDE1;
	--ym-black: #121212;
	--ym-gold: #C5A059;
	--ym-gold-bright: #D4AF37;
	--ym-gold-deep: #8a6d3b;
	--ym-wisteria: #4A2E4B;
	--ym-ink: #2a2522;
	--ym-muted: #6b625a;
	--ym-line: rgba(197, 160, 89, 0.45);
	--ym-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
	--ym-body: "EB Garamond", Garamond, Georgia, serif;
	--ym-ja: "Shippori Mincho", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

/* Headings inside ym content */
:where(.ym-intro, .ym-highlights, .ym-timeline-section, .ym-sections, .ym-stats, .ym-source-note) > h2,
.ym-hero-title {
	font-family: var(--ym-display);
	font-weight: 400;
	color: var(--ym-black);
	letter-spacing: 0.01em;
	line-height: 1.12;
}
:where(.ym-intro, .ym-highlights, .ym-timeline-section, .ym-sections) > h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 1rem; }
:where(.ym-intro, .ym-highlights, .ym-timeline-section, .ym-sections, .ym-stats) > h2::after {
	content: ""; display: block; width: 4rem; height: 1px; margin-top: 0.8rem; background: var(--ym-gold);
}
:where([class^="ym-"], [class*=" ym-"]) [lang="ja"] { font-family: var(--ym-ja); font-feature-settings: "palt"; }

/* Sections rhythm */
.ym-hero, .ym-intro, .ym-stats, .ym-highlights, .ym-timeline-section, .ym-sections { margin: 0 0 clamp(3rem, 7vw, 5.5rem); }

/* Hero (content version) */
.ym-hero { text-align: center; padding: clamp(2.5rem, 6vw, 5rem) 1rem; border-top: 1px solid var(--ym-line); border-bottom: 1px solid var(--ym-line); position: relative; }
.ym-hero::before, .ym-hero::after { content: ""; position: absolute; left: 50%; width: 9px; height: 9px; border: 1px solid var(--ym-gold); background: var(--ym-cream); transform: translateX(-50%) rotate(45deg); }
.ym-hero::before { top: -5px; }
.ym-hero::after { bottom: -5px; }
.ym-hero-title { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 300; margin: 0 0 1.2rem; }
.ym-hero-title [lang="ja"] { display: block; font-size: 0.38em; letter-spacing: 0.6em; padding-left: 0.6em; color: var(--ym-gold-deep); margin-top: 0.5em; }
.ym-hero-dates { display: block; font-size: 0.3em; font-variant-caps: all-small-caps; letter-spacing: 0.32em; color: var(--ym-muted); margin-top: 0.6em; }
.ym-hero .ym-lede { margin-inline: auto; }

/* Lede */
.ym-lede {
	font-family: var(--ym-body);
	font-size: clamp(1.2rem, 1.8vw, 1.42rem);
	line-height: 1.6;
	color: var(--ym-black);
	max-width: 44em;
	margin: 0 0 2rem;
}
.ym-lede::first-letter {
	float: left; font-family: var(--ym-display); font-weight: 400; font-size: 3.9em; line-height: 0.8;
	margin: 0.06em 0.12em 0 0; color: var(--ym-gold-deep);
}
.ym-hero .ym-lede::first-letter { float: none; font-size: inherit; line-height: inherit; margin: 0; color: inherit; font-family: inherit; }

/* Buttons and CTA */
.ym-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 2rem 0; }
.ym-button {
	display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.65rem 1.8rem;
	font-family: var(--ym-display); font-variant-caps: all-small-caps; font-weight: 600; font-size: 1.12rem; letter-spacing: 0.22em;
	text-decoration: none !important; border: 1px solid var(--ym-gold); border-radius: 0;
	transition: background-color .35s, color .35s, border-color .35s;
}
.ym-button--primary { background: var(--ym-wisteria); border-color: var(--ym-wisteria); color: var(--ym-cream) !important; }
.ym-button--primary:hover, .ym-button--primary:focus-visible { background: var(--ym-black); border-color: var(--ym-gold-bright); color: var(--ym-gold-bright) !important; }
.ym-button--secondary { background: transparent; color: var(--ym-wisteria) !important; }
.ym-button--secondary:hover, .ym-button--secondary:focus-visible { background: var(--ym-gold); color: var(--ym-black) !important; }
.ym-button:focus-visible, .ym-link-more:focus-visible, .ym-card a:focus-visible { outline: 2px solid var(--ym-gold-bright); outline-offset: 3px; }
.ym-link-more {
	font-family: var(--ym-display); font-variant-caps: all-small-caps; font-weight: 600; letter-spacing: 0.18em; font-size: 1.05rem;
	color: var(--ym-wisteria); text-decoration: none; border-bottom: 1px solid var(--ym-gold); padding-bottom: 2px;
}
.ym-link-more::after { content: " →"; color: var(--ym-gold-deep); }
.ym-link-more:hover { color: var(--ym-black); border-color: var(--ym-gold-bright); }

/* Grid */
.ym-grid { display: grid; gap: clamp(1rem, 2vw, 1.75rem); margin: 1.5rem 0 2rem; }
.ym-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ym-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ym-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Cards */
.ym-card {
	position: relative; padding: 1.6rem 1.6rem 1.5rem; background: #fffdf8;
	border: 1px solid rgba(197, 160, 89, 0.35); box-shadow: 0 24px 40px -36px rgba(18, 18, 18, 0.5);
	transition: border-color .4s, transform .4s, box-shadow .4s;
}
.ym-card::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--ym-gold-deep), var(--ym-gold-bright), var(--ym-gold-deep)); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ym-card:hover, .ym-card:focus-within { border-color: var(--ym-gold); transform: translateY(-2px); box-shadow: 0 30px 50px -34px rgba(18, 18, 18, 0.55); }
.ym-card:hover::before, .ym-card:focus-within::before { transform: scaleX(1); }
.ym-card h3 { font-family: var(--ym-display); font-weight: 500; font-size: 1.5rem; line-height: 1.2; margin: 0 0 0.6rem; color: var(--ym-black); }
.ym-card h3 a { color: inherit; text-decoration: none; }
.ym-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.ym-card p { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--ym-muted); }
.ym-card p + p { margin-top: 0.7rem; }
.ym-card a:not(h3 a) { position: relative; z-index: 1; }

/* Stats */
.ym-stats .ym-grid { gap: 0; border-top: 1px solid var(--ym-line); border-bottom: 1px solid var(--ym-line); }
.ym-stat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.6rem 1rem; }
.ym-grid > .ym-stat + .ym-stat { border-left: 1px solid rgba(197, 160, 89, 0.3); }
.ym-stat-value { font-family: var(--ym-display); font-weight: 300; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; color: var(--ym-wisteria); font-variant-numeric: lining-nums; }
.ym-stat-label { margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.4; color: var(--ym-muted); max-width: 18em; }

/* Timeline (vertical, gold spine) */
.ym-timeline { list-style: none; margin: 1.5rem 0 2rem; padding: 0 0 0 1.75rem; position: relative; }
.ym-timeline::before { content: ""; position: absolute; left: 5px; top: 0.6rem; bottom: 0.6rem; width: 1px; background: linear-gradient(180deg, var(--ym-gold), var(--ym-line) 85%, transparent); }
.ym-timeline-item { position: relative; display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.25rem; align-items: baseline; padding: 0.85rem 0; border-bottom: 1px solid rgba(197, 160, 89, 0.2); }
.ym-timeline-item:last-child { border-bottom: 0; }
.ym-timeline-item::before { content: ""; position: absolute; left: calc(-1.75rem + 1px); top: 1.35rem; width: 9px; height: 9px; background: var(--ym-cream); border: 1px solid var(--ym-gold); transform: rotate(45deg); transition: background-color .3s; }
.ym-timeline-item:hover::before { background: var(--ym-gold-bright); }
.ym-timeline-date { font-family: var(--ym-display); font-weight: 400; font-size: 1.65rem; line-height: 1; color: var(--ym-gold-deep); font-variant-numeric: lining-nums; white-space: nowrap; }
.ym-timeline-item p { margin: 0; line-height: 1.55; }

/* Callouts and pull quotes */
.ym-callout { margin: 2.5rem 0; padding: 1.75rem 2rem; background: var(--ym-paper); border-left: 2px solid var(--ym-gold); position: relative; }
figure.ym-callout { text-align: center; background: transparent; border-left: 0; border-top: 1px solid var(--ym-line); border-bottom: 1px solid var(--ym-line); padding: 2rem 1rem; }
figure.ym-callout::before { content: ""; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; background: var(--ym-cream); border: 1px solid var(--ym-gold); transform: translateX(-50%) rotate(45deg); }
.ym-callout blockquote { margin: 0; padding: 0; border: 0; quotes: none; }
.ym-callout blockquote p { font-family: var(--ym-display); font-style: italic; font-size: clamp(1.45rem, 2.6vw, 1.95rem); line-height: 1.3; color: var(--ym-wisteria); margin: 0 auto 0.9rem; max-width: 30em; }
.ym-callout figcaption { font-family: var(--ym-display); font-variant-caps: all-small-caps; letter-spacing: 0.16em; font-weight: 600; font-size: 1rem; color: var(--ym-muted); }
.ym-callout h3 { font-family: var(--ym-display); font-variant-caps: all-small-caps; letter-spacing: 0.2em; font-weight: 600; font-size: 1.1rem; color: var(--ym-gold-deep); margin: 0 0 0.6rem; }
.ym-callout > p:last-child { margin-bottom: 0; }
.ym-disclaimer { background: rgba(74, 46, 75, 0.06); border-left-color: var(--ym-wisteria); font-size: 0.98rem; line-height: 1.6; }

/* Source notes and footnotes */
.ym-source-note { font-size: 0.92rem; line-height: 1.55; color: var(--ym-muted); font-style: italic; }
p.ym-source-note { margin: 0.75rem 0 1.5rem; }
section.ym-source-note { font-style: normal; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--ym-line); }
section.ym-source-note > h2 { font-size: 1.05rem; font-variant-caps: all-small-caps; letter-spacing: 0.24em; font-weight: 600; color: var(--ym-gold-deep); margin: 0 0 1rem; }
.ym-footnotes { margin: 0; padding-left: 1.6rem; font-size: 0.88rem; line-height: 1.5; color: var(--ym-muted); columns: 2 22rem; column-gap: 2.5rem; }
.ym-footnotes li { break-inside: avoid; margin-bottom: 0.55rem; padding-left: 0.2rem; scroll-margin-top: 6rem; }
.ym-footnotes li::marker { color: var(--ym-gold-deep); font-variant-numeric: lining-nums; }
.ym-footnotes li:target { background: rgba(212, 175, 55, 0.16); outline: 1px solid var(--ym-gold); outline-offset: 2px; }
.ym-footnotes a { color: var(--ym-wisteria); word-break: break-word; text-decoration-color: var(--ym-line); }
.ym-fnref { font-size: 0.68em; line-height: 0; vertical-align: super; margin-left: 0.08em; font-variant-numeric: lining-nums; }
.ym-fnref a { color: var(--ym-gold-deep); text-decoration: none; padding: 0 0.08em; }
.ym-fnref a:hover, .ym-fnref a:focus-visible { color: var(--ym-wisteria); text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
	.ym-grid--3, .ym-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ym-stats .ym-grid > .ym-stat:nth-child(3) { border-left: 0; }
	.ym-stats .ym-grid > .ym-stat:nth-child(n+3) { border-top: 1px solid rgba(197, 160, 89, 0.3); }
}
@media (max-width: 600px) {
	.ym-grid--2, .ym-grid--3, .ym-grid--4 { grid-template-columns: 1fr; }
	.ym-grid > .ym-stat + .ym-stat { border-left: 0; border-top: 1px solid rgba(197, 160, 89, 0.3); }
	.ym-timeline-item { grid-template-columns: 1fr; gap: 0.3rem; }
	.ym-callout { padding: 1.4rem 1.25rem; }
	.ym-footnotes { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.ym-card, .ym-card::before, .ym-button { transition: none; }
	.ym-card:hover { transform: none; }
}
@media print {
	.ym-card { box-shadow: none; }
	.ym-footnotes { columns: 1; }
}

/* 1.4.2 picture story */
.ys-fig{max-width:340px;margin:.3rem 0 1.2rem}
.ys-fig img{display:block;width:100%;height:auto}
.ys-fig figcaption{font-size:.86rem;line-height:1.4;padding:.5rem .7rem .7rem}
.ys-credit{display:block;color:#6b6358;font-size:.76rem;margin-top:.25rem}
.ys-fig--right{float:right;clear:right;margin-left:1.4rem;width:36%}
.ys-fig--left{float:left;clear:left;margin-right:1.4rem;width:30%}
.ys-fig--lead{max-width:360px;float:right;clear:right;margin-left:1.6rem;width:44%}
.ys-fig--wide{max-width:none;clear:both}
.ys-fig--wide img{max-height:420px;object-fit:cover}
.ys-fig--card{max-width:none;margin:0 0 .8rem;border:0;background:none}
.ys-fig--card img{aspect-ratio:4/3;object-fit:cover}
.ys-strip,.ys-pair{clear:both;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:1rem;margin:1rem 0 1.6rem}
.ys-fig--tile{max-width:none;margin:0}
.ys-fig--tile img{aspect-ratio:1/1;object-fit:cover;background:#fff}
.ys-pair{grid-template-columns:1fr 1fr}
.ys-pair__note{grid-column:1/-1;font-style:italic;margin:0}
h2{clear:both}
.ys-mapstrip{margin:1.6rem 0 2.4rem}
.ys-region{margin:0 0 1.4rem}
.ys-region__name{font-family:"Cormorant Garamond",Garamond,serif;font-size:1.5rem;border-bottom:1px solid rgba(197,160,89,.6);padding-bottom:.3rem}
.ys-region__row{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1rem}
.ys-fig--museum{max-width:none;margin:0}
.ys-fig--museum img{aspect-ratio:3/2;object-fit:cover}
.ys-count{display:inline-block;min-width:1.6em;padding:0 .45em;border-radius:1em;background:#1f4e5f;color:#fff;font-size:.78rem;text-align:center;font-family:system-ui,sans-serif}
.ys-museum__name{font-weight:600}
.ys-note{font-size:.85rem;color:#6b6358}
.yabu-list__item--thumb{display:grid;grid-template-columns:96px 1fr;column-gap:1rem;align-items:start}
.yabu-list__item--thumb>*:not(.yabu-list__thumb){grid-column:2}
.yabu-list__thumb{grid-row:1/span 6;width:96px;height:96px;display:block;overflow:hidden;background:#f6f1e7;border:1px solid rgba(197,160,89,.5)}
.yabu-list__thumb img{width:100%;height:100%;object-fit:cover}
.yabu-list__thumb--none{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;font-size:.68rem;line-height:1.2;color:#6b6358;text-decoration:none;padding:.3rem}
.yabu-list__none-cta{margin-top:.3rem;color:#1f4e5f;text-decoration:underline}
.yabu-fair-badge{display:inline-block;margin-left:.4rem;padding:.05rem .5rem;border:1px solid #c5a059;border-radius:1em;background:#fbf6ea;color:#7a5a17;font-size:.72rem;letter-spacing:.02em;white-space:nowrap}
@media (max-width:700px){.ys-fig--right,.ys-fig--left,.ys-fig--lead{float:none;width:auto;max-width:100%;margin:1rem 0}.ys-strip{grid-template-columns:1fr 1fr}.ys-region__row{grid-template-columns:1fr 1fr}}

/* ---- 1.4.5 Yabu Family page additions (bundled in 1.5.1; formerly Additional CSS) ---- */
.ym145-portraits{grid-template-columns:repeat(3,minmax(0,1fr));max-width:820px;margin-inline:auto}
.ym145-fig img{width:100%;height:auto;display:block;background:#f1ece2}
.ym145-wow{margin:2rem auto;max-width:760px;padding:1.4rem 1.6rem 1.2rem;border-left:4px solid #C5A059;background:linear-gradient(90deg,rgba(197,160,89,.12),rgba(197,160,89,0));font-family:"Cormorant Garamond",Garamond,Georgia,serif;font-size:clamp(1.25rem,2.4vw,1.6rem);line-height:1.35;color:#2a2522;font-style:italic}
.ym145-wow p{margin:0}
.ym145-wow sup{font-style:normal;font-size:.55em}
.ym145-h3{margin-top:2rem;letter-spacing:.02em}
@media (max-width:600px){.ym145-wow{padding:1rem 1.1rem;margin:1.5rem 0}.ym145-portraits{gap:.6rem}}
