body {
	background: var(--color-bg);
	min-height: 100dvh;
	margin: 0;
	border-bottom: 0;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
}

/* ── Utility: center flex items ──────────────────────── */
.u-center,
.u-center-col,
.u-center-inline {
	align-items: center;
	justify-content: center;
}
.u-center      { display: flex; }
.u-center-col  { display: flex; flex-direction: column; }
.u-center-inline { display: inline-flex; }

.pub-page {
	flex: 1;
	box-sizing: border-box;
	width: 100%;
	max-width: clamp(var(--block-max), 40vw, var(--block-max-wide));
	margin: 0 auto;
	padding: var(--space-5) var(--space-7) 10rem;
	color: var(--color-ink);
	background: var(--color-bg);
}

/* ── Section divider ─────────────────────────────── */
.pub-section-divider {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin: var(--space-section-gap) 0 var(--space-3);
}

.pub-section-line {
	flex: 1;
	height: 1px;
	background: var(--color-border);
}

.pub-section-label {
	font-family: var(--font-mono);
	font-size: var(--text-xs);
	letter-spacing: 0.18em;
	color: var(--color-dim);
	white-space: nowrap;
}

/* ── Profile ─────────────────────────────────────── */
.pub-profile {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--space-2);
	margin-top: var(--space-5);
	margin-bottom: var(--space-6);
}

.pub-avatar {
	width: 84px;
	height: 84px;
	border-radius: var(--radius-full);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-family: var(--font-ui);
	font-size: var(--text-lg);
	font-weight: 600;
}

.pub-avatar-placeholder {
	width: 84px;
	height: 84px;
	border-radius: var(--radius-full);
	background: var(--color-surface-raised);
	border: 1px solid var(--color-border);
}

.pub-name {
	font-family: var(--font-ui);
	font-size: var(--text-xl);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0;
}

.pub-bio {
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-ink-muted);
	line-height: 1.5;
	margin: var(--space-1) 0 0;
	max-width: 280px;
}

.pub-profile-divider {
	width: 28px;
	height: 1px;
	background: var(--color-border);
	margin: var(--space-2) auto 0;
}

/* ── Contact badges ─────────────────────────────── */

.pub-contact-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
}

.pub-contact-badge {
	width: var(--icon-m);
	height: var(--icon-m);
	border-radius: var(--radius-full);
	border: none;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-ink-muted);
	font-size: 16px;
	text-decoration: none;
	transition: border-color 120ms, color 120ms;
	flex-shrink: 0;
}

.pub-contact-badge:hover {
	border-color: var(--color-ink-mid);
	color: var(--color-ink);
}

.pub-contact-default {
	border-color: var(--color-border-dim);
	border-width: 2px;
	color: var(--color-ink-muted);
}

.pub-contact-default:hover {
	border-color: var(--color-ink-mid);
	color: var(--color-ink);
}

/* ── Verified pip ────────────────────────────────── */

.pub-avatar-wrap {
	position: relative;
	display: inline-flex;
}

/* Sunken profile photo: inset shadow overlay above the image, below the
   verified badge, so the photo presses into the page and the badge floats. */
.pub-avatar-wrap::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: var(--shadow-sunken-avatar);
	pointer-events: none;
	z-index: 0;
}

.pub-verified-pip {
	color: var(--color-yellow);
	display: inline-flex;
	flex-shrink: 0;
}

.pub-verified-pip svg {
	width: 21px;
	height: 21px;
	display: block;
	filter: drop-shadow(var(--shadow-badge-pop));
}

.pub-verified-pip .pip-shield {
	fill: var(--color-yellow);
}

.pub-verified-pip .pip-check {
	stroke: var(--color-on-brand);
	stroke-width: 2.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* On avatar: absolute bottom-right, no ring — the shield is the badge */
.pub-avatar-wrap .pub-verified-pip {
	position: absolute;
	bottom: 1px;
	right: 1px;
	z-index: 1;
}

/* Next to name (no avatar): superscript-like, top-aligned */
.pub-name-row {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 5px;
}

.pub-name-row .pub-verified-pip {
	width: 16px;
	height: 16px;
	font-size: 9px;
	margin-top: 5px; /* aligns with cap-height of the name text */
}

.pub-socials {
	display: flex;
	gap: var(--space-1);
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 0;
}

.pub-profile-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-1);
	flex-wrap: nowrap;
	margin-top: var(--space-3);
}

.pub-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-ink-muted);
	font-size: var(--text-2xl);
	text-decoration: none;
	opacity: 0.5;
	padding: var(--space-2) var(--space-1);
	transition: opacity 160ms ease, transform 160ms ease;
}

.pub-social-icon:hover {
	opacity: 1;
	transform: translateY(-2px);
}

.pub-view-panel[hidden] {
	display: none;
}

/* ── CTA button ──────────────────────────────────── */
.pub-cta {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	margin-top: var(--space-2);
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-full);
	background: var(--color-on-brand);
	color: var(--color-on-dark);
	font-family: var(--font-ui);
	font-size: var(--text-sm);
	font-weight: 600;
	text-decoration: none;
}

.pub-cta-tutorial {
	border: none;
	cursor: pointer;
	font-family: inherit;
}

.pub-cta-checkout {
	border: none;
	cursor: pointer;
	font-family: inherit;
}

@media (hover: hover) and (pointer: fine) {
	.pub-cta:hover {
		background: var(--color-yellow);
		color: var(--color-on-brand);
	}
}

.pub-cta:focus-visible {
	background: var(--color-yellow);
	color: var(--color-on-brand);
	outline: 2px solid var(--color-yellow);
	outline-offset: 2px;
}

/* Disabled / sold-out — a distinct muted state, NOT an opacity dim of
   the ink default. Opacity would also mute any focus ring and leave the
   button reading as a faint dark blob hard to tell from an enabled Buy.
   Instead: muted surface + mid-color text, no hover/active inversion.
   See docs/linkee-buy-button-component-spec.md §8. */
.pub-cta-checkout:disabled,
.pub-cta-checkout:disabled:hover,
.pub-cta-checkout:disabled:focus-visible {
	background: var(--color-surface-alt);
	color: var(--color-mid);
	cursor: default;
	pointer-events: none;
}

.pub-cta + .pub-cta { margin-left: var(--space-2); }

button.pub-poster-cta {
	background: none;
	border: none;
	cursor: pointer;
}

