/* Hanfu Photo Wall — gallery-night theme inspired by hanfu.dk homepage:
   warm near-black, antique tan #c2a990, terracotta #d8613c, Cardo serif.
   Photos hang on the dark wall as white-matted framed prints. */

/* Self-hosted subset of Noto Serif SC (140 glyphs used by the wall and the
   upload card; includes 曰 U+66F0 so 岂曰无衣 renders with a properly wide,
   flat 曰 instead of the near-identical 日 of system fallback fonts). */

@font-face {
	font-family: "HFW Serif SC";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/noto-serif-sc-400.woff2") format("woff2");
}

@font-face {
	font-family: "HFW Serif SC";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/noto-serif-sc-700.woff2") format("woff2");
}

:root {
	--hfw-night: #0f0d0c;
	--hfw-night-2: #16120f;
	--hfw-paper: #f5efe3;
	--hfw-paper-2: #fbf7ec;
	--hfw-tan: #c2a990;
	--hfw-tan-dim: rgba(194, 169, 144, 0.55);
	--hfw-terra: #d8613c;
	--hfw-ink: #231c18;
	--hfw-serif: "HFW Serif SC", "Cardo", "Times New Roman", "Noto Serif SC", "Songti SC", serif;
}

/* ---------- Clean mode: hide block-theme header/footer and page H1 ---------- */

body.hfw-clean {
	background: var(--hfw-night);
	overflow-x: clip;
}

/* Upload page: full-bleed event artwork behind a dark veil. */

body.hfw-scene {
	background-image:
		linear-gradient(rgba(15, 13, 12, 0.78), rgba(15, 13, 12, 0.92)),
		url("https://hanfu.dk/wp-content/uploads/2026/06/Image-Jun-12-2026-11_36_35-AM.png");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

@media (max-width: 782px) {
	body.hfw-scene {
		background-attachment: scroll;
	}
}

body.hfw-clean .wp-site-blocks {
	padding: 0 !important;
	margin: 0 !important;
}

body.hfw-clean .wp-site-blocks > header,
body.hfw-clean .wp-site-blocks > footer,
body.hfw-clean header.wp-block-template-part,
body.hfw-clean footer.wp-block-template-part,
body.hfw-clean .wp-block-post-title {
	display: none !important;
}

/* ---------- Brand block ---------- */

.hfw-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.8rem;
	margin-bottom: 1.1rem;
}

.hfw-brand-logo {
	height: 52px;
	width: auto;
	max-width: 130px;
	object-fit: contain;
	border-radius: 8px;
}

.hfw-brand-text {
	display: flex;
	flex-direction: column;
	text-align: left;
	line-height: 1.3;
}

.hfw-brand-name {
	font-family: var(--hfw-serif);
	font-weight: 400;
	font-size: 1.02rem;
	color: var(--hfw-ink);
	letter-spacing: 0.04em;
}

.hfw-brand-domain {
	font-size: 0.74rem;
	font-weight: 600;
	color: var(--hfw-terra);
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

/* ---------- Upload page (invitation card on a gallery table) ---------- */

.hfw-upload {
	max-width: 580px;
	margin: 3rem auto 3.5rem;
	padding: 0 1.25rem;
}

.hfw-card {
	position: relative;
	background: linear-gradient(180deg, var(--hfw-paper-2), var(--hfw-paper));
	border: 1px solid rgba(194, 169, 144, 0.7);
	border-radius: 4px;
	padding: 2.1rem 1.8rem 1.7rem;
	box-shadow:
		0 0 0 6px rgba(194, 169, 144, 0.08),
		0 30px 80px rgba(0, 0, 0, 0.55);
	text-align: center;
}

.hfw-card::before,
.hfw-card::after {
	content: "";
	position: absolute;
	width: 30px;
	height: 30px;
	pointer-events: none;
}

.hfw-card::before {
	top: 9px;
	left: 9px;
	border-top: 1px solid var(--hfw-tan);
	border-left: 1px solid var(--hfw-tan);
}

.hfw-card::after {
	bottom: 9px;
	right: 9px;
	border-bottom: 1px solid var(--hfw-tan);
	border-right: 1px solid var(--hfw-tan);
}

.hfw-seal {
	position: absolute;
	top: -17px;
	right: 24px;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--hfw-terra);
	color: #fbf7ec;
	font-family: var(--hfw-serif);
	font-size: 26px;
	border-radius: 5px;
	transform: rotate(6deg);
	box-shadow:
		inset 0 0 0 2px rgba(251, 247, 236, 0.55),
		inset 0 0 0 5px var(--hfw-terra),
		0 6px 16px rgba(0, 0, 0, 0.4);
}

