@layer components {
	/* ---- Icons and the record ---- */
	.b24r-icon {
		flex: none;
		fill: none; stroke: currentColor; stroke-width: 2;
		stroke-linecap: round; stroke-linejoin: round;
	}
	.b24-record { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 1; }

	/* ---- Buttons ---- */
	.b24-btn {
		display: inline-flex; align-items: center; justify-content: center; gap: 8px;
		min-block-size: 48px; padding-inline: 20px;
		border-radius: var(--b24-r-pill);
		font: 700 16px var(--b24-font-sans); text-decoration: none; text-align: center;
		transition: background-color .2s, border-color .2s, scale .15s;
	}
	.b24-btn:active { scale: .96; }
	.b24-btn--accent { background: var(--b24-accent); color: var(--b24-on-accent); }
	.b24-btn--accent:hover { background: var(--b24-accent-hover); }
	.b24-btn--outline { border: 1px solid var(--b24-ctl); color: var(--b24-ink); }
	.b24-btn--outline:hover { border-color: var(--b24-ink); }
	.b24-btn--dark { background: #141416; color: #ffda53; font-weight: 800; }
	.b24-btn--dark:hover { background: #2b2b31; }
	.b24-btn--dark .b24r-icon { transition: translate .2s; }
	.b24-btn--dark:is(:hover, :focus-visible) .b24r-icon { translate: 4px 0; }
	.b24-btn[disabled], .b24-btn.is-busy { opacity: .6; pointer-events: none; }

	.b24-iconbtn {
		display: grid; place-items: center; inline-size: 48px; block-size: 48px;
		border-radius: var(--b24-r-control); color: var(--b24-ink);
	}
	.b24-iconbtn:hover { background: var(--b24-s1); }

	/* Header-style pill with a count. */
	.b24-pill {
		position: relative;
		display: inline-flex; align-items: center; gap: 8px;
		block-size: 48px; padding-inline: 16px;
		border: 1px solid var(--b24-ctl); border-radius: var(--b24-r-pill);
		color: var(--b24-ink); font: 600 15px var(--b24-font-sans); text-decoration: none;
	}
	.b24-pill:hover { border-color: var(--b24-ink); }

	.b24-count {
		display: inline-grid; place-items: center;
		min-inline-size: 22px; block-size: 22px; padding-inline: 5px;
		border-radius: var(--b24-r-pill);
		background: var(--b24-accent); color: var(--b24-on-accent);
		font-size: 13px; font-weight: 700; line-height: 1;
	}

	/* Bookmark (wantlist) round button. */
	.b24-bm {
		display: grid; place-items: center; flex: none;
		inline-size: 44px; block-size: 44px;
		border: 1px solid var(--b24-ctl); border-radius: var(--b24-r-pill);
		color: var(--b24-ink);
	}
	.b24-bm:hover { border-color: var(--b24-accent-ink); color: var(--b24-accent-ink); }
	.b24-bm[aria-pressed="true"] { background: var(--b24-ink); color: var(--b24-on-ink); border-color: var(--b24-ink); }

	/* ---- Tabs, chips, filters ---- */
	.b24-seg { display: flex; gap: 4px; padding: 4px; background: var(--b24-s1); border: 1px solid var(--b24-line); border-radius: var(--b24-r-pill); }
	.b24-seg__btn {
		min-block-size: 44px; padding-inline: 18px; border-radius: var(--b24-r-pill);
		color: var(--b24-mut); font: 600 15px var(--b24-font-sans);
	}
	.b24-seg__btn:hover { color: var(--b24-ink); }
	.b24-seg__btn[aria-selected="true"], .b24-seg__btn[aria-pressed="true"], .b24-seg__btn.is-on { background: var(--b24-ink); color: var(--b24-on-ink); }

	.b24-chip {
		display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 18px;
		border: 1px solid var(--b24-line); border-radius: var(--b24-r-pill);
		background: var(--b24-s1); color: var(--b24-ink);
		font: 600 15px var(--b24-font-sans); text-decoration: none; white-space: nowrap;
	}
	.b24-chip:hover { border-color: var(--b24-ctl); }
	.b24-chip.is-on, .b24-chip[aria-current="true"] { background: var(--b24-ink); color: var(--b24-on-ink); border-color: var(--b24-ink); }

	.b24-tags { display: flex; flex-wrap: wrap; gap: 8px; }
	.b24-tag {
		display: inline-flex; align-items: center; gap: 6px; min-block-size: 36px; padding-inline: 14px 8px;
		border: 1px solid var(--b24-line); border-radius: var(--b24-r-pill);
		background: var(--b24-s2); font: 600 14px var(--b24-font-sans); text-decoration: none;
	}
	.b24-tag:hover { border-color: var(--b24-ctl); }
	.b24-linkbtn { display: inline-flex; align-items: center; color: var(--b24-accent-ink); font: 600 14px var(--b24-font-sans); text-decoration: underline; text-underline-offset: 3px; padding: 0 8px; min-block-size: 36px; }

	/* Checkbox / radio rows of the filter. */
	/* Mood tiles (block b24r/mood-links): on the home page and under every mood page. */
	.b24-moods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
	.b24-mood {
		position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-block-size: 200px; padding: 24px;
		border: 1px solid var(--b24-line); border-radius: var(--b24-r-tile); background: var(--b24-s1); transition: translate .2s, border-color .2s;
	}
	.b24-mood:hover { translate: 0 -4px; border-color: var(--b24-ctl); }
	.b24-mood h3 { margin: 0; font: italic 400 40px/1 var(--b24-font-serif); letter-spacing: 0; }
	.b24-mood a { color: inherit; text-decoration: none; }
	.b24-mood a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
	.b24-mood p { margin: 0; font-size: 15px; color: var(--b24-mut); }
	@media (max-width: 900px) { .b24-moods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
	@media (max-width: 720px) { .b24-moods { grid-template-columns: minmax(0, 1fr); gap: 10px; } .b24-mood { min-block-size: 130px; } .b24-mood h3 { font-size: 34px; } }
	@media (prefers-reduced-motion: reduce) { .b24-mood { transition: none; } .b24-mood:hover { translate: none; } }

	/* A long filter list folds away behind "show all" (details, works without JS). */
	.b24-fmore { display: flex; flex-direction: column; }
	.b24-fmore[open] { gap: 0; }
	.b24-fmore > summary {
		display: inline-flex; align-items: center; gap: 6px; min-block-size: 40px; padding-inline: 10px;
		list-style: none; cursor: pointer; font: 600 14px var(--b24-font-sans); color: var(--b24-accent-ink);
	}
	.b24-fmore > summary::-webkit-details-marker { display: none; }
	.b24-fmore > summary::after { content: ""; inline-size: 7px; block-size: 7px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; transition: rotate .2s; }
	.b24-fmore[open] > summary::after { rotate: -135deg; translate: 0 2px; }
	.b24-fmore__close, .b24-fmore[open] .b24-fmore__open { display: none; }
	.b24-fmore[open] .b24-fmore__close { display: inline; }
	.b24-fmore > summary:hover { text-decoration: underline; text-underline-offset: 3px; }

	.b24-check {
		display: flex; align-items: center; gap: 12px; inline-size: 100%; min-block-size: 44px;
		padding-inline: 10px; border-radius: 10px;
		color: var(--b24-ink); font-weight: 500; text-decoration: none; cursor: pointer;
	}
	.b24-check:hover { background: var(--b24-s1); }
	.b24-check__box {
		display: grid; place-items: center; flex: none; inline-size: 22px; block-size: 22px;
		border: 1.5px solid var(--b24-ctl); border-radius: 6px; color: var(--b24-on-accent);
	}
	.b24-check__box .b24r-icon { opacity: 0; }
	.b24-check.is-on .b24-check__box { background: var(--b24-accent); border-color: var(--b24-accent); }
	.b24-check.is-on .b24-check__box .b24r-icon { opacity: 1; }
	/* On a light page the yellow box has little contrast against white: add an edge. */
	:root[data-theme="light"] .b24-check.is-on .b24-check__box { border-color: var(--b24-ink); }
	.b24-check--radio .b24-check__box { border-radius: 50%; }
	.b24-check--radio.is-on .b24-check__box { background: transparent; border-color: var(--b24-accent-ink); }
	.b24-check--radio.is-on .b24-check__box::after { content: ""; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--b24-accent-ink); }
	.b24-check__n { margin-inline-start: auto; font: 500 14px var(--b24-font-mono); color: var(--b24-mut); }

	/* ---- Price ---- */
	.b24-price { font-weight: 700; white-space: nowrap; }
	.b24-tax { font-size: 12px; line-height: 1.3; color: var(--b24-mut); white-space: nowrap; }
	.b24-tax a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
	.b24-tax a:hover { color: var(--b24-ink); }
	.b24-pricebox { display: flex; flex-direction: column; align-items: flex-end; text-align: end; gap: 2px; flex: none; }

	/* ---- Cover and card ---- */
	.b24-cover { inline-size: 100%; block-size: 100%; object-fit: cover; }
	/* No picture (yet, or it failed to load): a plain sleeve with a centre hole that shows the record's label, the note printed at its foot. */
	.b24-cover--none, .b24-stage__cover--none {
		position: relative; display: grid; place-items: end center; container-type: inline-size; aspect-ratio: 1; padding: 7%;
		border: 1px solid var(--b24-line); background: linear-gradient(150deg, var(--b24-s1), var(--b24-s2));
	}
	:is(.b24-cover--none, .b24-stage__cover--none)::before {
		content: ""; position: absolute; inset: 0; margin: auto; inline-size: 44%; aspect-ratio: 1; border-radius: 50%;
		background:
			radial-gradient(circle closest-side, #17171a 0 4%, var(--b24-accent) 4.5% 40%, transparent 40.5%),
			repeating-radial-gradient(circle closest-side, #101012 0 3px, #1e1e22 3px 4px);
		box-shadow: inset 0 3px 10px rgb(0 0 0 / .65), 0 0 0 1px var(--b24-line);
	}
	.b24-cover__note { color: var(--b24-mut); font: 500 clamp(10px, 6.5cqi, 13px) var(--b24-font-mono); letter-spacing: .12em; text-transform: uppercase; text-align: center; white-space: nowrap; }
	/* A small tile (a rail, a row in the cart) has no room for the note; the query measures the sleeve inside its padding. */
	@container (max-width: 140px) { .b24-cover__note { display: none; } }

	.b24-card { position: relative; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start; min-inline-size: 0; }
	.b24-card__cover {
		position: relative; aspect-ratio: 1; overflow: hidden;
		border-radius: var(--b24-r-card); background: var(--b24-s1);
		transition: translate .25s, box-shadow .25s;
	}
	.b24-card__link { position: absolute; inset: 0; z-index: 1; }
	.b24-card__sold {
		position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 2;
		padding: 4px 10px; border-radius: var(--b24-r-pill);
		background: #141416; color: #f6f3ec; font: 600 13px var(--b24-font-mono); letter-spacing: .06em; text-transform: uppercase;
	}
	.b24-card.is-sold .b24-card__cover img { opacity: .6; }

	/* The note on a picture an AI made, in the corner of a hero or a head picture. Fixed colours: it lies on a photo in both themes. */
	.b24-ai-note {
		position: absolute; inset-block-end: 10px; inset-inline-end: 12px; z-index: 2;
		padding: 2px 8px; border-radius: var(--b24-r-pill);
		background: rgb(20 20 22 / .72); color: #f6f3ec;
		font: 600 11px var(--b24-font-mono); letter-spacing: .06em; line-height: 1.5; text-transform: uppercase; pointer-events: none;
	}
	/* A tile's text stands at its foot: the note moves to the top, on a genre tile to the left of the arrow. */
	.b24-tile > .b24-ai-note { inset-block: 12px auto; }
	.b24-gtile > .b24-ai-note { inset-block: 10px auto; inset-inline: 10px auto; }

	.b24-card__ov {
		position: absolute; inset: 0; z-index: 2; pointer-events: none;
		display: flex; flex-direction: column; justify-content: flex-end; padding: 14px;
		background: linear-gradient(180deg, rgb(14 14 16 / .2), rgb(14 14 16 / .92) 70%);
		opacity: 0; transition: opacity .2s;
		color: var(--b24-ink);
	}
	.b24-card__ov :is(button, a) { pointer-events: auto; }
	.b24-card__ov dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 14px; }
	.b24-card__ov dt { color: var(--b24-mut); }
	.b24-card__ov dd { font-family: var(--b24-font-mono); }
	.b24-card__act { display: flex; gap: 8px; margin-block-start: 10px; }
	.b24-card__act .b24-add { flex: 1; margin-block-start: 0; }

	.b24-add {
		min-block-size: 44px; padding-inline: 16px; border-radius: var(--b24-r-pill);
		background: var(--b24-accent); color: var(--b24-on-accent); font: 700 15px var(--b24-font-sans);
		transition: background-color .2s;
	}
	.b24-add:hover { background: var(--b24-accent-hover); }
	.b24-add.is-in-cart { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
	/*
	 * Label and price on one line. Where the price does not fit, it wraps onto a
	 * second line that the fixed height cuts off, and the button shows the label
	 * alone; the price stands under the cover anyway.
	 */
	.b24-add--price {
		display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; column-gap: .3em;
		block-size: 44px; overflow: hidden; padding-block: 0; padding-inline: 8px;
		line-height: 44px; white-space: nowrap;
	}

	@media (hover: hover) {
		.b24-card:is(:hover, :focus-within) .b24-card__cover { translate: 0 -6px; box-shadow: var(--b24-shadow-lift); }
		.b24-card:is(:hover, :focus-within) .b24-card__ov { opacity: 1; }
	}

	.b24-card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
	.b24-card__title {
		font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.3;
		display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	}
	.b24-card__title a { text-decoration: none; }
	.b24-card__by { font-size: 14px; color: var(--b24-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.b24-card__fmt { font-size: 14px; color: var(--b24-tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.b24-card__grade { font: 500 14px var(--b24-font-mono); color: var(--b24-mut); }

	/* Touch screens have no hover: the cart button sits under the cover instead. */
	.b24-card__quick { display: none; }
	@media (hover: none) {
		.b24-card__ov { display: none; }
		.b24-card__quick { display: flex; gap: 8px; align-items: center; }
		.b24-card__quick .b24-add { flex: 1; min-block-size: 40px; }
	}

	/* ---- Breadcrumb, pager ---- */
	.b24-crumbs { padding-block: 22px 6px; font-size: 14px; color: var(--b24-mut); }
	.b24-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; padding: 0; }
	.b24-crumbs li + li::before { content: "/"; margin-inline-end: 10px; }
	.b24-crumbs a { text-decoration: none; }
	.b24-crumbs a:hover { color: var(--b24-ink); text-decoration: underline; }

	.b24-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-block-start: 56px; flex-wrap: wrap; }
	.b24-pg {
		display: grid; place-items: center; min-inline-size: 44px; block-size: 44px; padding-inline: 8px;
		border: 1px solid var(--b24-line); border-radius: var(--b24-r-control);
		font-weight: 600; text-decoration: none; color: var(--b24-ink);
	}
	a.b24-pg:hover { border-color: var(--b24-ctl); }
	.b24-pg.is-current { background: var(--b24-ink); color: var(--b24-on-ink); border-color: var(--b24-ink); }
	.b24-pg--dots { border: 0; color: var(--b24-mut); }
	.b24-pg[rel="prev"] .b24r-icon { rotate: 180deg; }

	/* ---- Notices ---- */
	.b24-notices .woocommerce-message, .b24-notices .woocommerce-info, .b24-notices .woocommerce-error,
	.b24-note {
		list-style: none; margin-block: 16px; padding: 12px 14px;
		border: 1px solid color-mix(in srgb, var(--b24-accent) 55%, transparent);
		border-radius: var(--b24-r-control);
		background: color-mix(in srgb, var(--b24-accent) 14%, transparent);
		font-size: 15px;
	}
	.b24-notices a { color: var(--b24-accent-ink); font-weight: 700; }
	.b24-notices .woocommerce-error { border-color: #e5484d; background: color-mix(in srgb, #e5484d 12%, transparent); }

	.b24-notice { padding: 18px 22px; border-radius: var(--b24-r-tile); background: var(--b24-accent); color: var(--b24-on-accent); }
	.b24-notice p + p { margin-block-start: .75em; }

	/* ---- Dialog ---- */
	dialog.b24-dialog {
		inline-size: min(1100px, 100vw - 24px); max-block-size: calc(100dvh - 24px);
		padding: 0; border: 0; border-radius: var(--b24-r-panel);
		background: var(--b24-bg); color: var(--b24-ink);
		overflow: hidden;
	}
	dialog.b24-dialog::backdrop { background: rgb(8 8 10 / .78); backdrop-filter: blur(6px); }

	/* A question before an action (sign out): small card, two buttons. */
	dialog.b24-confirm {
		inline-size: min(460px, 100vw - 24px); margin: auto;
		background: var(--b24-s1); border: 1px solid var(--b24-line); box-shadow: var(--b24-shadow-pop);
	}
	dialog.b24-confirm[open] { animation: b24-confirm-in .2s ease-out; }
	@keyframes b24-confirm-in { from { opacity: 0; translate: 0 12px; } }
	.b24-confirm__body { padding: 28px; }
	.b24-confirm__kicker { margin: 0 0 8px; font: 500 13px var(--b24-font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--b24-mut); }
	.b24-confirm h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
	.b24-confirm__body > p:not(.b24-confirm__kicker) { margin: 10px 0 0; color: var(--b24-mut); line-height: 1.55; }
	.b24-confirm__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-block-start: 24px; }
	.b24-confirm__actions > * { flex: 1 1 150px; }
	.b24-confirm__actions .b24-btn:focus-visible { outline: none; box-shadow: var(--b24-ring); }

	/* ---- EU legal guarantee (Germanized): preview, a line of text, the notice in a popover ---- */
	/* The preview's link covers the whole row, so the text opens the notice too. */
	.b24-legal { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; border-radius: 8px; }
	.b24-legal .wc-gzd-legal-guarantee, .b24-legal .wc-gzd-legal-guarantee-label { margin: 0; }
	.b24-legal .wc-gzd-popover-trigger { display: block; outline: none; }
	.b24-legal .wc-gzd-popover-trigger::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
	.b24-legal:has(.wc-gzd-popover-trigger:focus-visible) { box-shadow: var(--b24-ring); }
	.b24-legal .wc-gzd-popover-trigger img.wc-gzd-legal-guarantee-image-preview {
		display: block; inline-size: 100%; min-inline-size: 0; max-inline-size: none; block-size: auto;
		border: 1px solid var(--b24-line); border-radius: 4px; cursor: pointer;
	}
	.b24-legal:hover img.wc-gzd-legal-guarantee-image-preview { border-color: var(--b24-ctl); }
	.b24-legal__t { margin: 0; }
	.b24-legal__more { color: var(--b24-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
	.b24-legal:hover .b24-legal__more { color: var(--b24-accent-ink); }

	/* The notice itself: a card like the confirm dialog. Browsers with anchor
	   positioning centre a popover by its default `inset: 0; margin: auto`, and
	   Germanized relies on that; the reset's `margin: 0` put it top left. */
	.wc-gzd-popover:not(.wc-gzd-popover-hover) {
		margin: auto; inline-size: min(560px, 100vw - 24px); max-inline-size: none; max-block-size: calc(100dvh - 24px); overflow: auto;
		padding: 12px 16px 16px;
		background: var(--b24-s1); color: var(--b24-ink);
		border: 1px solid var(--b24-line); border-radius: var(--b24-r-panel); box-shadow: var(--b24-shadow-pop);
	}
	.wc-gzd-popover-wrapper .wc-gzd-popover:not(.wc-gzd-popover-hover)::backdrop { background: rgb(8 8 10 / .78); opacity: 1; backdrop-filter: blur(6px); }
	.wc-gzd-popover .wc-gzd-popover-header { margin-block-end: 4px; }
	.wc-gzd-popover .wc-gzd-popover-close { display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 10px; color: var(--b24-mut); }
	.wc-gzd-popover .wc-gzd-popover-close:hover { background: var(--b24-hov); color: var(--b24-ink); }
	.wc-gzd-popover .wc-gzd-popover-close:focus-visible { outline: none; box-shadow: var(--b24-ring); }
	.wc-gzd-popover .wc-gzd-popover-close svg { fill: currentColor; }
	.wc-gzd-popover .wc-gzd-popover-content img { display: block; min-block-size: 0; border-radius: 8px; }
	.wc-gzd-popover p.wc-gzd-popover-caption { margin-block-start: 12px; font-size: 15px; }
	.wc-gzd-popover p.wc-gzd-popover-caption a { color: var(--b24-accent-ink); font-weight: 600; text-underline-offset: 3px; }

	/* ---- Motion preferences ---- */
	@media (prefers-reduced-motion: reduce) {
		*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	}
}