.pub-poster-cta.pub-cta-tutorial {
	background: var(--color-ink);
	color: var(--color-bg);
	padding: 8px 18px;
	border-radius: var(--radius-full);
	font-size: var(--text-sm);
	font-weight: 600;
	letter-spacing: .01em;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
	transition: opacity 150ms;
	margin-top: var(--space-3);
}
.pub-poster-cta.pub-cta-tutorial:hover { opacity: .82; }

/* ── Card wrapper — owns visual shell ───────────────
   Expandable blocks (link/event/goods) live inside
   .pub-card which owns radius, shadow, and spacing.
   ─────────────────────────────────────────────────── */
.pub-card {
   border-radius: var(--radius-xl);
   background: var(--color-surface);
   overflow: hidden;
   border: 1px solid var(--color-border);
   box-shadow: var(--shadow-card, 0 1px 2px rgba(0,0,0,0.06));
   margin-bottom: var(--space-card-gap);
   transition: box-shadow 320ms cubic-bezier(.2, .8, .2, 1),
			   border-color 320ms cubic-bezier(.2, .8, .2, 1);
}

/* <details> reset — browser adds summary marker and list-item display */
details.pub-card { list-style: none; }
details.pub-card > summary { list-style: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
details.pub-card > summary::-webkit-details-marker { display: none; }

.pub-card:hover,
details.pub-card:hover {
   box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

details.pub-card[open] {
   box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ── Row — header region inside card ────────────────
   .pub-card owns the shell; .pub-row is just a region.
   Standalone rows (link no-meta, goods no-meta)
   carry their own shell via :not(.pub-card .pub-row).
   ─────────────────────────────────────────────────── */
/* Standalone rows get card shell by default */
.pub-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-2);
	overflow: hidden;
	border-radius: var(--radius-xl);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	box-shadow: var(--shadow-card, 0 1px 2px rgba(0,0,0,0.06));
	margin-bottom: var(--space-card-gap);
}

.pub-row:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	transform: translateY(-1px);
	transition: transform 160ms ease, box-shadow 160ms ease;
}

/* Summary rows inside pub-card: card shell lives on <details>, not summary */
details.pub-card > summary.pub-row {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin-bottom: 0;
	transform: none;
	transition: none;
	padding: 12px 40px 12px 12px;
	gap: var(--space-3);
	position: relative;
}

.pub-row-main {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	flex: 1;
	min-width: 0;
	padding: var(--space-3) 44px var(--space-3) var(--space-3);
	text-decoration: none;
	color: var(--color-ink);
}

.pub-row-main:hover {
	background: var(--color-surface-raised);
}


.pub-row-title {
	font-size: var(--text-md);
	font-weight: 600;
	line-height: 1.2;
	color: var(--color-ink);
}

.pub-row-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.pub-row-rich .pub-row-title,
details.pub-card > summary .pub-row-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}
.pub-row-desc-short {
	display: block;
	min-width: 0;
	font-family: var(--font-ui);
	font-size: var(--text-sm);
	font-weight: 400;
	color: var(--color-ink-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

.pub-row-icon {
	width: 52px;
	height: 52px;
	border-radius: var(--radius-sm);
	flex-shrink: 0;
	object-fit: cover;
}

.pub-row-icon-ti {
	font-size: var(--text-lg);
	color: var(--color-ink-muted);
	flex-shrink: 0;
	width: var(--icon-s);
	text-align: center;
}

.pub-row-thumb {
	width: var(--icon-l);
	height: var(--icon-l);
	border-radius: var(--radius-md);
	object-fit: cover;
	flex-shrink: 0;
}

.pub-row-chevron {
	font-size: var(--text-md);
	color: var(--color-ink-muted);
	flex-shrink: 0;
	position: absolute;
	right: var(--space-3);
	top: 50%;
	will-change: transform;
	transform: translateY(-50%) rotate(0deg);
	transform-origin: center;
	transition: transform 200ms ease-out;
}

details[open] > summary .pub-row-chevron,
details[open] > .pub-goods-summary .pub-row-chevron {
	transform: translateY(-50%) rotate(180deg);
}

.pub-row-action-icon {
	font-size: var(--text-md);
	color: var(--color-ink-muted);
	flex-shrink: 0;
}

details.pub-card > summary:focus-visible {
	outline: 2px solid var(--color-ink);
	outline-offset: -2px;
	border-radius: var(--radius-xl);
}

/* Meta panel — UA <details> controls show/hide; @starting-style animates entry */
details[open] > .pub-row-meta {
	display: grid;
	grid-template-rows: 1fr;
	opacity: 1;
	border-top: 1px solid var(--color-border);
	transition:
		grid-template-rows 320ms cubic-bezier(.2, .8, .2, 1),
		opacity 200ms ease;
}

@starting-style {
	details[open] > .pub-row-meta {
		grid-template-rows: 0fr;
		opacity: 0;
	}
}

.pub-row-meta-inner {
	overflow: hidden;
}

/* Text body — owns padding only */
.pub-row-meta-body {
	padding: var(--space-3) var(--space-4) var(--space-4);
}

.pub-row-meta p {
	font-family: var(--font-ui);
	font-size: var(--text-md);
	color: var(--color-ink);
	line-height: 1.55;
	margin: 0;
}

/* ── Meta shared content ─────────────────────────── */
.pub-meta-desc {
	font-family: var(--font-ui);
	font-size: var(--text-md);
	color: var(--color-ink);
	line-height: 1.55;
	margin: 0;
	white-space: pre-wrap;
}

.pub-meta-image-wrap {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--color-surface-raised);
}

.pub-meta-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Posts ───────────────────────────────────────── */
.pub-row.pub-post {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--space-3);
	padding: var(--space-5);
	min-height: var(--control-compact-h);
	background: var(--color-surface);
	color: var(--color-ink);
	border: 1px solid var(--color-border-dim);
	box-shadow: var(--shadow-card-soft);
	cursor: default;
}
.pub-row.pub-post-sticky {
	background: var(--color-sage);
	color: var(--color-header-text);
	border-color: var(--color-sage-border);
	box-shadow: var(--shadow-sunken-post);
	margin-bottom: var(--space-5);
}

.pub-post-plain,
.pub-post-update {
	cursor: default;
}
.pub-post-quote {
	cursor: pointer;
}
.pub-post-milestone {
	cursor: default;
}

