/*
 * Qin 琴 — MCMS2 theme. Light Chinese ink-painting style for musicians: rice paper, misty mountains,
 * a blossoming plum branch, a red seal, and a guqin (the seven-string zither) between the header and the page.
 * Fonts (assets/fonts/, SIL Open Font License): Crimson Text; Noto Serif TC for a few Chinese characters
 * (琴心劍膽 …) so the motto looks the same everywhere — other characters come from the visitor's system.
 * Colours: :root below.
 */
@font-face { font-family: "Crimson Text"; src: url("assets/fonts/CrimsonText-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("assets/fonts/CrimsonText-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("assets/fonts/CrimsonText-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("assets/fonts/CrimsonText-SemiBoldItalic.woff") format("woff"); font-weight: 600; font-style: italic; font-display: swap; }
/* the site name is set in the text font (Crimson Text). For a hand-written name instead: put the font into assets/fonts/title.woff,
   uncomment the next line, use "Qin Title" in .qn-name and add the preload line back to layout.html (see assets/fonts/README.txt).
   @font-face { font-family: "Qin Title"; src: url("assets/fonts/title.woff") format("woff"); font-display: swap; } */
@font-face { font-family: "Qin CJK"; src: url("assets/fonts/QinCJK.woff") format("woff"); font-weight: 400 900; font-display: swap; unicode-range: U+4E00,U+4E03,U+4E09,U+4E4B,U+4E5D,U+4E8C,U+4E94,U+516B,U+516D,U+528D,U+5341,U+56DB,U+5C71,U+5FC3,U+66F8,U+6708,U+6885,U+6A02,U+6C34,U+7434,U+756B,U+7AF9,U+81BD,U+82B1,U+8336,U+83CA,U+862D,U+8A69,U+96F2,U+97F3,U+98A8; }

:root {
    --paper: #f3ead6;          /* warm ivory */
    --paper-light: #f8f1e2;
    --mat: #fbf6ea;            /* the mat around pictures */
    --ink: #2d2a26;
    --ink-soft: #5d574f;
    --muted: #8a8278;
    --cinnabar: #b8352b;        /* seal red: links, current menu item, small marks */
    --cinnabar-dark: #8f2820;
    --gold: #b08d4a;
    --line: rgba(70, 58, 45, .2);
    --wrap: 1100px;
    --text-width: 760px;
    --serif: "Crimson Text", "Qin CJK", Georgia, "Times New Roman", "Songti TC", "Noto Serif CJK TC", serif;
    /* MCMS widgets */
    --bg: var(--paper); --text: var(--ink); --accent: var(--cinnabar); --accent-dark: var(--cinnabar-dark); --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: url("assets/clouds.svg"), url("assets/paper.png"), var(--paper);
    color: var(--ink); font: 19px/1.7 var(--serif);
    border-top: 3px solid var(--cinnabar);
}
img { max-width: 100%; height: auto; }
a { color: var(--cinnabar); }
a:hover { color: var(--cinnabar-dark); }
::selection { background: rgba(184, 53, 43, .18); }
.qn-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 6px 12px; }
.qn-skip:focus { left: 8px; }

/* ---------- header */
.qn-header { position: relative; z-index: 10; }
/* .qn-header::before { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: 20px; background: url("assets/huiwen.svg") repeat-x center top; opacity: .8; } */
.qn-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.qn-mountains { position: absolute; right: 0; bottom: 46px; width: 62%; max-width: 900px; height: 190px; object-fit: cover; object-position: right bottom; pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 38%); mask-image: linear-gradient(90deg, transparent, #000 38%); }
.qn-plum { position: absolute; top: -4px; right: max(0px, calc((100% - var(--wrap)) / 2 - 40px)); width: 400px; pointer-events: none; }
.qn-header-in { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 46px 32px 40px; min-height: 196px; display: flex; align-items: center; }
.qn-brand { display: flex; align-items: center; gap: 22px; color: var(--ink); text-decoration: none; }
.qn-seal { flex: none; width: 66px; height: 66px; object-fit: contain; transform: rotate(-3deg); filter: none; }
.qn-brand-text { display: flex; flex-direction: column; }
.qn-name { font: 400 60px/1.05 var(--serif); letter-spacing: .005em; color: var(--ink); }
.qn-tagline { margin-top: 6px; padding-left: .2em; font: 400 13px/1.3 var(--serif); letter-spacing: .34em; text-transform: uppercase; color: var(--cinnabar); }
.qn-brand:hover .qn-name { color: var(--cinnabar-dark); }
.qn-langs { position: absolute; top: 26px; left: 32px; display: flex; gap: .9em; font: 13px/1 var(--serif); letter-spacing: .16em; }
.qn-langs a { color: var(--muted); text-decoration: none; }
.qn-langs a.active, .qn-langs a:hover { color: var(--cinnabar); }

/* menu between two thin double lines, like the border of a scroll */
.qn-nav { position: relative; z-index: 2; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.qn-menu {
    position: relative; isolation: isolate;
    list-style: none; margin: 0; padding: 4px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 6px;
}
/* the band (paper + double lines) is drawn behind the items and fades out at both ends;
   it sits on ::before so the fade does not cut off the sub-menus */
.qn-menu::before {
    content: ""; position: absolute; z-index: -1; top: -1px; bottom: -1px; left: 0; right: 0; pointer-events: none;
    background:
        linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat,
        linear-gradient(var(--line), var(--line)) 0 2px / 100% 1px no-repeat,
        linear-gradient(var(--line), var(--line)) bottom / 100% 1px no-repeat,
        linear-gradient(var(--line), var(--line)) 0 calc(100% - 2px) / 100% 1px no-repeat,
        rgba(248, 241, 226, .78);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--qn-menu-fade, 140px), #000 calc(100% - var(--qn-menu-fade, 140px)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--qn-menu-fade, 140px), #000 calc(100% - var(--qn-menu-fade, 140px)), transparent 100%);
}
.qn-item { position: relative; display: flex; align-items: center; }
.qn-link {
    position: relative; display: block; padding: 12px 18px; color: var(--ink-soft); text-decoration: none; white-space: nowrap;
    font: 400 14px/1.2 var(--serif); letter-spacing: .24em; text-transform: uppercase;
}
.qn-link::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--cinnabar); transform: scale(0); transition: transform .2s; }
.qn-link:hover { color: var(--ink); }
.qn-link.active { color: var(--cinnabar); }
.qn-link.active::after, .qn-link:hover::after { transform: scale(1); }
.qn-link:focus-visible, .qn-sub a:focus-visible, .qn-brand:focus-visible { outline: 1px dotted var(--cinnabar); outline-offset: 3px; }
.qn-nav .mcms-sub-toggle { width: 18px; height: 18px; margin: 0 4px 0 -14px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.qn-nav .mcms-sub-toggle::before { content: ""; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1.2px 1.2px 0; transform: translateY(-2px) rotate(45deg); }
.qn-sub {
    position: absolute; top: 100%; left: 50%; z-index: 30; min-width: 220px; margin: 1px 0 0; padding: 8px; list-style: none;
    background: var(--paper-light); border: 1px solid var(--line); box-shadow: 0 16px 30px -18px rgba(45, 42, 38, .5);
    transform: translateX(-50%); opacity: 0; visibility: hidden; transition: opacity .15s, visibility 0s .15s;
}
.qn-sub a { display: block; padding: 7px 12px; color: var(--ink-soft); text-decoration: none; font: 16px/1.3 var(--serif); white-space: nowrap; }
.qn-sub a:hover, .qn-sub a.active { color: var(--cinnabar); background: rgba(184, 53, 43, .05); }
.qn-menu li.is-open > .qn-sub, .qn-menu li:focus-within > .qn-sub { opacity: 1; visibility: visible; transition: opacity .15s; }
@media (hover: hover) { .qn-menu li.has-sub:hover > .qn-sub { opacity: 1; visibility: visible; transition: opacity .15s; } }
.qn-menu > li.mcms-flip > .qn-sub { left: auto; right: 0; transform: none; }

.qn-divider { width: 100%; max-width: 760px; margin: 26px auto 0; padding: 0 24px; opacity: .9; }
.qn-divider img { display: block; width: 100%; height: auto; }

/* ---------- page */
.qn-main { flex: 1; width: 100%; max-width: calc(var(--text-width) + 64px); margin: 0 auto; padding: 30px 32px 70px; overflow-wrap: break-word; }
.qn-crumbs { text-align: center; margin: 0 0 .2rem; font: 14px/1.4 var(--serif); letter-spacing: .12em; color: var(--muted); }
.qn-crumbs a { color: var(--muted); text-decoration: none; }
.qn-crumbs a:hover { color: var(--cinnabar); }
.qn-crumbs span { margin: 0 .6em; }
.qn-title { margin: 0 0 1.6rem; text-align: center; font: 400 40px/1.15 var(--serif); letter-spacing: .03em; color: var(--ink); }
.qn-title::after { content: ""; display: block; width: 9px; height: 9px; margin: 18px auto 0; background: var(--cinnabar); transform: rotate(45deg); box-shadow: -22px 22px 0 -4px var(--line), 22px -22px 0 -4px var(--line); }
.qn-text > :first-child { margin-top: 0; }
.qn-text > :last-child { margin-bottom: 0; }
.qn-text p { margin: 0 0 1.05em; }
.qn-text h1 { font: 400 34px/1.2 var(--serif); text-align: center; margin: 1.6em 0 .8em; }
.qn-text h2 { position: relative; margin: 1.9em 0 .7em; padding-left: 30px; font: 600 26px/1.25 var(--serif); color: var(--ink); }
.qn-text h2::before { content: ""; position: absolute; left: 0; top: .58em; width: 18px; height: 3px; border-radius: 2px 1px 3px 1px; background: var(--cinnabar); }
.qn-text h3 { margin: 1.6em 0 .5em; font: 400 15px/1.4 var(--serif); letter-spacing: .26em; text-transform: uppercase; color: var(--cinnabar); }
.qn-text strong, .qn-text b { font-weight: 600; color: var(--ink); }
.qn-text a { color: var(--cinnabar); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.qn-text ul { list-style: none; padding: 0; margin: 0 0 1.2em; }
.qn-text ul li { position: relative; padding-left: 1.4em; margin: .35em 0; }
.qn-text ul li::before { content: ""; position: absolute; left: .25em; top: .72em; width: 6px; height: 6px; background: var(--cinnabar); transform: rotate(45deg); opacity: .8; }
.qn-text ol { padding-left: 1.5em; }
.qn-text ol li::marker { color: var(--cinnabar); }
.qn-text blockquote {
    margin: 1.6em auto; padding: .85em 1.5em; max-width: 34em; text-align: center; color: var(--ink);
    font: normal 22px/1.55 var(--serif); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.qn-text blockquote p { margin: 0 0 .4em; }
.qn-text blockquote > :last-child { margin-bottom: 0; }
.qn-text blockquote > :first-child { margin-top: 0; }
.qn-text blockquote:lang(zh), .qn-text .cjk { letter-spacing: .25em; }
.qn-text img { padding: 6px; background: var(--mat); box-shadow: 0 1px 2px rgba(45, 42, 38, .12), 0 10px 24px -14px rgba(45, 42, 38, .45); }
.qn-text img[style*="float: left"] { margin: .3em 1.8em 1em 0; }
.qn-text img[style*="float: right"] { margin: .3em 0 1em 1.8em; }
.qn-text hr { border: 0; height: 9px; margin: 2.4em auto; width: 9px; background: var(--cinnabar); transform: rotate(45deg); opacity: .8; }
.qn-text table { border-collapse: collapse; margin: 1.2em 0; max-width: 100%; }
.qn-text th, .qn-text td { border-bottom: 1px solid var(--line); padding: .5em .8em; text-align: left; vertical-align: top; }
.qn-text th { font-weight: 600; letter-spacing: .04em; }
.qn-text iframe, .qn-text video { max-width: 100%; }
.qn-text::after { content: ""; display: block; clear: both; }
.qn-home .qn-text > blockquote:first-child { margin: .4em auto 1.3em; padding: .2em 1.5em; font-size: 26px; border: 0; letter-spacing: .02em; }
.qn-home .qn-text > blockquote:first-child::before, .qn-home .qn-text > blockquote:first-child::after {
    content: ""; display: block; width: 120px; height: 1px; margin: 0 auto .8em; background: linear-gradient(90deg, transparent, var(--cinnabar), transparent);
}
.qn-home .qn-text > blockquote:first-child::after { margin: .8em auto 0; }
.qn-notfound { text-align: center; padding: 2rem 0; }

/* ---------- footer */
.qn-footer {
    position: relative; text-align: center; padding: 34px 24px 40px; color: var(--muted); font: 15px/1.6 var(--serif);
    background: linear-gradient(180deg, transparent, rgba(141, 138, 132, .12));
}
.qn-footer::before { content: ""; position: absolute; top: 0; left: 50%; width: min(480px, 80%); height: 20px; transform: translateX(-50%); background: url("assets/huiwen.svg") repeat-x center top; opacity: .7;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.qn-footer { padding-top: 46px; }
.qn-footer-seal { width: 34px; height: 34px; margin-bottom: 8px; opacity: .9; }
.qn-footer p { margin: 0 0 .3em; }
.qn-footer a { color: var(--ink-soft); }
.qn-footer a:hover { color: var(--cinnabar); }
.qn-footer-admin { margin-top: .6em; font-size: .92em; }

/* ---------- the photo (assets/hero.jpg; without it the plain header with the plum branch) on the right, fading into the paper */
.qn-hero {
    /* the photo shows hero.jpg from its top edge to the middle of the zither (84.5 % of its height)
       between the top of the page and the top of the menu (--qn-hero-menu = height of the menu bar it ends at):
       height = visible / 0.845 = 1.1834 × visible, not moved up (top: 0).
       To start lower in the photo (crop the top), use height = visible / (bottom − top) and top = −visible × top / (bottom − top).
       For another photo, change these numbers and object-position. */
    --qn-hero-menu: 50px;
    position: absolute; right: 0; top: 0; height: calc((100% - var(--qn-hero-menu)) * 1.1834);
    width: auto; max-width: none; object-fit: cover; object-position: 37% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 27%, #000 45%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 27%, #000 45%);
}
.qn-hero-on .qn-header-in { min-height: 420px; align-items: flex-start; padding-top: 90px; }
.qn-hero-on:not(.qn-home) .qn-header-in { min-height: 300px; padding-top: 60px; }   /* a lower band on the other pages */
.qn-hero-on:not(.qn-home) .qn-main { padding-top: 40px; }
.qn-hero-on .qn-plum { display: none; }
.qn-hero-on .qn-mountains { right: auto; left: 0; width: 55%; transform: scaleX(-1); bottom: 46px; }
.qn-hero-on .qn-brand-text { text-shadow: 0 0 18px var(--paper), 0 0 6px var(--paper); }
.qn-hero-on .qn-nav { margin-top: -2px; }
.qn-hero-on .qn-divider { display: none; }

/* ---------- narrow screens */
@media (max-width: 820px) {
    body { font-size: 18px; }
    .qn-plum { width: 230px; right: -40px; opacity: .9; }
    .qn-hero { --qn-hero-menu: 80px; width: 100%; object-position: 24% 50%; -webkit-mask-image: linear-gradient(180deg, #000 45%, rgba(0, 0, 0, .25) 80%, transparent 100%); mask-image: linear-gradient(180deg, #000 45%, rgba(0, 0, 0, .25) 80%, transparent 100%); }
    .qn-hero-on .qn-header-in { min-height: 0; padding-top: 280px; }
    .qn-hero-on:not(.qn-home) .qn-header-in { min-height: 0; padding-top: 210px; }
    .qn-hero-on .qn-brand-text { text-shadow: 0 0 10px var(--paper), 0 0 18px var(--paper), 0 0 28px var(--paper); }
    .qn-hero-on .qn-seal { display: none; }
    .qn-hero-on .qn-mountains { display: none; }
    .qn-hero-on .qn-langs a { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
    .qn-mountains { width: 100%; height: 130px; bottom: 54px; opacity: .8; }
    .qn-header-in { min-height: 0; padding: 44px 18px 26px; justify-content: center; }
    .qn-brand { flex-direction: column; gap: 12px; text-align: center; }
    .qn-brand-text { align-items: center; }
    .qn-seal { width: 54px; height: 54px; }
    .qn-name { font-size: 46px; }
    .qn-tagline { font-size: 11.5px; letter-spacing: .26em; }
    .qn-langs { left: auto; right: 16px; top: 12px; }
    .qn-nav { padding: 0 10px; }
    .qn-menu { --qn-menu-fade: 40px; }
    .qn-link { padding: 10px 11px; font-size: 13px; letter-spacing: .16em; }
    .qn-item { position: static; }
    .qn-sub { left: 10px; right: 10px; transform: none; min-width: 0; }
    .qn-divider { margin-top: 16px; }
    .qn-main { padding: 22px 18px 50px; }
    .qn-title { font-size: 32px; }
    .qn-text h2 { font-size: 23px; }
    .qn-text blockquote { font-size: 19px; padding: 1em .4em; }
    .qn-text img[style*="float"] { float: none !important; display: block; margin: 0 auto 1em !important; }
}

/* ---------- widgets (SPEC §7) — override freely in your theme */
.mcms-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--mcms-gallery-size, 200px), 1fr)); gap: 10px; margin: 1.2em 0; }
.mcms-gallery-160 { --mcms-gallery-size: 130px; }
.mcms-gallery-240 { --mcms-gallery-size: 190px; }
.mcms-gallery-320 { --mcms-gallery-size: 250px; }
.mcms-gallery-480 { --mcms-gallery-size: 360px; }
.mcms-gallery-item { margin: 0; }
.mcms-gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; background: #eee; }
.mcms-gallery-item figcaption { font-size: .85em; color: #666; margin-top: .3em; text-align: center; overflow-wrap: anywhere; }
.mcms-filelist { list-style: none; padding: 0; margin: 1em 0; }
.mcms-filelist li { padding: .4em .2em; border-bottom: 1px solid rgba(0, 0, 0, .08); display: flex; gap: .8em; align-items: baseline; }
.mcms-filelist a { font-weight: 600; overflow-wrap: anywhere; }
.mcms-file-size { color: #888; font-size: .85em; margin-left: auto; white-space: nowrap; }
.mcms-subpages { padding-left: 1.2em; }
.mcms-subpages li { margin: .25em 0; }
.mcms-album { margin: 1.2em 0; }
.mcms-album-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .2em .5em; margin-bottom: .8em; }
.mcms-album-sep { display: inline-block; width: .45em; height: .45em; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); opacity: .5; margin: 0 .2em; }
.mcms-album-desc { color: #555; }
.mcms-album-text { margin: 0 0 1.4em; overflow-wrap: break-word; }
.mcms-album-text::after { content: ""; display: block; clear: both; }
.mcms-album-subs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0 0 1.2em; }
.mcms-album-subs .mcms-album-sub { flex: 0 1 calc(var(--mcms-gallery-size, 200px) * 1.2); min-width: 0; text-align: center; }   /* centred, about as wide as the photos */
.mcms-album-sub { display: flex; flex-direction: column; gap: .3em; text-decoration: none; color: inherit; position: relative; }
.mcms-album-sub img, .mcms-album-nocover { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; background: #e6e6e6;
    box-shadow: 4px 4px 0 -1px #fff, 5px 5px 0 0 rgba(0, 0, 0, .18), 8px 8px 0 -1px #fff, 9px 9px 0 0 rgba(0, 0, 0, .12); }
.mcms-album-sub:hover img { filter: brightness(1.06); }
.mcms-album-sub-title { font-weight: 600; margin-top: .4em; }
.mcms-album-count { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .8em; padding: .1em .55em; border-radius: 1em; }

/* ---------- news / events widget [news] (default theme) */
.mcms-news { display: flex; flex-direction: column; gap: 1.8rem; margin: 1.6em 0; }
/* full layout: a line between items */
.mcms-news-full { gap: 0; }
.mcms-news-full .mcms-news-item { padding: 2rem 0; }
.mcms-news-full .mcms-news-item:first-child { padding-top: .3rem; }
.mcms-news-full .mcms-news-item + .mcms-news-item { border-top: 1px solid var(--line); }
.mcms-news-item { display: grid; grid-template-columns: auto 1fr; gap: 0 1.4rem; align-items: start; }
.mcms-news-item:not(.has-pic):not(.is-event), .mcms-news-news .mcms-news-item:not(.has-pic) { grid-template-columns: 1fr; }
.mcms-news-agenda .mcms-news-item.has-pic, .mcms-news-past .mcms-news-item.has-pic { grid-template-columns: auto auto 1fr; }
.mcms-news-pic img { display: block; width: 180px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.mcms-news-body { min-width: 0; }
.mcms-news .mcms-news-meta, .mcms-news-single .mcms-news-meta { margin: 0 0 .3em; font-size: .82em; color: #6b7280; letter-spacing: .03em; }
.mcms-news-sep { display: inline-block; width: 4px; height: 4px; margin: 0 .6em .18em; background: var(--accent, #2f6f5e); transform: rotate(45deg); opacity: .7; }
.mcms-news-pin { display: inline-block; margin-left: .6em; padding: 0 .55em; border: 1px solid var(--accent, #2f6f5e); border-radius: 1em; color: var(--accent, #2f6f5e); font-size: .9em; }
.mcms-news-title { margin: 0 0 .35em !important; font-size: 1.25rem !important; line-height: 1.3; }
.mcms-news-title a { color: inherit; text-decoration: none; }
.mcms-news-title a:hover { color: var(--accent, #2f6f5e); }
.mcms-news .mcms-news-lead { margin: 0 0 .5em; }
.mcms-news .mcms-news-links { margin: .2em 0 0; font-size: .9em; }
.mcms-news-when { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 4.4rem; padding: .55rem 0 .6rem;
    border: 1px solid rgba(0,0,0,.12); border-radius: 6px; text-decoration: none; color: inherit; line-height: 1.05; }
.mcms-news-d { font-size: 1.75rem; }
.mcms-news-m { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; color: var(--accent, #2f6f5e); margin-top: .25rem; }
.mcms-news-y { font-size: .68rem; color: #6b7280; margin-top: .2rem; }
.mcms-news-past .mcms-news-when { opacity: .7; }
.mcms-news-compact { gap: 0; }
.mcms-news-compact .mcms-news-item { grid-template-columns: 1fr; padding: .55em 0; border-bottom: 1px solid rgba(0,0,0,.12); }
.mcms-news-compact .mcms-news-when { display: none; }
.mcms-news-compact .mcms-news-title { font-size: 1em !important; margin: 0 !important; }
.mcms-news-compact .mcms-news-meta { margin: 0 !important; }
.mcms-news-item.is-draft { opacity: .55; }
.mcms-news-empty { color: #6b7280; font-style: italic; }
.mcms-news-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 2em 0 1em; padding-top: 1em; border-top: 1px solid rgba(0,0,0,.12); font-size: .9em; }
.mcms-news-pages { color: #6b7280; margin: 0 auto; }
.mcms-news-newer::before, .mcms-news-older::after, .mcms-news-back a::before { content: ""; display: inline-block; width: .45em; height: .45em; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; vertical-align: .12em; }
.mcms-news-newer::before, .mcms-news-back a::before { transform: rotate(45deg); margin-right: .5em; }
.mcms-news-older::after { transform: rotate(-135deg); margin-left: .5em; }
.mcms-news-back { margin: 0 0 1.2em; font-size: .88em; }
.mcms-news-back a { text-decoration: none; }
.mcms-news-single .mcms-news-title { font-size: 2rem !important; margin-bottom: .4em !important; }
.mcms-news-event { display: flex; flex-wrap: wrap; gap: .4em 2rem; margin: 0 0 1.4em; padding: .9em 1.1em; border: 1px solid rgba(0,0,0,.12); border-radius: 6px; }
.mcms-news-event div { display: flex; gap: .6em; align-items: baseline; }
.mcms-news-event dt { font-size: .75em; text-transform: uppercase; letter-spacing: .16em; color: var(--accent, #2f6f5e); }
.mcms-news-event dd { margin: 0; color: inherit; }
.mcms-news-figure { margin: 0 0 1.4em; }
.mcms-news-figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
.mcms-news-single .mcms-news-lead { font-size: 1.12em; color: inherit; }
@media (max-width: 640px) {
    .mcms-news-item, .mcms-news-agenda .mcms-news-item.has-pic, .mcms-news-past .mcms-news-item.has-pic { grid-template-columns: auto 1fr; }
    .mcms-news-news .mcms-news-item.has-pic { grid-template-columns: 1fr; }
    .mcms-news-pic { grid-column: 1 / -1; margin-bottom: .7rem; }
    .mcms-news-pic img { width: 100%; }
}

/* audio player [player] — colours only, the layout comes from assets/player/player.css */
.mcms-player { --mcms-player-accent: var(--accent); --mcms-player-bg: #fff; --mcms-player-line: var(--line); --mcms-player-radius: var(--radius); }
.mcms-player-heading { font-size: 1.05rem; }

/* YouTube widget [youtube] — the layout comes from assets/youtube/youtube.css */
.mcms-yt { --mcms-yt-accent: var(--accent); --mcms-yt-radius: var(--radius); }

/* map [map] and contact form [contact] — layout from assets/map/map.css and assets/contact/contact.css */
.mcms-map { --mcms-map-accent: var(--accent); --mcms-map-radius: var(--radius); }
.mcms-contact { --mcms-contact-accent: var(--accent); --mcms-contact-field: #fff; --mcms-contact-line: var(--line); --mcms-contact-radius: var(--radius); }

/* ---- showcase widget [showcase] ---- */
.mcms-showcase { --mcms-showcase-accent: currentColor; display: grid; gap: 1.6em; margin: 1.2em 0; }
.mcms-showcase-item { display: grid; grid-template-columns: minmax(0, var(--mcms-showcase-size, 320px)) minmax(0, 1fr); gap: 1.2em 1.6em; align-items: start; }
.mcms-showcase-pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--mcms-showcase-radius, 6px); background: rgba(127,127,127,.12); }
.mcms-showcase-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
a.mcms-showcase-pic:hover img, a.mcms-showcase-pic:focus img { transform: scale(1.04); }
.mcms-showcase-nopic { display: block; width: 100%; height: 100%; }
.mcms-showcase-title { margin: 0 0 .35em; font-size: 1.25em; line-height: 1.25; }
.mcms-showcase-title a { color: inherit; text-decoration: none; }
.mcms-showcase-title a:hover { text-decoration: underline; }
.mcms-showcase-desc { margin: 0 0 .6em; white-space: pre-line; }
.mcms-showcase-meta { margin: 0; display: flex; flex-wrap: wrap; gap: .4em 1.2em; font-size: .88em; opacity: .85; }
.mcms-showcase-meta a { color: var(--mcms-showcase-accent); font-weight: 600; }
.mcms-showcase-meta a::after { content: " \2192"; }
.mcms-showcase-more { margin: 0; text-align: center; }
.mcms-showcase-more a { font-weight: 600; color: var(--mcms-showcase-accent); }
.mcms-showcase-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--mcms-showcase-size, 320px)), 1fr)); }
.mcms-showcase-cards .mcms-showcase-item { grid-template-columns: 1fr; gap: .8em; }
.mcms-showcase-cards .mcms-showcase-more { grid-column: 1 / -1; }
.mcms-showcase-item.is-hidden { opacity: .55; }
.mcms-showcase-note { font: 13px monospace; color: #6b4800; margin: 0; }
@media (max-width: 640px) { .mcms-showcase-rows .mcms-showcase-item { grid-template-columns: 1fr; } }
.mcms-showcase { --mcms-showcase-accent: var(--accent); --mcms-showcase-radius: var(--radius); }
.mcms-showcase-list { margin: 0 0 .6em; padding-left: 1.2em; }
.mcms-showcase-list li { margin: .12em 0; }

/* ---------- widget colours for this theme */
.mcms-gallery-item img, .mcms-album-sub img { padding: 5px; background: var(--mat); border-radius: 0; box-shadow: 0 1px 2px rgba(45, 42, 38, .12), 0 8px 18px -12px rgba(45, 42, 38, .45); }
.mcms-album-nocover { background: #ece5d8; }
.mcms-gallery-item figcaption, .mcms-album-desc { color: var(--muted); font-style: italic; }
.mcms-album-sub-title, .mcms-news-title, .mcms-news-title a, .mcms-showcase-title { font-weight: 600; color: var(--ink); }
.mcms-filelist a { color: var(--ink); }
.mcms-filelist li { border-bottom-color: var(--line); }
.mcms-news-when { border-color: var(--line); background: rgba(184, 53, 43, .05); }
.mcms-news-full .mcms-news-item + .mcms-news-item { border-top: 1px solid var(--line); }
.mcms-player { --mcms-player-bg: var(--paper-light); }
.mcms-contact { --mcms-contact-field: var(--mat); }
.mcms-showcase-pic { background: var(--mat); box-shadow: 0 8px 18px -12px rgba(45, 42, 38, .45); }
.mcms-yt { box-shadow: 0 10px 24px -14px rgba(45, 42, 38, .5); }
.qn-text .mcms-yt { margin: 1.3em auto; }
.qn-text .mcms-yt-thumb img { padding: 0; background: none; box-shadow: none; }   /* no photo mat on video pictures */