.hfw-title {
	margin: 0 0 0.3rem;
	font-family: var(--hfw-serif);
	font-size: 1.85rem;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.14em;
	color: var(--hfw-ink);
}

.hfw-title-sub {
	margin: 0 0 1.1rem;
	padding-bottom: 0.9rem;
	font-size: 0.78rem;
	color: #8d8272;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	position: relative;
}

.hfw-title-sub::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 72px;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--hfw-tan), transparent);
}

.hfw-lead {
	color: #4f473d;
	font-size: 0.92rem;
	line-height: 1.7;
	margin: 0 0 1.35rem;
}

.hfw-lead:first-line {
	color: var(--hfw-ink);
}

.hfw-name {
	display: block;
	text-align: left;
	margin-bottom: 1rem;
}

.hfw-name span {
	display: block;
	font-size: 0.72rem;
	color: #6f6455;
	letter-spacing: 0.08em;
	margin-bottom: 0.35rem;
}

.hfw-name input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.75rem;
	border: 1px solid rgba(194, 169, 144, 0.8);
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.7);
	font-size: 1rem;
	color: var(--hfw-ink);
}

.hfw-name input:focus {
	outline: none;
	border-color: var(--hfw-terra);
	background: #fff;
}

.hfw-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	border: 1px dashed var(--hfw-tan);
	border-radius: 4px;
	padding: 1.9rem 1rem;
	cursor: pointer;
	color: #8d8272;
	background: rgba(194, 169, 144, 0.07);
	margin: 0 0 1rem;
	transition: border-color 0.15s, background 0.15s;
}

.hfw-drop:hover,
.hfw-drop.is-over {
	border-color: var(--hfw-terra);
	background: rgba(216, 97, 60, 0.06);
	color: var(--hfw-terra);
}

.hfw-drop-plus {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid var(--hfw-tan);
	border-radius: 50%;
	font-size: 1.7rem;
	font-weight: 300;
	line-height: 1;
	color: var(--hfw-tan);
	background: rgba(255, 255, 255, 0.5);
}

.hfw-drop .hfw-en {
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.03em;
}

.hfw-drop .hfw-da {
	font-size: 0.78rem;
}

.hfw-previews {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 0.5rem;
	margin-bottom: 1.1rem;
}

.hfw-previews:empty {
	display: none;
}

.hfw-previews figure {
	position: relative;
	margin: 0;
	border-radius: 3px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #fff;
	border: 1px solid rgba(194, 169, 144, 0.8);
}

.hfw-previews img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hfw-rm {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 50%;
	background: rgba(35, 28, 24, 0.75);
	color: #fbf7ec;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
}

.hfw-btn {
	width: 100%;
	padding: 0.9rem 1rem;
	border: 1px solid var(--hfw-tan);
	border-radius: 3px;
	background: var(--hfw-ink);
	color: #fbf7ec;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-indent: 0.28em;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.hfw-btn:hover:not(:disabled) {
	background: var(--hfw-terra);
	border-color: var(--hfw-terra);
	box-shadow: 0 10px 30px rgba(216, 97, 60, 0.35);
}