.pub-post-body-wrap {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	min-width: 0;
}
.pub-post-title {
	margin: 0;
	font-family: var(--font-title);
	font-size: var(--text-md);
	font-weight: 700;
	line-height: 1.25;
}
.pub-post-body {
	margin: 0;
	font-family: var(--font-ui);
	font-size: var(--text-base);
	line-height: 1.6;
	white-space: pre-wrap;
}
.pub-row.pub-post:not(.pub-post-sticky) .pub-post-title {
	color: var(--color-ink);
}
.pub-row.pub-post:not(.pub-post-sticky) .pub-post-body {
	color: var(--color-ink);
}
.pub-row.pub-post-sticky .pub-post-title {
	color: var(--color-header-text);
}
.pub-row.pub-post-sticky .pub-post-body {
	color: var(--color-header-text);
}
.pub-row.pub-post:not(.pub-post-sticky) .pub-post-check-label {
	color: var(--color-ink);
}
.pub-row.pub-post-sticky .pub-post-check-label {
	color: var(--color-header-text);
}

.pub-post-body.is-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}
.pub-post.is-expanded .pub-post-body.is-clamped {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}
.pub-post-more {
	align-self: flex-start;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: var(--font-ui);
	font-size: var(--text-sm);
	font-weight: 700;
	cursor: pointer;
	min-height: var(--control-compact-h);
}

.pub-post-quote-mark {
	font-family: var(--font-serif);
	font-size: var(--text-2xl);
	line-height: 1;
	color: var(--color-ink-mid);
	user-select: none;
}
.pub-post-sticky .pub-post-quote-mark {
	color: inherit;
	opacity: 0.7;
}
.pub-post-quote .pub-post-body {
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 700;
	font-size: var(--text-xl);
	line-height: 1.15;
	letter-spacing: -0.01em;
}
.pub-post-quote:active {
	transform: scale(0.99);
}
.pub-post-copied {
	position: absolute;
	right: var(--space-3);
	bottom: var(--space-3);
	padding: var(--space-1) var(--space-2-5);
	border-radius: var(--radius-full);
	background: var(--color-ink);
	color: var(--color-surface);
	font-family: var(--font-ui);
	font-size: var(--text-xs);
	font-weight: 700;
	opacity: 0;
	pointer-events: none;
}
.pub-post-quote.is-copied .pub-post-copied {
	opacity: 1;
}

.pub-post-eyebrow {
	margin: 0;
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--color-ink-mid);
}
.pub-post-sticky .pub-post-eyebrow {
	color: inherit;
	opacity: 0.7;
}

.pub-post-checks {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}
.pub-post-check {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-height: var(--control-compact-h);
	animation: pub-post-check-in var(--duration-fast) ease both;
}
.pub-post-check-mark {
	flex-shrink: 0;
	display: grid;
	place-items: center;
	width: var(--icon-m);
	height: var(--icon-m);
	border-radius: var(--radius-full);
	background: var(--color-yellow);
	color: var(--color-on-brand);
	font-size: var(--text-xs);
}
.pub-post-check-label {
	font-family: var(--font-ui);
	font-size: var(--text-base);
	line-height: 1.4;
}
@keyframes pub-post-check-in {
	from { opacity: 0; transform: translateY(var(--space-1)); }
	to { opacity: 1; transform: none; }
}

.pub-post-tutorial-cta {
	padding: 0;
}
.pub-post-tutorial-cta .pub-cta {
	white-space: nowrap;
	margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
	.pub-row.pub-post,
	.pub-post-quote:active,
	.pub-post-check {
		transition: none;
		animation: none;
		transform: none;
	}
}

/* ── Goods ───────────────────────────────────────── */

/* Feed: expandable product summary. The revealed body is the canonical Store
   detail renderer; store.css removes its nested card shell in this context. */
.pub-goods--expandable .pub-goods-summary--feed {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-3) calc(var(--control-compact-h) + var(--space-3)) var(--space-3) var(--space-3);
	position: relative;
}

.pub-goods--expandable {
	position: relative;
}

.pub-goods--expandable .pub-goods-thumb {
	width: calc(var(--space-9) + var(--space-2));
	height: calc(var(--space-9) + var(--space-2));
	border-radius: var(--radius-md);
	overflow: hidden;
	flex-shrink: 0;
	background: var(--color-surface-raised);
	display: grid;
	place-items: center;
}

.pub-goods--expandable .pub-goods-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pub-goods--expandable .pub-goods-thumb--fallback,
.pub-goods--expandable .pub-goods-thumb--empty {
	color: var(--color-ink-muted);
	font-size: var(--icon-m);
}

.pub-goods--expandable .pub-goods-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.pub-goods--expandable .pub-goods-heading {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
}

.pub-goods--expandable .pub-goods-heading .pub-row-title {
	flex: 1;
	min-width: 0;
	font-size: var(--text-base);
	font-weight: 700;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: normal;
}

.pub-goods--expandable .pub-goods-price {
	font-family: var(--font-mono);
	font-size: var(--text-base);
	font-weight: 700;
	color: var(--color-ink);
}

.pub-goods-summary-meta {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
}

.pub-goods-view-cta {
	height: var(--control-compact-h);
	color: var(--color-ink-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: var(--text-md);
	position: absolute;
	right: var(--space-3);
	top: 50%;
	transform: translateY(-50%);
}

.pub-goods-view-cta .ti {
	transition: transform var(--duration-fast) ease;
}

.pub-goods-reveal-label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pub-goods--expandable[open] .pub-goods-view-cta .ti {
	transform: rotate(180deg);
}

.pub-goods-reveal-label--close {
	display: none;
}

.pub-goods--expandable[open] > .pub-goods-summary--feed {
	position: absolute;
	top: var(--space-3);
	right: var(--space-3);
	z-index: 4;
	width: var(--control-compact-h);
	height: var(--control-compact-h);
	padding: 0;
	border-radius: var(--radius-full);
}

.pub-goods--expandable[open] > .pub-goods-summary--feed .pub-goods-view-cta {
	right: 0;
	width: 100%;
	justify-content: flex-end;
}

.pub-goods--expandable[open] > .pub-goods-summary--feed .pub-goods-thumb,
.pub-goods--expandable[open] > .pub-goods-summary--feed .pub-goods-body,
.pub-goods--expandable[open] .pub-goods-reveal-label--open {
	display: none;
}

.pub-goods--expandable[open] .pub-goods-reveal-label--close {
	display: block;
}

.pub-goods-expanded-store {
	transform-origin: top left;
	animation: pub-goods-expand var(--duration-fast) cubic-bezier(.2, .8, .2, 1);
}

@keyframes pub-goods-expand {
	from {
		opacity: .55;
		clip-path: inset(0 72% 72% 0 round var(--radius-md));
	}
	to {
		opacity: 1;
		clip-path: inset(0 round 0);
	}
}

@media (max-width: 480px) {
	.pub-goods--expandable .pub-goods-summary--feed {
		gap: var(--space-2);
		padding: var(--space-2);
	}

	.pub-goods--expandable .pub-goods-thumb {
		width: calc(var(--space-8) + var(--space-2));
		height: calc(var(--space-8) + var(--space-2));
	}

}

@media (prefers-reduced-motion: reduce) {
	.pub-goods-view-cta .ti { transition: none; }
	.pub-goods-expanded-store { animation: none; }
}

/* Non-commerce feed: compact list density (thumb + title + price + CTA). */
.pub-goods--compact {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-3);
	border: var(--line-thin) solid var(--color-border);
	border-radius: var(--radius-xl);
	background: var(--color-surface);
	box-shadow: var(--shadow-card-soft);
}

