.gm-hero{background:linear-gradient(125deg,#f6f1e9 0%,#fffdfa 56%,#f4e9e8 100%)}
.gm-hero .wrap{padding-top:3.4rem;padding-bottom:3.5rem}
.gm-hero h1{margin-bottom:.6rem}
.gm-breadcrumb{font-size:.85rem;color:var(--muted);margin:0 0 1.8rem}
.gm-breadcrumb a{color:inherit;text-decoration:none}
.gm-breadcrumb a:hover{text-decoration:underline}
.gm-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,300px);align-items:center;gap:3rem}
.gm-hero-image{background:#fff;padding:.65rem;box-shadow:0 14px 38px rgba(65,43,35,.12);border:1px solid #e5ddd3;max-width:300px;margin:auto}
.gm-hero-image img{width:100%;max-height:360px;object-fit:contain;display:block}
.gm-count{font-weight:700;color:var(--red-dark);margin-top:2rem}
.gm-jump{border-bottom:1px solid var(--line);background:#fff}
.gm-jump .wrap{display:flex;flex-wrap:wrap;gap:.4rem 1.8rem;padding:1rem 1.25rem}
.gm-jump a{font-weight:700;text-decoration:none;font-size:.9rem}
.gm-era{padding:3rem 1.25rem;border-bottom:1px solid var(--line)}
.gm-era:nth-of-type(even){background:var(--soft)}
.gm-era .wrap{padding:0}
.gm-era .section-title{font-size:clamp(1.7rem,3vw,2.4rem);margin-bottom:1.5rem}
.gm-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem 1rem;list-style:none;padding:0;margin:0}
.gm-directory a{display:flex;align-items:center;gap:1.1rem;padding:1rem 1.15rem;background:#fff;border:1px solid var(--line);text-decoration:none;color:var(--ink);height:100%;border-radius:3px;transition:border-color .15s,transform .15s}
.gm-directory a:hover,.gm-directory a:focus-visible{border-color:var(--red);transform:translateY(-2px)}
.gm-number{font:400 1.5rem Georgia,serif;color:var(--red-dark);min-width:2.2rem}
.gm-person{min-width:0;line-height:1.35}
.gm-person strong{display:block;font-size:1rem}
.gm-person small{display:block;color:var(--muted);font-size:.81rem;margin-top:.2rem}
.gm-arrow{margin-left:auto;color:var(--gold);font-size:1.2rem}
.gm-body{padding:3.5rem 1.25rem}
.gm-layout{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:3rem;align-items:start}
.gm-archive{min-width:0;max-width:820px}
.gm-archive>p:has(img){text-align:center;margin:1.2rem 0}
.gm-archive>p:has(img) img{max-width:100%;height:auto;max-height:600px;object-fit:contain;margin:.3rem;background:#fff}
.gm-archive img{max-width:100%;height:auto}
.gm-archive p{margin:.8rem 0 1.25rem}
.gm-archive h3{font:400 1.65rem Georgia,serif;margin:1.5rem 0 .5rem}
.gm-archive table{max-width:100%;display:block;overflow-x:auto}
.gm-archive iframe{display:block;width:100%;max-width:100%;min-height:700px;border:1px solid var(--line);background:white}
.gm-archive #grand-master-biography,.gm-archive #grand-master-book-excerpt{max-width:none!important;margin:2rem 0!important;padding:1.3rem 1.5rem!important;border-left:4px solid var(--gold);background:var(--soft);text-align:left!important}
.gm-archive #grand-master-biography h3,.gm-archive #grand-master-book-excerpt h3{margin-top:0}
.gm-aside .card{position:sticky;top:100px}
.gm-aside p{font-size:.92rem}
.gm-pager{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:3rem;border-top:1px solid var(--line);padding-top:1.5rem}
.gm-pager a{display:block;padding:1rem;background:var(--soft);text-decoration:none;border:1px solid var(--line)}
.gm-pager a:last-child{text-align:right}
.gm-pager a:hover{border-color:var(--red)}
.gm-pager small{display:block;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-size:.72rem}
.gm-pager strong{display:block;font-family:Georgia,serif;font-size:1.1rem;font-weight:400}
@media(max-width:850px){.gm-layout{grid-template-columns:1fr}.gm-aside{display:none}}
@media(max-width:650px){.gm-directory{grid-template-columns:1fr}.gm-hero-grid{grid-template-columns:1fr;gap:1.5rem}.gm-hero-image{margin:0;width:185px;order:-1}.gm-pager{grid-template-columns:1fr}.gm-pager a:last-child{text-align:left}}

/* Grand Master detail pages and archive galleries */
.gm-hero { padding: clamp(2rem, 5vw, 5rem) 0; background: #f5f2ec; }
.gm-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.gm-hero h1 { overflow-wrap: anywhere; }
.gm-breadcrumb { font-size: .88rem; margin-bottom: 1.5rem; }
.gm-hero-image { text-align: center; }
.gm-hero-image a { display: inline-block; max-width: 100%; cursor: zoom-in; }
.gm-hero-image img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; margin-inline: auto; object-fit: contain; box-shadow: 0 14px 36px rgba(0,0,0,.13); }
.gm-body { padding: clamp(2rem, 5vw, 5rem) 0; }
.gm-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 240px); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.gm-archive { min-width: 0; }
.gm-archive h2 { font: 400 clamp(1.5rem, 2.5vw, 2rem)/1.25 Georgia, serif; margin: 0 0 1.2rem; }
.gm-feature-image { margin: 0 auto clamp(2.5rem, 5vw, 4.5rem); max-width: 780px; text-align: center; }
.gm-feature-image a { display: inline-block; max-width: 100%; cursor: zoom-in; }
.gm-feature-image img { display: block; max-width: 100%; max-height: 650px; width: auto; height: auto; margin-inline: auto; object-fit: contain; }
.gm-feature-image figcaption, .gm-gallery figcaption { font-size: .9rem; line-height: 1.45; color: #615e58; margin-top: .65rem; }
.gm-bio, .gm-story { max-width: 760px; margin: 0 auto clamp(2.5rem, 5vw, 4.5rem); line-height: 1.65; }
.gm-bio p, .gm-story p { margin: 0 0 1rem; }
.gm-bio p[style*="font-size"] { color: #615e58; }
.gm-story iframe { display: block; max-width: 100%; min-height: 480px; margin-inline: auto; }
.gm-story-sources { font-size: .88rem; color: #615e58; }
.gm-gallery { border-top: 1px solid #ddd6ca; padding-top: 2.25rem; }
.gm-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.8rem); align-items: stretch; }
.gm-gallery figure { display: flex; flex-direction: column; justify-content: center; min-width: 0; margin: 0; padding: .8rem; background: #f8f6f2; border: 1px solid #e1dbd0; text-align: center; }
.gm-gallery figure a { display: block; cursor: zoom-in; }
.gm-gallery img { display: block; width: 100%; height: 300px; object-fit: contain; }
.gm-pager { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #ddd6ca; }
.gm-pager a { display: block; max-width: 48%; }
.gm-pager small, .gm-pager strong { display: block; }
@media (max-width: 850px) { .gm-layout { grid-template-columns: minmax(0, 1fr); } .gm-aside { order: 2; } }
@media (max-width: 650px) { .gm-hero-grid { grid-template-columns: 1fr; } .gm-gallery-grid { grid-template-columns: 1fr; } .gm-gallery img { height: auto; max-height: 440px; } }