.hfw-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.hfw-btn.is-busy {
	opacity: 0.7;
}

.hfw-progress {
	height: 3px;
	background: rgba(194, 169, 144, 0.3);
	overflow: hidden;
	margin-top: 0.9rem;
}

.hfw-bar {
	height: 100%;
	width: 0;
	background: var(--hfw-terra);
	transition: width 0.2s;
}

.hfw-msg {
	margin: 0.9rem 0 0;
	font-size: 0.9rem;
	min-height: 1.3em;
	color: #4f473d;
}

.hfw-msg.is-error {
	color: var(--hfw-terra);
	font-weight: 600;
}

.hfw-consent {
	margin: 1.3rem 0 0;
	font-size: 0.68rem;
	color: #a29784;
	line-height: 1.6;
}

.hfw-wall-link {
	margin: 1.2rem 0 0;
}

.hfw-wall-link a {
	display: inline-block;
	padding: 0.85rem 1.9rem;
	background: var(--hfw-terra);
	border: 1px solid rgba(251, 247, 236, 0.5);
	border-radius: 999px;
	color: #fbf7ec;
	font-family: var(--hfw-serif);
	font-weight: 600;
	font-size: 1.02rem;
	letter-spacing: 0.1em;
	text-decoration: none;
	box-shadow: 0 10px 28px rgba(216, 97, 60, 0.38);
	transition: background 0.15s, box-shadow 0.15s;
}

.hfw-wall-link a:hover {
	background: #c14f2c;
	color: #fff;
	box-shadow: 0 14px 34px rgba(216, 97, 60, 0.5);
}

.hfw-name small {
	display: block;
	margin-top: 0.45rem;
	font-size: 0.7rem;
	line-height: 1.55;
	color: #8d8272;
}

/* Self-service delete section. */

.hfw-manage {
	margin-top: 1.6rem;
	padding: 1.1rem 1.2rem 1rem;
	border: 1px dashed rgba(194, 169, 144, 0.65);
	border-radius: 4px;
	background: rgba(194, 169, 144, 0.06);
	text-align: left;
}

.hfw-manage-title {
	margin: 0 0 0.8rem;
	font-family: var(--hfw-serif);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--hfw-ink);
}

.hfw-manage-row {
	display: flex;
	gap: 0.6rem;
	align-items: stretch;
}

.hfw-manage-row input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.6rem 0.75rem;
	border: 1px solid rgba(194, 169, 144, 0.8);
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.7);
	font-size: 1rem;
	color: var(--hfw-ink);
}

.hfw-manage-btn {
	flex: 0 0 auto;
	padding: 0.6rem 1.2rem;
	border: 1px solid var(--hfw-tan);
	border-radius: 3px;
	background: var(--hfw-ink);
	color: #fbf7ec;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	cursor: pointer;
}

.hfw-manage-btn:hover {
	background: var(--hfw-terra);
	border-color: var(--hfw-terra);
}

.hfw-manage-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.hfw-manage-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 0.6rem;
	margin-top: 0.8rem;
}

.hfw-manage-grid:empty {
	display: none;
}

.hfw-manage-grid figure {
	position: relative;
	margin: 0;
	border-radius: 3px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #fff;
	border: 1px solid rgba(194, 169, 144, 0.8);
}

.hfw-manage-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hfw-manage-del {
	position: absolute;
	left: 4px;
	right: 4px;
	bottom: 4px;
	padding: 0.3rem 0.2rem;
	border: 0;
	border-radius: 3px;
	background: rgba(216, 97, 60, 0.92);
	color: #fbf7ec;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	cursor: pointer;
}

.hfw-manage-del:hover {
	background: #c14f2c;
}

.hfw-manage-del:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.hfw-manage-note {
	margin: 0.9rem 0 0;
	font-size: 0.7rem;
	line-height: 1.6;
	color: #a29784;
}

/* Big pulsing CTA shown right after a successful upload. */