.pub-goods--compact .pub-goods-thumb {
	width: calc(var(--space-9) + var(--space-2));
	height: calc(var(--space-9) + var(--space-2));
	border-radius: var(--radius-md);
	overflow: hidden;
	flex-shrink: 0;
	background: var(--color-surface-raised);
	display: grid;
	place-items: center;
}

.pub-goods--compact .pub-goods-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pub-goods--compact .pub-goods-thumb--fallback,
.pub-goods--compact .pub-goods-thumb--empty {
	color: var(--color-ink-muted);
	font-size: var(--icon-m);
}

.pub-goods--compact .pub-goods-thumb--fallback[data-style="ink"],
.pub-goods--compact .pub-goods-thumb--fallback[data-style="default"] {
	background: var(--color-ink);
	color: var(--color-bg);
}
.pub-goods--compact .pub-goods-thumb--fallback[data-style="yellow"] {
	background: var(--color-yellow);
	color: var(--color-header-text);
}
.pub-goods--compact .pub-goods-thumb--fallback[data-style="sage"] {
	background: var(--color-sage);
	color: var(--color-header-text);
}
.pub-goods--compact .pub-goods-thumb--fallback[data-style="warm"] {
	background: var(--color-warm);
	color: var(--color-header-text);
}
.pub-goods--compact .pub-goods-thumb--fallback[data-style="pink"] {
	background: var(--color-pink);
	color: var(--color-on-dark);
}
.pub-goods--compact .pub-goods-thumb--fallback[data-style="orange"] {
	background: var(--color-orange);
	color: var(--color-on-dark);
}
.pub-goods--compact .pub-goods-thumb--fallback[data-style="cream"] {
	background: var(--color-bg);
	color: var(--color-ink);
}
.pub-goods--compact .pub-goods-thumb--fallback[data-style="white"] {
	background: var(--color-pure-white);
	color: var(--color-pure-black);
}
.pub-goods--compact .pub-goods-thumb--fallback[data-style="black"] {
	background: var(--color-pure-black);
	color: var(--color-pure-white);
}

.pub-goods--compact .pub-goods-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.pub-goods--compact .pub-goods-heading {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
}

.pub-goods--compact .pub-goods-heading .pub-row-title {
	flex: 1;
	min-width: 0;
	font-size: var(--text-base);
	font-weight: 700;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: normal;
}

.pub-goods--compact .pub-goods-price {
	font-family: var(--font-mono);
	font-size: var(--text-base);
	font-weight: 700;
	color: var(--color-ink);
}

.pub-goods--compact .pub-goods-actions {
	flex-shrink: 0;
	align-self: center;
}

.pub-goods--compact .pub-goods-actions .pub-cta {
	margin-top: 0;
	min-height: calc(var(--space-6) + var(--space-2));
	padding: var(--space-2) var(--space-3);
	font-size: var(--text-sm);
}

.pub-goods--compact .pub-goods-actions .pub-cta .ti-arrow-right {
	display: none;
}

/* Legacy summary/face helpers retained for idea-board / older markup. */
.pub-goods-summary {
	display: block;
	list-style: none;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
}
.pub-goods-summary::-webkit-details-marker { display: none; }

.pub-goods-thumb {
	width: var(--icon-l);
	height: var(--icon-l);
	border-radius: var(--radius-sm);
	object-fit: cover;
	flex-shrink: 0;
}

.pub-goods-face {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-3);
	position: relative;
}

details.pub-card > summary .pub-goods-face {
	padding-right: calc(var(--space-8) + var(--space-2));
}

.pub-goods-face--below-carousel {
	border-top: var(--line-thin) solid var(--color-border);
	padding-left: var(--space-4);
	padding-right: var(--space-4);
}

