/* Ministry of Board Games Library page (v1.4.7). Uses the shared design tokens from mobg-ds.css. */
.bgml-lib { color: var(--mobg-c-ink, #141B33); font-family: var(--mobg-f-body, Inter, system-ui, sans-serif); }
.bgml-lib .bgml-wrap { width: min(100% - 2.5rem, 1320px); margin-inline: auto; }

/* Hero */
.bgml-hero { background: var(--mobg-c-parchment, #F7F3EA); border-bottom: 1px solid var(--mobg-c-line, #D8D3C4); padding: 1.25rem 0 2.25rem; }
.bgml-crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--mobg-c-muted); margin: 0 0 1.5rem; }
.bgml-crumbs a { color: var(--mobg-c-navy); text-decoration: none; }
.bgml-crumbs a:hover { text-decoration: underline; }
.bgml-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem 3rem; align-items: center; }
.bgml-hero__title { font-family: var(--mobg-f-head); font-weight: 400; font-size: clamp(2.2rem, 1.4rem + 3.2vw, 4.25rem); line-height: 1.08; color: var(--mobg-c-navy); margin: 0 0 .6rem; overflow-wrap: break-word; }
.bgml-hero__dept { margin: 0 0 1rem; }
.bgml-hero__lead { font-size: 1.125rem; line-height: 1.6; max-width: 38rem; margin: 0; color: var(--mobg-c-ink); }
.bgml-hero__logo { display: flex; justify-content: flex-end; }
.bgml-hero__logo img { width: 100%; max-width: 640px; height: auto; background: transparent; }

/* Full-width band */
.bgml-band { background: var(--mobg-c-navy, #031441); color: #fff; }
.bgml-band__inner { padding-block: 1rem; }
.bgml-band__title { margin: 0; font-family: var(--mobg-f-head); font-size: clamp(1.35rem, 1rem + 1.5vw, 2.2rem); line-height: 1.15; color: #fff; }
.bgml-band__amp { color: var(--mobg-c-seal, #D9A51E); padding-inline: .2rem; }

/* Listing */
.bgml-listing { padding: 2rem 0 4rem; background: var(--mobg-c-paper, #FFFDF8); }
.bgml-listing__title { margin: 0 0 1rem; font-family: var(--mobg-f-head); font-weight: 400; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; color: var(--mobg-c-navy); }

/* Filter bar: three dropdowns in one row, then the advanced button on the left and the tools on the right */
.bgml-fbar { margin-bottom: 1.25rem; }
.bgml-fbar__main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.bgml-fbar__row { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; margin-top: .85rem; }
.bgml-fbar__tools { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.bgml-fbar__clear { font-weight: 700; color: var(--mobg-c-navy); text-decoration: underline; text-underline-offset: 3px; }

.bgml-dd { position: relative; min-width: 0; }
.bgml-dd details { position: relative; }
.bgml-dd summary { list-style: none; display: flex; flex-direction: column; gap: .2rem; padding: .55rem 2.6rem .6rem 1rem; min-height: 62px; background: #fff; border: 2px solid var(--mobg-c-navy); box-shadow: 3px 3px 0 var(--mobg-c-navy-100, #E6E9F2); cursor: pointer; position: relative; transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease; }
.bgml-dd summary::-webkit-details-marker { display: none; }
.bgml-dd summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: .55rem; height: .55rem; border-right: 2px solid var(--mobg-c-navy); border-bottom: 2px solid var(--mobg-c-navy); transform: translateY(-70%) rotate(45deg); transition: transform .15s ease; }
.bgml-dd details[open] summary::after { transform: translateY(-20%) rotate(225deg); }
.bgml-dd summary:hover { box-shadow: 5px 5px 0 var(--mobg-c-navy); transform: translate(-2px, -2px); }
.bgml-dd summary:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }
.bgml-dd.has-value summary { background: var(--mobg-c-thistle-50, #F2ECF9); }
.bgml-dd__label { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mobg-c-muted); }
.bgml-dd__face { font-size: 1rem; font-weight: 700; color: var(--mobg-c-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgml-dd__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: .35rem; list-style: none; max-height: 320px; overflow-y: auto; background: #fff; border: 2px solid var(--mobg-c-navy); box-shadow: 6px 6px 0 var(--mobg-c-navy); }
.bgml-dd__opt { display: block; padding: .6rem .8rem; color: var(--mobg-c-ink); font-weight: 600; text-decoration: none; }
.bgml-dd__opt:hover, .bgml-dd__opt:focus-visible { background: var(--mobg-c-thistle-50, #F2ECF9); color: var(--mobg-c-navy); outline: none; }
.bgml-dd__opt.is-active { background: var(--mobg-c-navy); color: #fff; }

.bgml-adv { display: inline-flex; align-items: center; gap: .55rem; min-height: 46px; padding: .5rem 1rem; font: inherit; font-size: .9rem; font-weight: 700; color: #fff; background: var(--mobg-c-navy); border: 2px solid var(--mobg-c-navy); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.bgml-adv:hover { background: var(--mobg-c-cone); border-color: var(--mobg-c-cone); }
.bgml-adv:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }
.bgml-adv__count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; background: #fff; color: var(--mobg-c-navy); font-size: .8rem; }
.bgml-count { margin: 0; font-weight: 700; white-space: nowrap; }
.bgml-view { display: flex; gap: .35rem; }
.bgml-view__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid var(--mobg-c-navy); background: #fff; color: var(--mobg-c-navy); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.bgml-view__btn:hover { background: var(--mobg-c-navy-100, #E6E9F2); }
.bgml-view__btn[aria-pressed="true"] { background: var(--mobg-c-navy); color: #fff; }
.bgml-view__btn:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }
@media (max-width: 800px) { .bgml-view { display: none; } .bgml-fbar__tools { margin-left: 0; width: 100%; } }
/* Phones: Rating, Difficulty and Categories stay side by side in ONE row; an open list spans the whole row */
@media (max-width: 800px) {
	.bgml-fbar__main { position: relative; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
	.bgml-dd, .bgml-dd details { position: static; }
	.bgml-dd summary { min-height: 52px; padding: .4rem 1.55rem .45rem .55rem; gap: .1rem; box-shadow: 2px 2px 0 var(--mobg-c-navy-100, #E6E9F2); }
	.bgml-dd summary::after { right: .6rem; width: .45rem; height: .45rem; }
	.bgml-dd__label { font-size: .6rem; letter-spacing: .05em; }
	.bgml-dd__face { font-size: .8rem; }
	.bgml-dd summary:hover { transform: none; box-shadow: 2px 2px 0 var(--mobg-c-navy-100, #E6E9F2); }
	.bgml-dd__list { left: 0; right: 0; top: calc(100% + 6px); max-height: 60vh; }
}

/* Side panel (advanced filters) */
.bgml-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(480px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; background: var(--mobg-c-paper, #FFFDF8); color: var(--mobg-c-ink); box-shadow: -8px 0 0 var(--mobg-c-navy); overflow: hidden; }
.bgml-drawer[open] { display: block; animation: bgml-slide .22s ease-out; }
.bgml-drawer::backdrop { background: rgba(3, 20, 65, .6); }
@keyframes bgml-slide { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .bgml-drawer[open] { animation: none; } .bgml-dd summary, .bgml-dd summary::after { transition: none; } }
.bgml-drawer__panel { display: flex; flex-direction: column; height: 100%; }
.bgml-drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; background: var(--mobg-c-navy); color: #fff; }
.bgml-drawer__head h2 { margin: 0; font-family: var(--mobg-f-head); font-weight: 400; font-size: 1.4rem; line-height: 1.15; color: #fff; }
.bgml-drawer__close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; color: #fff; border: 2px solid #fff; cursor: pointer; }
.bgml-drawer__close:hover { background: #fff; color: var(--mobg-c-navy); }
.bgml-drawer__close:focus-visible { outline: 3px solid var(--mobg-c-seal, #D9A51E); outline-offset: 2px; }
.bgml-drawer__body { flex: 1; overflow-y: auto; padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 1.25rem; }
.bgml-drawer__foot { display: flex; flex-wrap: wrap; gap: .75rem; padding: 1rem 1.4rem; border-top: 2px solid var(--mobg-c-navy); background: #fff; }
.bgml-drawer__foot .mobg-btn { flex: 1 1 140px; justify-content: center; text-align: center; }
html:has(.bgml-drawer[open]) { overflow: hidden; }
.bgml-search__row { display: flex; gap: .5rem; margin-top: .4rem; }
.bgml-search input { flex: 1; min-width: 0; min-height: 46px; padding: .6rem .9rem; font: inherit; font-weight: 600; color: var(--mobg-c-ink); background: #fff; border: 2px solid var(--mobg-c-navy); }
.bgml-search input:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }
.bgml-chips, .bgml-chips__legend { margin: 0; padding: 0; border: 0; min-width: 0; }
.bgml-chips legend, .bgml-chips__legend { display: block; padding: 0; margin-bottom: .5rem; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mobg-c-navy); }
.bgml-chips ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.bgml-chip { display: inline-block; padding: .4rem .75rem; font-size: .9rem; font-weight: 700; color: var(--mobg-c-navy); background: #fff; border: 2px solid var(--mobg-c-navy); text-decoration: none; transition: background-color .12s ease, color .12s ease; }
.bgml-chip:hover { background: var(--mobg-c-thistle-50, #F2ECF9); }
.bgml-chip:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }
.bgml-chip.is-active { background: var(--mobg-c-navy); color: #fff; }

/* Results */
.bgml-results { transition: opacity .15s ease; }
.bgml-results.is-loading { opacity: .45; pointer-events: none; }
.bgml-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bgml-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bgml-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .bgml-grid, .bgml-grid[data-cols="3"], .bgml-grid[data-cols="4"], .bgml-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .bgml-grid, .bgml-grid[data-cols] { grid-template-columns: minmax(0, 1fr); } }
.bgml-more-wrap { margin: 2rem 0 0; text-align: center; }
.bgml-more.is-busy { opacity: .6; pointer-events: none; }

/* Game card (compact) */
.bgml-gc { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--mobg-c-navy); min-width: 0; }
.bgml-gc__cover { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--mobg-c-thistle-50, #F2ECF9); }
.bgml-gc__img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; }
.bgml-gc__img--empty { background: var(--mobg-c-thistle-50, #F2ECF9); }
.bgml-gc__body { display: flex; flex-direction: column; gap: .5rem; padding: .7rem .85rem .85rem; flex: 1; }
.bgml-gc__cats { margin: 0; font-size: .72rem; line-height: 1.3; font-weight: 700; color: var(--mobg-c-muted); }
.bgml-gc__cats a { color: var(--mobg-c-thistle, #6B3FA0); text-decoration: underline; text-underline-offset: 2px; }
.bgml-gc__cats a:hover { color: var(--mobg-c-cone); }
.bgml-gc__title { margin: 0; font-family: var(--mobg-f-head); font-weight: 400; font-size: 1.45rem; line-height: 1.12; }
.bgml-gc__title a { color: var(--mobg-c-navy); text-decoration: none; }
.bgml-gc__title a:hover { text-decoration: underline; }
.bgml-gc__rating { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; }
.bgml-gc__score { margin: 0; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--tone, var(--mobg-c-muted)); }
.bgml-gc__badge { display: inline-block; padding: .1rem .45rem; border: 1px solid currentColor; background: var(--tone-bg, #fff); font-size: .85rem; white-space: nowrap; }
.bgml-gc__verdict { font-size: .8rem; }
.bgml-gc__based { margin: 0; font-size: .8rem; font-weight: 700; }
.bgml-gc__based a { color: var(--mobg-c-navy); text-decoration: underline; text-underline-offset: 2px; }
.bgml-gc__based a:hover { color: var(--mobg-c-cone); }
.bgml-gc__bgg { margin-left: auto; display: inline-flex; }
.bgml-gc__bgg img { display: block; height: 22px; width: auto; }
.bgml-gc__line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; font-size: .88rem; font-weight: 700; }
.bgml-gc__tone { color: var(--tone, var(--mobg-c-muted)); gap: .4rem; }
.bgml-gc__key { font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mobg-c-muted); margin-right: .15rem; }
.bgml-gc__brain { flex: none; }
.bgml-gc__brain--img { width: 24px; height: 24px; object-fit: contain; display: inline-block; }
.bgml-gc__item { display: inline-flex; align-items: center; gap: .35rem; }
.bgml-tone--green { --tone: #14663a; --tone-bg: #E6F3EE; }
.bgml-tone--orange { --tone: #9a4a00; --tone-bg: #FFF1E0; }
.bgml-tone--red { --tone: #b3261e; --tone-bg: #FCE9E7; }
.bgml-tone--dark { --tone: #7a1226; --tone-bg: #F7E4E8; }
.bgml-tone--grey { --tone: #4f5666; --tone-bg: #EEF0F3; }
.bgml-gc__tip { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: .15rem; padding: 0; font: inherit; font-size: 1.1rem; font-weight: 800; line-height: 1; color: var(--mobg-c-cone); background: #fff; border: 1px solid var(--mobg-c-cone); cursor: pointer; }
.bgml-gc__tip:hover, .bgml-gc__tip[aria-expanded="true"] { background: var(--mobg-c-cone); color: #fff; }
.bgml-gc__tip:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }
.bgml-gc__decision { margin: .1rem 0; padding: .55rem .75rem .6rem 1.9rem; position: relative; background: #E8F0FB; color: var(--mobg-c-navy); border: 0; border-left: 4px solid var(--mobg-c-loch, #1D5FB4); }
.bgml-gc__decision::before { content: "\201C"; position: absolute; left: .5rem; top: .05rem; font-family: var(--mobg-f-head); font-size: 2.2rem; line-height: 1; color: var(--mobg-c-loch, #1D5FB4); }
.bgml-gc__decision-title { margin: 0 0 .15rem; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mobg-c-loch, #1D5FB4); }
.bgml-gc__decision-text { margin: 0; font-size: .88rem; font-weight: 500; font-style: italic; line-height: 1.4; color: var(--mobg-c-ink, #141B33); }
.bgml-gc__author { display: flex; align-items: center; gap: .6rem; padding-top: .55rem; border-top: 1px solid var(--mobg-c-line, #D8D3C4); }
.bgml-gc__author p { margin: 0; font-size: .8rem; line-height: 1.35; flex: 1; }
.bgml-gc__author a { color: var(--mobg-c-navy); }
.bgml-gc__avatar { width: 36px; height: 36px; object-fit: cover; flex: none; }
.bgml-gc__social { display: flex; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.bgml-gc__social a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--mobg-c-navy); color: var(--mobg-c-navy); background: #fff; }
.bgml-gc__social a:hover { background: var(--mobg-c-navy); color: #fff; }
.bgml-gc__btn { margin-top: auto; justify-content: center; text-align: center; padding-block: .6rem; font-size: .9rem; }

/* Playing-time popup (one shared element, never clipped by a card) */
.bgml-pop { position: fixed; z-index: 100000; max-width: min(300px, calc(100vw - 24px)); padding: .8rem 1rem; background: var(--mobg-c-navy); color: #fff; font-size: .9rem; font-weight: 500; line-height: 1.45; border: 2px solid #fff; box-shadow: 5px 5px 0 rgba(3, 20, 65, .35); }
.bgml-pop[hidden] { display: none; }

.bgml-empty { padding: 3rem 1rem; text-align: center; border: 1px dashed var(--mobg-c-navy); }
@media (max-width: 900px) {
	.bgml-hero__grid { grid-template-columns: minmax(0, 1fr); }
	.bgml-hero__logo { order: -1; justify-content: flex-start; }
	.bgml-hero__logo img { max-width: 360px; }
}

/* Our Philosophy (own copy so it never depends on the theme's stylesheet handle) */
.mobg-philosophy { background: #F7F3EA; border-block: 1px solid #D8D3C4; padding: clamp(1.75rem, 4vw, 3rem) max(1.25rem, calc((100% - 1320px) / 2)); text-align: left; }
.mobg-philosophy > * { margin-left: 0; margin-right: 0; max-width: none; }
.mobg-philosophy .mobg-philosophy__title { margin: 0 0 .5rem; font-family: var(--mobg-f-head, 'Tagesschrift', serif); font-weight: 400; font-size: clamp(2rem, 1.55rem + 1.55vw, 2.75rem); line-height: 1.12; color: #031441; }
.mobg-philosophy .mobg-philosophy__slogan { margin: 0 0 1rem; font-family: var(--mobg-f-head, 'Tagesschrift', serif); font-weight: 400; font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); line-height: 1.2; color: #B5410B; }
.mobg-philosophy .mobg-philosophy__text { max-width: 66ch; margin: 0 0 1em; font-size: 1.05rem; line-height: 1.75; color: #141B33; }
.mobg-philosophy .mobg-philosophy__text strong { font-weight: 800; color: #031441; }
.mobg-philosophy .mobg-philosophy__sign { margin: 1.25rem 0 0; font-size: 1.1rem; color: #031441; }

/* Philosophy: text on the left, the Ministry logo on the right */
.mobg-philosophy .mobg-philosophy__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 2rem 3rem; align-items: center; max-width: none; }
.mobg-philosophy .mobg-philosophy__body { min-width: 0; }
.mobg-philosophy .mobg-philosophy__logo { margin: 0; display: flex; justify-content: flex-end; }
.mobg-philosophy .mobg-philosophy__logo img { display: block; width: 100%; max-width: 560px; height: auto; background: transparent; }
@media (max-width: 860px) { .mobg-philosophy .mobg-philosophy__grid { grid-template-columns: minmax(0, 1fr); } .mobg-philosophy .mobg-philosophy__logo { justify-content: flex-start; } .mobg-philosophy .mobg-philosophy__logo img { max-width: 380px; } }