.hfw-cta {
	display: inline-block;
	margin-top: 0.9rem;
	padding: 0.95rem 2.1rem;
	background: var(--hfw-terra);
	border: 1px solid rgba(251, 247, 236, 0.55);
	border-radius: 999px;
	color: #fbf7ec;
	font-family: var(--hfw-serif);
	font-weight: 700;
	font-size: 1.12rem;
	letter-spacing: 0.08em;
	text-decoration: none;
	animation: hfw-cta-pulse 2s ease-in-out infinite;
}

.hfw-cta:hover {
	background: #c14f2c;
	color: #fff;
}

@keyframes hfw-cta-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(216, 97, 60, 0.55), 0 10px 30px rgba(216, 97, 60, 0.35); }
	50%      { box-shadow: 0 0 0 14px rgba(216, 97, 60, 0), 0 10px 30px rgba(216, 97, 60, 0.35); }
}

/* ---------- Wall (gallery night) ---------- */

/* Ceremonial opening header. */

.hfw-ceremony {
	position: relative;
	text-align: center;
	padding: 3.2rem 1.25rem 2.2rem;
	background-image:
		radial-gradient(rgba(194, 169, 144, 0.08) 1px, transparent 1.6px),
		repeating-linear-gradient(90deg, transparent 0 88px, rgba(194, 169, 144, 0.12) 88px 89px, transparent 89px 176px);
	background-size: 22px 22px, auto;
}

.hfw-ceremony::before,
.hfw-ceremony::after {
	content: "";
	position: absolute;
	width: 56px;
	height: 56px;
	pointer-events: none;
	opacity: 0.85;
}

.hfw-ceremony::before {
	top: 18px;
	left: 22px;
	border-top: 1px solid var(--hfw-tan);
	border-left: 1px solid var(--hfw-tan);
}

.hfw-ceremony::after {
	bottom: 18px;
	right: 22px;
	border-bottom: 1px solid var(--hfw-tan);
	border-right: 1px solid var(--hfw-tan);
}

.hfw-ceremony-seal {
	position: static;
	display: flex;
	margin: 0 auto 1.1rem;
	width: 58px;
	height: 58px;
	font-size: 32px;
	border-radius: 6px;
	box-shadow:
		inset 0 0 0 2px rgba(251, 247, 236, 0.55),
		inset 0 0 0 6px var(--hfw-terra),
		0 0 30px rgba(216, 97, 60, 0.28);
}

.hfw-ceremony-kicker {
	margin: 0 0 0.9rem;
	font-size: 0.68rem;
	letter-spacing: 0.34em;
	color: var(--hfw-tan-dim);
}

.hfw-ceremony-title {
	margin: 0;
	font-family: var(--hfw-serif);
	font-weight: 400;
	font-size: clamp(2.7rem, 6.5vw, 4.6rem);
	line-height: 1.1;
	letter-spacing: 0.3em;
	text-indent: 0.3em;
	color: var(--hfw-paper-2);
	text-shadow: 0 0 44px rgba(194, 169, 144, 0.35), 0 2px 4px rgba(0, 0, 0, 0.6);
}

.hfw-ceremony-date {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin: 1.1rem 0 1.4rem;
	font-size: 0.82rem;
	letter-spacing: 0.26em;
	color: var(--hfw-tan);
}

.hfw-orn-line {
	display: inline-block;
	width: clamp(40px, 8vw, 110px);
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--hfw-tan));
}

.hfw-orn-line:last-child {
	background: linear-gradient(90deg, var(--hfw-tan), transparent);
}

.hfw-ceremony-motto {
	margin: 0 0 0.8rem;
	font-family: var(--hfw-serif);
	font-size: clamp(1.15rem, 2.4vw, 1.6rem);
	letter-spacing: 0.3em;
	color: var(--hfw-terra);
}

/* 曰 must read unmistakably wide and flat (not 日): stretch the glyph
   horizontally and compress it vertically. */