.pub-goods-title-row {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.pub-goods-heading {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
}
.pub-goods-heading .pub-row-title {
	flex-shrink: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pub-goods-secondary {
	font-size: var(--text-xs);
	color: var(--color-ink-muted);
	font-family: var(--font-mono);
	opacity: 0.7;
}

.pub-goods-price {
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	color: var(--color-ink-mid);
}

/* Scroll-snap carousel — native swipe, no JS */
.pub-goods-carousel-wrap {
	position: relative;
}

.pub-goods-carousel {
	display: flex;
	overflow-x: scroll;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: var(--color-surface-raised);
	cursor: grab;
}
.pub-goods-carousel:active { cursor: grabbing; }
.pub-goods-carousel::-webkit-scrollbar { display: none; }

.pub-goods-carousel img {
	flex-shrink: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	scroll-snap-align: start;
}

.pub-gallery {
	margin: var(--space-7) 0;
}

.pub-gallery-copy {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: var(--space-5);
	margin-bottom: var(--space-4);
}
.pub-gallery-copy-body {
	min-width: 0;
}
.pub-gallery-title {
	margin: 0;
	font-family: var(--font-title);
	font-size: clamp(var(--text-xl), 6vw, var(--text-2xl));
	line-height: 0.98;
	letter-spacing: -0.045em;
}
.pub-gallery-description {
	max-width: 44ch;
	margin: var(--space-3) 0 0;
	color: var(--color-ink-soft);
	font-size: var(--text-base);
	line-height: 1.5;
	white-space: normal;
}
.pub-gallery-grid-count {
	position: absolute;
	top: var(--space-3);
	left: var(--space-3);
	z-index: 2;
	padding: var(--space-1) var(--space-2);
	border: var(--line-thin) solid color-mix(in srgb, var(--color-pure-white) 72%, transparent);
	border-radius: var(--radius-full);
	background: color-mix(in srgb, var(--color-pure-black) 78%, transparent);
	color: var(--color-pure-white);
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}
.pub-gallery-count {
	align-self: start;
	min-width: 58px;
	padding: var(--space-2) var(--space-2-5);
	border: var(--line-thin) solid var(--color-sage-border);
	border-radius: var(--radius-full);
	background: var(--color-sage);
	color: var(--color-header-text);
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
}
.pub-gallery-carousel-wrap {
	width: 100%;
}
.pub-gallery-stage {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border: var(--line-thin) solid var(--color-border);
	border-radius: var(--radius-2xl);
	background: var(--color-surface-alt);
	box-shadow: var(--shadow-card);
	touch-action: pan-y;
}
.pub-gallery-stage .pub-goods-carousel {
	height: 100%;
	aspect-ratio: auto;
	background: transparent;
}
.pub-gallery-carousel img {
	object-fit: contain;
	background: transparent;
}
.pub-gallery-position {
	position: absolute;
	top: var(--space-3);
	left: var(--space-3);
	z-index: 2;
	margin: 0;
	padding: var(--space-2) var(--space-3);
	border: var(--line-thin) solid var(--color-border);
	border-radius: var(--radius-full);
	background: var(--color-surface);
	color: var(--color-ink);
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	line-height: 1.2;
	white-space: nowrap;
}
.pub-gallery-controls {
	position: absolute;
	right: var(--space-3);
	bottom: var(--space-3);
	z-index: 2;
	display: flex;
	gap: var(--space-1);
	padding: var(--space-1);
	border: var(--line-thin) solid var(--color-border);
	border-radius: var(--radius-full);
	background: var(--color-yellow);
	box-shadow: var(--shadow-card-soft);
}
.pub-gallery-controls .pub-carousel-btn {
	position: static;
	display: grid;
	width: var(--control-compact-h);
	height: var(--control-compact-h);
	padding: 0;
	place-items: center;
	transform: none;
	border: 0;
	border-radius: var(--radius-full);
	background: transparent;
	color: var(--color-header-text);
	font-size: var(--text-lg);
	mix-blend-mode: normal;
}
.pub-gallery-controls .pub-carousel-btn:hover,
.pub-gallery-controls .pub-carousel-btn:focus-visible {
	background: var(--color-header-text);
	color: var(--color-yellow);
}
.pub-gallery-controls .pub-carousel-btn:focus-visible {
	outline: 2px solid var(--color-surface);
	outline-offset: 2px;
}
.pub-gallery-footer {
	display: grid;
	grid-template-columns: 86px minmax(0, 1fr);
	align-items: start;
	gap: var(--space-4);
	padding: var(--space-4) var(--space-1) 0;
}
.pub-gallery-index {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	min-height: 22px;
	color: var(--color-ink-mid);
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	line-height: 1.2;
	white-space: nowrap;
}
.pub-gallery-index::after {
	width: 24px;
	height: var(--line-thin);
	margin-left: var(--space-1);
	background: var(--color-ink);
	content: "";
}
.pub-gallery-caption {
	margin: 0;
	color: var(--color-ink-soft);
	font-size: var(--text-base);
	line-height: 1.5;
}
.pub-gallery-caption:empty,
.pub-gallery-caption[hidden] {
	display: none;
}
@media (max-width: 480px) {
	.pub-gallery-copy {
		grid-template-columns: 1fr;
		align-items: start;
		gap: var(--space-3);
	}
	.pub-gallery-count {
		justify-self: start;
	}
	.pub-gallery-footer {
		grid-template-columns: auto minmax(0, 1fr);
		gap: var(--space-3);
	}
}

.pub-carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #fff;
	font-size: var(--text-xl);
	mix-blend-mode: difference;
	z-index: 1;
	padding: var(--space-2);
	line-height: 1;
}
.pub-carousel-btn:focus-visible {
	outline: 2px solid var(--color-yellow);
	outline-offset: 2px;
}
.pub-carousel-prev { left: 0; }
.pub-carousel-next { right: 0; }

.pub-goods-dots {
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 4px;
	pointer-events: none;
}

.pub-goods-dot {
	width: 5px;
	height: 5px;
	border-radius: var(--radius-full);
	background: rgba(255, 255, 255, 0.45);
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
}

.pub-goods-dot--active {
	background: rgba(255, 255, 255, 0.92);
}

@media (prefers-reduced-motion: reduce) {
	.pub-goods-carousel {
		scroll-behavior: auto;
	}
}

/* ── Event ───────────────────────────────────────── */
/* Date badge (sage) — a calendar tile: large day number over a small
   month, shared by the feed card (in flow) and the store eyebrow row.
   Sage background → fixed --color-header-text, never the adaptive
   --color-ink, per the locked dark-mode rule. */
.pub-event-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: calc(var(--space-4) + var(--space-4) + var(--space-2));
	height: calc(var(--space-4) + var(--space-4) + var(--space-2));
	border-radius: var(--radius-sm);
	background: var(--color-sage);
	color: var(--color-header-text);
	box-shadow: var(--shadow-card-soft);
	flex-shrink: 0;
}

.pub-event-badge .day {
	font-family: var(--font-mono);
	font-size: var(--text-md);
	font-weight: 700;
	line-height: 1;
}

.pub-event-badge .mon {
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	text-transform: uppercase;
	line-height: 1.2;
}

.pub-event[data-style="ink"] .pub-event-badge,
.pub-event[data-style="default"] .pub-event-badge {
	background: var(--color-ink);
	color: var(--color-bg);
}
.pub-event[data-style="yellow"] .pub-event-badge {
	background: var(--color-yellow);
	color: var(--color-header-text);
}
.pub-event[data-style="sage"] .pub-event-badge {
	background: var(--color-sage);
	color: var(--color-header-text);
}
.pub-event[data-style="warm"] .pub-event-badge {
	background: var(--color-warm);
	color: var(--color-header-text);
}
.pub-event[data-style="pink"] .pub-event-badge {
	background: var(--color-pink);
	color: var(--color-on-dark);
}
.pub-event[data-style="orange"] .pub-event-badge {
	background: var(--color-orange);
	color: var(--color-on-dark);
}
.pub-event[data-style="cream"] .pub-event-badge {
	background: var(--color-bg);
	color: var(--color-ink);
}
.pub-event[data-style="white"] .pub-event-badge {
	background: var(--color-pure-white);
	color: var(--color-pure-black);
}
.pub-event[data-style="black"] .pub-event-badge {
	background: var(--color-pure-black);
	color: var(--color-pure-white);
}

.pub-event-meta {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	min-width: 0;
}

.pub-event-sub {
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	color: var(--color-ink-muted);
	display: flex;
	align-items: center;
	gap: var(--space-1);
	flex-wrap: wrap;
}