.hfw-yue {
	display: inline-block;
	transform: scaleX(1.35) scaleY(0.78);
	transform-origin: center;
	margin: 0 0.05em;
}

.hfw-ceremony-sub {
	margin: 0;
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	color: var(--hfw-tan-dim);
}

/* Welcome toasts for new uploads. */

.hfw-toast {
	position: fixed;
	left: 50%;
	bottom: 2.2rem;
	transform: translateX(-50%);
	z-index: 9990;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	align-items: center;
	pointer-events: none;
	width: max-content;
	max-width: 92vw;
}

.hfw-toast-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	background: rgba(22, 18, 15, 0.96);
	border: 1px solid rgba(194, 169, 144, 0.7);
	border-radius: 4px;
	padding: 0.85rem 2rem;
	box-shadow: 0 0 0 4px rgba(194, 169, 144, 0.1), 0 18px 50px rgba(0, 0, 0, 0.65);
	animation: hfw-toast-in 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.hfw-toast-item.is-out {
	animation: hfw-toast-out 0.7s ease-in forwards;
}

.hfw-toast-cn {
	font-family: var(--hfw-serif);
	font-size: 1.15rem;
	letter-spacing: 0.16em;
	color: var(--hfw-paper-2);
}

.hfw-toast-en {
	font-size: 0.66rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--hfw-terra);
}

@keyframes hfw-toast-in {
	from { opacity: 0; transform: translateY(26px) scale(0.95); }
	to   { opacity: 1; transform: none; }
}

@keyframes hfw-toast-out {
	from { opacity: 1; }
	to   { opacity: 0; transform: translateY(14px); }
}

.hfw-wall {
	position: relative;
	min-height: 100vh;
	/* Force full-bleed: the theme constrains entry-content children to
	   ~620-765px with auto margins; break out to the viewport. body.hfw-clean
	   clips horizontal overflow, so no scrollbar side effects. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: 0 !important;
}

.hfw-side {
	display: none;
}

.hfw-wall-bar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.65rem 1.25rem;
	background: rgba(15, 13, 12, 0.92);
	border-bottom: 1px solid rgba(194, 169, 144, 0.28);
	backdrop-filter: blur(8px);
}

.hfw-wall-title {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	flex-wrap: wrap;
}

.hfw-wall-bar .hfw-brand-logo {
	height: 38px;
	max-width: 95px;
	padding: 2px;
	background: var(--hfw-paper-2);
	border: 1px solid rgba(194, 169, 144, 0.6);
	border-radius: 6px;
	box-sizing: content-box;
}

.hfw-wall-id {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.hfw-wall-cn {
	font-family: var(--hfw-serif);
	font-size: 1.15rem;
	font-weight: 400;
	letter-spacing: 0.22em;
	color: var(--hfw-paper-2);
}

.hfw-wall-org {
	font-size: 0.64rem;
	font-weight: 500;
	color: var(--hfw-tan-dim);
	letter-spacing: 0.14em;
}

.hfw-live {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	color: var(--hfw-terra);
}

.hfw-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--hfw-terra);
	animation: hfw-pulse 1.6s ease-out infinite;
}

@keyframes hfw-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(216, 97, 60, 0.5); }
	70%  { box-shadow: 0 0 0 8px rgba(216, 97, 60, 0); }
	100% { box-shadow: 0 0 0 0 rgba(216, 97, 60, 0); }
}

.hfw-count {
	font-size: 0.74rem;
	font-weight: 500;
	color: var(--hfw-tan-dim);
	letter-spacing: 0.1em;
}

.hfw-wall-btn {
	border: 1px solid rgba(194, 169, 144, 0.6);
	background: transparent;
	color: var(--hfw-tan);
	border-radius: 3px;
	padding: 0.45rem 1rem;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.hfw-wall-btn:hover {
	background: var(--hfw-tan);
	color: var(--hfw-night);
}

/* Prominent upload CTA in the wall bar. */

a.hfw-wall-upload {
	display: inline-block;
	background: var(--hfw-terra);
	border: 1px solid rgba(251, 247, 236, 0.45);
	color: #fbf7ec;
	font-family: var(--hfw-serif);
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(216, 97, 60, 0.35);
}

a.hfw-wall-upload:hover {
	background: #c14f2c;
	color: #fff;
}

a.hfw-wall-btn,
a.hfw-wall-btn:hover {
	text-decoration: none;
}

a.hfw-brand-home {
	border-bottom: 0;
	display: inline-flex;
	line-height: 0;
}

/* Spotlight: the celebrity moment. */

.hfw-spotlight {
	max-width: 900px;
	margin: 1.6rem auto 0.4rem;
	padding: 0 1rem;
	text-align: center;
	cursor: zoom-in;
}

.hfw-spotlight[hidden] {
	display: none !important;
}

.hfw-spotlight-label {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--hfw-serif);
	font-size: 0.78rem;
	letter-spacing: 0.3em;
	color: var(--hfw-tan);
	margin-bottom: 0.8rem;
}