.pub-event-location {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	font-size: var(--text-sm);
	color: var(--color-ink-muted);
	text-decoration: none;
	margin-bottom: var(--space-2);
}

.pub-event-location .ti {
	font-size: var(--text-md);
	color: var(--color-ink-muted);
}

a.pub-event-location:hover {
	color: var(--color-ink);
}

.pub-urgent-pill,
.pub-recurring-badge {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	padding: 2px var(--space-2);
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: var(--text-xs);
}

.pub-urgent-pill {
	background: color-mix(in srgb, var(--color-danger) 14%, transparent);
	color: var(--color-danger);
}

.pub-recurring-badge {
	background: var(--color-surface-raised);
	color: var(--color-ink-muted);
}

.pub-row.pub-event-soon {
	box-shadow: inset 0 0 0 1.10px var(--color-danger);
}

/* ── Embed ───────────────────────────────────────── */
.pub-embed-card {
	display: block;
	position: relative;
	border-radius: var(--radius-lg);
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--color-surface-raised);
	text-decoration: none;
	box-shadow: var(--shadow-card, 0 1px 2px rgba(0,0,0,0.06));
	margin-bottom: var(--space-card-gap);
	isolation: isolate;
}

.pub-embed-thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pub-embed-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(transparent 40%, rgba(0,0,0,0.55) 100%);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: var(--space-2) var(--space-3);
	gap: var(--space-1);
}

.pub-embed-desc {
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	color: rgba(255,255,255,0.7);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pub-embed-title {
	font-family: var(--font-ui);
	font-size: var(--text-md);
	font-weight: 600;
	color: #fff;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pub-embed-play {
	position: absolute;
	top: var(--space-2);
	right: var(--space-2);
	font-size: var(--text-lg);
	color: #fff;
	mix-blend-mode: difference;
}

/* Tutorial embed — CTA overlaid on the card */
.pub-embed-tutorial-cta {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	white-space: nowrap;
}

/* ── Badges ──────────────────────────────────────── */
.pub-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px var(--space-2);
	border-radius: var(--radius-full);
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	flex-shrink: 0;
}

.pub-badge-sage   { background: var(--color-sage);    color: var(--color-header-text); }
.pub-badge-yellow { background: var(--color-yellow);  color: var(--color-header-text); }
.pub-badge-warn   { background: color-mix(in srgb, var(--color-danger) 14%, transparent); color: var(--color-danger); }
.pub-badge-muted  { background: var(--color-surface-alt); color: var(--color-ink-muted); }

/* ── Footer ──────────────────────────────────────── */
.pub-footer {
	overflow: hidden;
	display: flex;
	justify-content: center;
	padding-bottom: 0;
	position: relative;
	z-index: 1;
}

.pub-footer-logo {
	display: block;
	color: var(--color-sage-mid);
	transition: opacity 160ms ease;

	/* Sink the logo into the wave */
	transform: translateY(18%);
}

/* Footer pool */
body::after {
	content: '';
	display: block;
	height: 20px;
	margin-top: -10px;
	background: var(--color-sage);

	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 20' preserveAspectRatio='none'%3E%3Cpath d='M0,5 C60,10 120,0 180,5 C240,10 300,0 360,5 C420,10 480,0 480,5 L480,20 L0,20 Z' fill='white'/%3E%3C/svg%3E") no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 20' preserveAspectRatio='none'%3E%3Cpath d='M0,5 C60,10 120,0 180,5 C240,10 300,0 360,5 C420,10 480,0 480,5 L480,20 L0,20 Z' fill='white'/%3E%3C/svg%3E") no-repeat;

	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
}
.pub-footer-logo:hover {
	opacity: 0.7;
}

.pub-footer-logo svg {
	width: 90%;
	height: auto;
	display: block;
}

/* POSTER — shared container */
.pub-poster {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: var(--radius-2xl);
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(0,0,0,0.10);
	margin-bottom: var(--space-card-gap);
}

a.pub-poster,
a.pub-poster:visited {
	color: inherit;
	text-decoration: none;
}

/* IMAGE POSTER */
.pub-poster-image { display: block; }

.pub-poster-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pub-poster-scrim {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: var(--space-3);
	gap: var(--space-1);
	background: linear-gradient(transparent 35%, rgba(0,0,0,0.65) 100%);
}

.pub-poster-image .pub-poster-eyebrow { color: rgba(255,255,255,0.6); }
.pub-poster-image .pub-poster-title   { color: #fff; font-size: var(--text-xl); line-height: 1.1; }
.pub-poster-image .pub-poster-caption { color: rgba(255,255,255,0.75); }
.pub-poster-image .pub-poster-cta {
	color: #fff;
	background: rgba(255,255,255,0.15);
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-full);
	align-self: flex-start;
	backdrop-filter: blur(4px);
}

/* TEXT POSTER */
.pub-poster-text {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	padding: var(--space-4);
	box-sizing: border-box;
}

.pub-poster-text[data-style="ink"],
.pub-poster-text[data-style="default"] { background: var(--color-ink); color: var(--color-bg); }
.pub-poster-text[data-style="yellow"] { background: var(--color-yellow);  color: var(--color-header-text); }
.pub-poster-text[data-style="sage"]   { background: var(--color-sage);    color: var(--color-header-text); }
/* warm bg is fixed light in every theme — pair it with the never-flipping
   on-brand text, not --color-ink (flips light in dark themes). */
.pub-poster-text[data-style="warm"]   { background: var(--color-warm); color: var(--color-header-text); }
.pub-poster-text[data-style="pink"]   { background: var(--color-pink);    color: var(--color-on-dark); }
.pub-poster-text[data-style="orange"] { background: var(--color-orange);  color: var(--color-on-dark); }
.pub-poster-text[data-style="cream"]  { background: var(--color-bg);      color: var(--color-ink); }
.pub-poster-text[data-style="white"]  { background: var(--color-pure-white); color: var(--color-pure-black); }
.pub-poster-text[data-style="black"]  { background: var(--color-pure-black); color: var(--color-pure-white); }

/* POSTER TYPOGRAPHY */
.pub-poster-eyebrow {
	flex: 0 0 auto;
	font-family: var(--font-mono);
	font-size: var(--text-xs);
	font-weight: 400;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	opacity: 0.7;
}