.hfw-spotlight-label::before,
.hfw-spotlight-label::after {
	content: "";
	width: 42px;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--hfw-tan-dim));
}

.hfw-spotlight-label::after {
	background: linear-gradient(90deg, var(--hfw-tan-dim), transparent);
}

.hfw-spotlight-frame {
	position: relative;
	display: inline-block;
	background: var(--hfw-paper-2);
	padding: 10px;
	border: 1px solid rgba(194, 169, 144, 0.85);
	box-shadow:
		0 0 0 1px rgba(194, 169, 144, 0.25),
		0 0 90px rgba(194, 169, 144, 0.16),
		0 30px 70px rgba(0, 0, 0, 0.6);
	max-width: 100%;
}

.hfw-spotlight-frame img {
	display: block;
	max-height: 52vh;
	max-width: 100%;
	width: auto;
	height: auto;
}

.hfw-spotlight-cap {
	margin-top: 9px;
	font-family: var(--hfw-serif);
	font-size: 0.92rem;
	letter-spacing: 0.12em;
	color: var(--hfw-ink);
}

.hfw-spotlight.is-in .hfw-spotlight-frame {
	animation: hfw-hero 1s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.hfw-spotlight.is-in .hfw-spotlight-frame::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%);
	transform: translateX(-130%);
	animation: hfw-sheen 1.3s ease-out 0.2s;
	pointer-events: none;
}

@keyframes hfw-hero {
	0%   { opacity: 0; transform: scale(0.93) rotate(-1.4deg); }
	60%  { opacity: 1; }
	100% { opacity: 1; transform: none; }
}

@keyframes hfw-sheen {
	to { transform: translateX(130%); }
}

/* Empty state before the first photo. */

.hfw-empty {
	min-height: 42vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	text-align: center;
	padding: 2.5rem 1rem;
}

.hfw-empty[hidden] {
	display: none !important;
}

.hfw-empty-cn {
	font-family: var(--hfw-serif);
	font-size: 2rem;
	font-weight: 400;
	letter-spacing: 0.28em;
	color: var(--hfw-tan);
}

.hfw-empty-sub {
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	color: var(--hfw-tan-dim);
}

/* Masonry scatter: absolutely positioned tiles placed by wall.js. */

#hfw-wall .hfw-grid {
	position: relative;
	padding: 1.2rem 1.25rem 2.5rem;
	min-height: 40vh;
}

#hfw-wall .hfw-item {
	position: absolute;
	top: 0;
	left: 0;
	margin: 0;
	background: var(--hfw-paper-2);
	padding: 6px;
	border: 1px solid rgba(194, 169, 144, 0.55);
	box-shadow:
		0 0 0 1px rgba(194, 169, 144, 0.14),
		0 14px 34px rgba(0, 0, 0, 0.5);
	cursor: zoom-in;
	transition: box-shadow 0.25s;
}