/* Shared title base — both poster variants. */
.pub-poster-title {
	margin: 0;
	font-family: var(--font-title);
	font-weight: 700;
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Text posters are Bauhaus cards: typography is the visual. fitTitle
   (public.js, [data-fit-title]) is the sizing authority — it measures the
   slot, sets an inline px size, and centers via computed padding-top. The
   clamp below is only the pre-fit / no-JS fallback, kept modest so first
   paint never flashes oversized type. */
.pub-poster-text .pub-poster-title {
	flex: 1;
	display: flex;
	align-items: center;
	font-size: clamp(var(--text-xl), 8vw, var(--text-3xl));
	line-height: 0.82;
	letter-spacing: -0.06em;
	text-wrap: balance;
}

/* Feed fit path only: whole-word first. Shared base keeps break-word for
   store/event titles that never run fitTitle. Emergency hatch remains
   overflow-wrap: break-word when fitTitle clears its inline normal at the
   8px floor. */
.pub-poster-text .pub-poster-title[data-fit-title] {
	overflow-wrap: break-word;
	word-break: normal;
}

.pub-poster-bottom {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-3);
	padding-top: var(--space-3);
}

.pub-poster-caption {
	flex: 1;
	font-family: var(--font-ui);
	font-size: var(--text-sm);
	font-weight: 400;
	line-height: 1.35;
	opacity: 0.75;
}

.pub-poster-cta {
	flex-shrink: 0;
	font-family: var(--font-ui);
	font-size: var(--text-sm);
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 160ms ease, opacity 160ms ease;
}

.pub-poster-cta:hover        { transform: translateX(2px); }
.pub-poster-cta:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ── Black theme overrides ───────────────────────────────────
   --color-sage flips to #2C2C2C in data-theme="dark". Sticky
   posts and event badges use it as a background, making them
   invisible against #111. Keep sticky sage via tokens.        */

[data-theme="dark"] .pub-row.pub-post-sticky {
	background: var(--color-sage);
	border-color: var(--color-sage-border);
	color: var(--color-header-text);
}

[data-theme="dark"] .pub-event:not([data-style]) .pub-event-badge {
	background: var(--color-sage);
	color: var(--color-header-text);
}

[data-theme="dark"] .pub-event[data-style="sage"] .pub-event-badge {
	background: var(--color-sage);
	color: var(--color-header-text);
}

[data-theme="dark"] .pub-badge-sage {
	background: var(--color-sage);
	color: var(--color-header-text);
	border-color: var(--color-sage-border);
}

/* Sage text posters: same forced default-sage pairing — --color-header-text
   never flips, so without this the title is near-black on near-black. */
[data-theme="dark"] .pub-poster-text[data-style="sage"] {
	background: var(--color-sage);
	color: var(--color-header-text);
}

/* Gallery poster-card + full-screen viewer. Square feed thumbnails crop
   intentionally; the viewer preserves each optimized source ratio. */
body.pub-gallery-viewer-open {
  overflow: hidden;
}

.pub-gallery.pub-poster {
  aspect-ratio: auto;
  overflow: visible;
  margin: var(--space-7) 0;
  box-shadow: none;
}

.pub-gallery-card {
  position: relative;
  overflow: hidden;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-2xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.pub-gallery-card[data-style="ink"],
.pub-gallery-card[data-style="default"] { background: var(--color-ink); color: var(--color-bg); }
.pub-gallery-card[data-style="yellow"] { background: var(--color-yellow); color: var(--color-header-text); }
.pub-gallery-card[data-style="sage"] { background: var(--color-sage); color: var(--color-header-text); }
.pub-gallery-card[data-style="warm"] { background: var(--color-warm); color: var(--color-header-text); }
.pub-gallery-card[data-style="pink"] { background: var(--color-pink); color: var(--color-on-dark); }
.pub-gallery-card[data-style="orange"] { background: var(--color-orange); color: var(--color-on-dark); }
.pub-gallery-card[data-style="cream"] { background: var(--color-bg); color: var(--color-ink); }
.pub-gallery-card[data-style="white"] { background: var(--color-pure-white); color: var(--color-pure-black); }
.pub-gallery-card[data-style="black"] { background: var(--color-pure-black); color: var(--color-pure-white); }
.pub-gallery-card[data-style] .pub-gallery-copy { background: inherit; color: inherit; }
.pub-gallery-card[data-style] .pub-gallery-count { border-color: currentColor; background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; }
.pub-gallery-card[data-style] .pub-gallery-description,
.pub-gallery-card[data-style] .pub-gallery-label { color: inherit; opacity: 0.72; }
.pub-gallery-card[data-style] .pub-gallery-card-footer { border-color: color-mix(in srgb, currentColor 20%, transparent); color: inherit; }

.pub-gallery--ready .pub-gallery-card:hover {
  transform: translateY(var(--lift-card));
  box-shadow: var(--shadow-card-soft);
}

.pub-gallery-card-hit {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  border: 0;
  border-radius: var(--radius-2xl);
  background: transparent;
  cursor: pointer;
}

.pub-gallery-card-hit[hidden],
.pub-gallery-card-footer[hidden],
.pub-gallery-viewer[hidden] {
  display: none;
}

.pub-gallery-card-hit:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: var(--space-1);
}

.pub-gallery-grid {
  position: relative;
  display: grid;
  gap: var(--space-0-5);
  padding: var(--space-0-5);
  background: var(--color-surface);
}

.pub-gallery-grid--1 { grid-template-columns: minmax(0, 1fr); }
.pub-gallery-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pub-gallery-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pub-gallery-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pub-gallery-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--color-surface-alt);
}

.pub-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-fast) ease;
}

.pub-gallery--ready .pub-gallery-card:hover .pub-gallery-thumb img {
  transform: scale(1.025);
}

.pub-gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--color-overlay-dark);
  color: var(--color-on-dark);
  font-family: var(--font-title);
  font-size: var(--text-lg);
}

.pub-gallery .pub-gallery-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-5);
}

.pub-gallery-copy-top,
.pub-gallery-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.pub-gallery-label {
  color: var(--color-ink-mid);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pub-gallery .pub-gallery-count {
  display: inline-flex;
  align-self: auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: var(--space-1) var(--space-2);
  border: var(--line-thin) solid var(--color-sage-border);
  border-radius: var(--radius-full);
  background: var(--color-sage);
  color: var(--color-header-text);
  font-size: var(--text-xs);
  line-height: 1.2;
}

.pub-gallery .pub-gallery-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(var(--text-xl), 6vw, var(--text-2xl));
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.pub-gallery .pub-gallery-description {
  max-width: 44ch;
  margin: var(--space-2) 0 0;
  color: var(--color-ink-soft);
  font-size: var(--text-base);
  line-height: 1.5;
}

.pub-gallery-card-footer {
  padding-top: var(--space-3);
  border-top: var(--line-thin) solid var(--color-border-dim);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 700;
}

.pub-gallery--text-only .pub-gallery-copy {
  min-height: calc(var(--space-9) * 3);
  align-content: end;
  background: var(--color-sage);
  color: var(--color-header-text);
}

.pub-gallery--text-only .pub-gallery-label,
.pub-gallery--text-only .pub-gallery-description {
  color: var(--color-header-text);
  opacity: 0.72;
}

.pub-gallery-viewer {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: var(--color-overlay-dark);
}

.pub-gallery-viewer-shell {
  display: grid;
  width: min(100%, calc(var(--content-wide-max) * 2));
  height: min(100%, calc(100svh - var(--space-6)));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: var(--line-thin) solid var(--color-ink-mid);
  border-radius: var(--radius-2xl);
  background: var(--color-drawer-base);
  box-shadow: var(--shadow-card-soft);
}

.pub-gallery-viewer-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto var(--control-compact-h);
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--line-thin) solid var(--color-ink-mid);
  color: var(--color-on-dark);
}

.pub-gallery-viewer-bar h2 {
  overflow: hidden;
  margin: 0;
  font-family: var(--font-title);
  font-size: var(--text-lg);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pub-gallery-viewer-count {
  color: var(--color-dim);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.pub-gallery-viewer-close,
.pub-gallery-viewer-actions button {
  display: grid;
  width: var(--control-compact-h);
  height: var(--control-compact-h);
  padding: 0;
  place-items: center;
  border: var(--line-thin) solid var(--color-ink-mid);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-on-dark);
  cursor: pointer;
}

.pub-gallery-viewer-close:hover,
.pub-gallery-viewer-actions button:hover,
.pub-gallery-viewer-close:focus-visible,
.pub-gallery-viewer-actions button:focus-visible {
  border-color: var(--color-yellow);
  color: var(--color-yellow);
}

.pub-gallery-viewer-close:focus-visible,
.pub-gallery-viewer-actions button:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: var(--space-0-5);
}

.pub-gallery-viewer-stage {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding: var(--space-4);
  touch-action: pan-y;
}

.pub-gallery-viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pub-gallery-viewer-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--control-compact-h);
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: var(--line-thin) solid var(--color-ink-mid);
  color: var(--color-on-dark);
}

.pub-gallery-viewer-copy { min-width: 0; }

.pub-gallery-viewer-copy p {
  max-width: 54ch;
  margin: 0;
  color: var(--color-on-dark);
  font-size: var(--text-base);
  line-height: 1.45;
}

.pub-gallery-viewer-copy p[hidden] { display: none; }

.pub-gallery-viewer-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: var(--space-0-5);
  padding: var(--space-0-5);
}

.pub-gallery-viewer[data-total="1"] .pub-gallery-viewer-actions { display: none; }

.pub-gallery-sr-only {
  position: absolute;
  width: var(--line-thin);
  height: var(--line-thin);
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 480px) {
  .pub-gallery .pub-gallery-copy { padding: var(--space-4); }
  .pub-gallery-viewer { padding: 0; }
  .pub-gallery-viewer-shell {
    width: 100%;
    height: 100svh;
    border: 0;
    border-radius: 0;
  }
  .pub-gallery-viewer-stage { padding: var(--space-2); }
  .pub-gallery-viewer-footer {
    align-items: start;
    flex-direction: column;
    gap: var(--space-3);
  }
  .pub-gallery-viewer-actions { align-self: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .pub-gallery-card,
  .pub-gallery-thumb img { transition: none; }
}

/* Event / goods Bauhaus cards on the feed — same style vocabulary as posters.
   Event-poster layout used to live only in store.css; feed now renders it too. */
.pub-event-poster.pub-poster-text {
	aspect-ratio: auto;
	min-height: 220px;
	padding: var(--space-6) var(--space-5);
	gap: var(--space-2);
}
.pub-event-poster.pub-poster-image { aspect-ratio: 4 / 3; }
.pub-event-poster .pub-poster-scrim { padding: var(--space-5); }
.pub-event-poster .pub-cta,
.pub-goods-poster .pub-cta { align-self: flex-start; width: auto; }
.pub-event-poster.pub-poster-text .pub-poster-caption,
.pub-event-poster.pub-poster-text .pub-meta-desc,
.pub-goods-poster .pub-poster-caption {
	color: inherit;
	opacity: 0.78;
}
.pub-event-poster .pub-event-price {
	color: inherit;
	margin-bottom: 0;
}
.pub-goods-poster {
	min-height: 200px;
	gap: var(--space-2);
}
.pub-goods-poster .pub-badge { align-self: flex-start; }

/* Goods with images: tint the title face from Design style. */
.pub-goods-face[data-style="ink"],
.pub-goods-face[data-style="default"] { background: var(--color-ink); color: var(--color-bg); }
.pub-goods-face[data-style="yellow"] { background: var(--color-yellow); color: var(--color-header-text); }
.pub-goods-face[data-style="sage"]   { background: var(--color-sage); color: var(--color-header-text); }
.pub-goods-face[data-style="warm"]   { background: var(--color-warm); color: var(--color-header-text); }
.pub-goods-face[data-style="pink"]   { background: var(--color-pink); color: var(--color-on-dark); }
.pub-goods-face[data-style="orange"] { background: var(--color-orange); color: var(--color-on-dark); }
.pub-goods-face[data-style="cream"]  { background: var(--color-bg); color: var(--color-ink); }
.pub-goods-face[data-style="white"]  { background: var(--color-pure-white); color: var(--color-pure-black); }
.pub-goods-face[data-style="black"]  { background: var(--color-pure-black); color: var(--color-pure-white); }
.pub-goods-face[data-style] .pub-row-title,
.pub-goods-face[data-style] .pub-goods-secondary,
.pub-goods-face[data-style] .pub-row-desc-short { color: inherit; }
.pub-goods-face[data-style] .pub-row-chevron { color: inherit; opacity: 0.7; }

/* Price in the expanded event panel. */
.pub-event-price {
	font-family: var(--font-mono);
	font-size: var(--text-lg);
	font-weight: 700;
	color: var(--color-ink);
	margin-bottom: var(--space-2);
}

.pub-event-time {
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	color: var(--color-ink-muted);
}

.pub-event-tz {
	font-size: var(--text-2xs);
	color: var(--color-ink-muted);
	margin-left: 2px;
}

.pub-event-loc-ext {
	font-size: var(--text-sm);
	color: var(--color-ink-muted);
}