#hfw-wall .hfw-item.is-laid {
	transition: box-shadow 0.25s, left 0.35s ease, top 0.35s ease, width 0.35s ease;
}

#hfw-wall .hfw-item:hover {
	box-shadow:
		0 0 0 1px rgba(194, 169, 144, 0.35),
		0 22px 54px rgba(0, 0, 0, 0.65);
	z-index: 3;
}

#hfw-wall .hfw-item.is-featured {
	z-index: 2;
	padding: 8px;
}

/* Demo placeholder tiles carry a corner badge. */

#hfw-wall .hfw-item.hfw-demo::before {
	content: "示例 DEMO";
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 2px 9px;
	background: rgba(216, 97, 60, 0.92);
	color: #fbf7ec;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	border-radius: 3px;
}

#hfw-wall .hfw-item img {
	width: 100%;
	display: block;
}

#hfw-wall .hfw-item figcaption {
	position: absolute;
	left: 6px;
	right: 6px;
	bottom: 6px;
	padding: 1rem 0.6rem 0.4rem;
	font-family: var(--hfw-serif);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	color: #fbf7ec;
	background: linear-gradient(transparent, rgba(10, 8, 6, 0.78));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#hfw-wall .hfw-item figcaption::before {
	content: "\300C";
	color: var(--hfw-tan);
}

#hfw-wall .hfw-item figcaption::after {
	content: "\300D";
	color: var(--hfw-tan);
}

#hfw-wall .hfw-item.is-new {
	animation: hfw-star 2.4s ease-out;
}

@keyframes hfw-star {
	0%   { opacity: 0; }
	35%  { opacity: 1; box-shadow: 0 0 0 1px rgba(194, 169, 144, 0.6), 0 0 60px 8px rgba(216, 97, 60, 0.35); }
	100% { opacity: 1; }
}

/* Paparazzi flash when new photos land. */

.hfw-flash {
	position: fixed;
	inset: 0;
	z-index: 9998;
	background: #fff;
	opacity: 0;
	pointer-events: none;
}

.hfw-flash.go {
	animation: hfw-flash 1.1s ease-out;
}

@keyframes hfw-flash {
	0%   { opacity: 0; }
	10%  { opacity: 0.7; }
	100% { opacity: 0; }
}

/* Lightbox. */

#hfw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(8, 6, 5, 0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-out;
}

#hfw-lightbox[hidden] {
	display: none !important;
}

#hfw-lightbox img {
	max-width: 96vw;
	max-height: 96vh;
	box-shadow: 0 0 120px rgba(0, 0, 0, 0.9);
}

/* Side couplets (wide screens only). */

@media (min-width: 1400px) {
	.hfw-side {
		display: block;
		position: fixed;
		top: 50%;
		transform: translateY(-50%);
		writing-mode: vertical-rl;
		font-family: var(--hfw-serif);
		font-size: 20px;
		letter-spacing: 0.6em;
		color: rgba(194, 169, 144, 0.34);
		user-select: none;
		pointer-events: none;
		z-index: 4;
	}

	.hfw-side-l { left: 18px; }
	.hfw-side-r { right: 18px; }
}

/* Responsive. */

@media (max-width: 782px) {
	#hfw-wall .hfw-grid {
		padding: 0.8rem 0.9rem 2rem;
	}

	#hfw-wall .hfw-item {
		padding: 4px;
	}

	.hfw-spotlight {
		margin-top: 1rem;
	}

	.hfw-spotlight-frame img {
		max-height: 38vh;
	}

	.hfw-upload {
		margin: 2rem auto 2.5rem;
	}

	.hfw-card {
		padding: 1.7rem 1.2rem 1.4rem;
	}

	.hfw-title {
		font-size: 1.55rem;
	}
}
