:root {
  --parchment: #f3e6cf;
  --parchment-deep: #e8d4b0;
  --ink: #1c1410;
  --ink-soft: #5a4638;
  --seal: #b71c1c;
  --seal-deep: #8e1212;
  --gold: #c4a35a;
  --line: rgba(28, 20, 16, 0.14);
  --paper-white: #fffaf1;
  /* 霞鶩文楷 TC：繁體楷書，線條較粗 */
  --font-brush: "LXGW WenKai TC", "Noto Serif TC", "Songti TC", serif;
  --font-display: "Noto Serif TC", "Songti TC", serif;
  --font-body: "Noto Sans TC", "PingFang HK", sans-serif;
  --max: 1120px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  background-color: var(--parchment);
  background-image:
    radial-gradient(900px 420px at 8% 0%, rgba(183, 28, 28, 0.07), transparent 55%),
    radial-gradient(700px 380px at 100% 18%, rgba(196, 163, 90, 0.12), transparent 50%),
    url("../assets/decor/paper-tile.jpg");
  background-size: auto, auto, 420px 420px;
  background-attachment: fixed;
}

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image: url("../assets/decor/paper-noise.svg");
  background-size: 220px 220px;
  mix-blend-mode: multiply;
}

body > main,
body > footer {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--seal);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--seal-deep);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: rgba(243, 230, 207, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 250, 241, 0.94);
  border-bottom-color: var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand-seal {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  background: var(--seal);
  color: #fff;
  font-family: var(--font-brush);
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: 2px 2px 0 rgba(28, 20, 16, 0.12);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.brand-text small {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--seal);
}

.nav-cta {
  padding: 0.5rem 0.95rem;
  background: var(--seal);
  color: #fff !important;
  border: 1px solid var(--seal-deep);
  box-shadow: 2px 2px 0 rgba(28, 20, 16, 0.12);
}

.nav-toggle {
  display: none;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid var(--line);
  background: var(--paper-white);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  display: block;
  width: 1.05rem;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  position: relative;
}

.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff8ee;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
  transform: scale(1.04);
  animation: poster-drift 18s ease-in-out infinite alternate;
}

.hero-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(34, 22, 14, 0.72) 0%, rgba(34, 22, 14, 0.42) 38%, rgba(34, 22, 14, 0.12) 62%, rgba(34, 22, 14, 0.28) 100%),
    linear-gradient(180deg, rgba(34, 22, 14, 0.18) 0%, rgba(34, 22, 14, 0.05) 42%, rgba(34, 22, 14, 0.62) 100%);
}

.hero-ink {
  position: absolute;
  inset: auto -8% -18% auto;
  width: min(52vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183, 28, 28, 0.18) 0%, transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) 1.25rem 4.8rem;
}

.hero-brand {
  margin: 0 0 0.7rem;
  letter-spacing: 0.16em;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 248, 238, 0.9);
}

.hero-title {
  margin: 0;
  font-family: var(--font-brush);
  font-size: clamp(3.2rem, 9vw, 5.8rem);
  line-height: 1.12;
  font-weight: 700;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.hero-title .ink { color: #fff8ee; }
.hero-title .seal { color: #ffecec; }

.hero-lead {
  margin: 1.1rem 0 0;
  max-width: 26rem;
  font-size: 1.05rem;
  color: rgba(255, 248, 238, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.hero-actions-secondary {
  margin-top: 0.75rem;
}

.register-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn-ghost.dark {
  background: transparent;
  border-color: rgba(183, 28, 28, 0.45);
  color: var(--seal);
}

.btn-ghost.dark:hover {
  background: rgba(183, 28, 28, 0.06);
  color: var(--seal-deep);
}

.btn-sm {
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.hero-cut {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  opacity: 0.78;
  filter: drop-shadow(0 6px 10px rgba(28, 20, 16, 0.18));
}

.hero-cut-tl {
  top: calc(var(--header-h) + 0.4rem);
  left: 0.4rem;
  width: min(160px, 26vw);
  animation: float-cut 5s ease-in-out infinite;
}

.hero-cut-br {
  right: 3%;
  bottom: 1.4rem;
  width: min(170px, 24vw);
  animation: float-cut 4.2s ease-in-out infinite reverse;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.95rem;
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--seal);
  border-color: var(--seal-deep);
  color: #fff;
  box-shadow: 3px 3px 0 rgba(28, 20, 16, 0.2);
}

.btn-primary:hover {
  background: var(--seal-deep);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 248, 238, 0.1);
  border-color: rgba(255, 248, 238, 0.55);
  color: #fff8ee;
}

.btn-ghost:hover {
  background: rgba(255, 248, 238, 0.2);
  color: #fff8ee;
}

.facts {
  position: relative;
  z-index: 3;
  padding: 1.75rem 0 0.5rem;
}

.fact-list {
  list-style: none;
  margin: 0 auto;
  max-width: var(--max);
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.fact-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(183, 28, 28, 0.28);
}

.fact-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
}

.fact-list p {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.fact-icon {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--seal);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-brush);
  font-size: 1.05rem;
  line-height: 1;
}

.fact-icon.inline {
  display: inline-grid;
  vertical-align: -0.35rem;
  margin-right: 0.2rem;
}

.section {
  padding: clamp(3.4rem, 7vw, 5.5rem) 0;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-inner.narrow {
  max-width: 760px;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--seal);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
}

.section-head h2,
.contact h2 {
  margin: 0;
  font-family: var(--font-brush);
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  line-height: 1.2;
  font-weight: 700;
}

.section-lead {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
}

.ethos-list {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.ethos-list li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed rgba(183, 28, 28, 0.28);
}

.ethos-list strong {
  font-family: var(--font-brush);
  font-size: 1.45rem;
  color: var(--seal);
  font-weight: 700;
}

.ethos-list span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.contact-sub {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.poster-frame {
  position: relative;
  padding: 0.7rem;
  background: var(--paper-white);
  border: 1px solid rgba(183, 28, 28, 0.25);
  box-shadow: 10px 12px 0 rgba(183, 28, 28, 0.1);
}

.poster-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.poster-caption {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.heritage {
  background:
    linear-gradient(180deg, rgba(183, 28, 28, 0.05), transparent 20%),
    transparent;
}

.heritage-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}

.heritage-filters button {
  border: 1px solid rgba(183, 28, 28, 0.25);
  background: var(--paper-white);
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}

.heritage-filters button.is-active {
  background: var(--seal);
  border-color: var(--seal-deep);
  color: #fff;
}

.heritage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.heritage-grid:has(.heritage-group) {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.heritage-group-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  color: var(--ink);
  letter-spacing: 0.04em;
}

.heritage-group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.heritage-item {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--paper-white);
  border: 1px solid rgba(28, 20, 16, 0.12);
  padding: 0.65rem 0.65rem 0.9rem;
  box-shadow: 5px 7px 0 rgba(28, 20, 16, 0.08);
  transform: rotate(var(--tilt, -0.8deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  animation: item-in 0.55s ease forwards;
}

.heritage-item:nth-child(3n + 1) { --tilt: -1.1deg; animation-delay: 0.02s; }
.heritage-item:nth-child(3n + 2) { --tilt: 0.9deg; animation-delay: 0.08s; }
.heritage-item:nth-child(3n + 3) { --tilt: -0.4deg; animation-delay: 0.14s; }

a.heritage-item:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 8px 12px 0 rgba(183, 28, 28, 0.12);
}

.heritage-item::after {
  content: "";
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  width: 1.5rem;
  height: 1.9rem;
  background:
    linear-gradient(135deg, transparent 45%, var(--seal) 45% 55%, transparent 55%),
    linear-gradient(45deg, #f7d9a8, #fffaf1);
  border: 1px solid rgba(183, 28, 28, 0.35);
  opacity: 0.9;
}

.heritage-item figure {
  margin: 0;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: #ddd;
  border: 1px solid rgba(28, 20, 16, 0.08);
}

.heritage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

a.heritage-item:hover img {
  transform: scale(1.05);
}

.heritage-item .meta {
  padding: 0.7rem 0.2rem 0;
  display: grid;
  gap: 0.2rem;
}

.heritage-item .code {
  color: var(--seal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.heritage-item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.heritage-item .tag {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.heritage-item .cta {
  margin-top: 0.45rem;
  color: var(--seal);
  font-size: 0.88rem;
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.panel {
  background: var(--paper-white);
  border: 1px solid rgba(183, 28, 28, 0.18);
  padding: 1.3rem 1.25rem;
  box-shadow: 4px 4px 0 rgba(183, 28, 28, 0.07);
}

.panel h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  color: var(--seal);
}

.panel ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.panel li {
  margin: 0.4rem 0;
}

.award-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.award-list li {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) 1fr;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px dashed rgba(183, 28, 28, 0.28);
}

.award-list strong {
  font-family: var(--font-display);
}

.award-list span {
  color: var(--ink-soft);
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px dashed rgba(183, 28, 28, 0.28);
}

.detail-list dt {
  font-weight: 700;
  font-family: var(--font-display);
}

.detail-list dd {
  margin: 0;
  color: var(--ink-soft);
}

.org-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.org-row-featured {
  grid-template-columns: repeat(2, 1fr);
}

.org-row article {
  background: var(--paper-white);
  border-top: 4px solid var(--seal);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 1rem 1.2rem;
}

.org-row h3 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  color: var(--seal);
}

.org-row .org-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.org-row .org-tagline {
  margin: 0.35rem 0 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.55;
}

.org-row .org-bio {
  margin: 0.55rem 0 0;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.65;
  font-weight: 400;
}

.register-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--paper-white);
  border: 2px solid var(--seal);
  box-shadow:
    0 0 0 6px var(--paper-white),
    0 0 0 8px rgba(183, 28, 28, 0.35),
    8px 10px 0 rgba(28, 20, 16, 0.08);
  padding: 1.5rem 1.4rem;
}

.register-qr {
  display: flex;
  justify-content: center;
  align-items: center;
}

.register-label {
  margin: 0;
  font-family: var(--font-brush);
  font-size: 1.9rem;
  color: var(--seal);
}

.register-link {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink-soft);
  word-break: break-all;
}

.register-link a {
  font-weight: 700;
}

.register-note {
  margin: 0.7rem 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.qr-frame {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  border: 1.5px dashed rgba(183, 28, 28, 0.45);
  background:
    linear-gradient(45deg, rgba(183, 28, 28, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(183, 28, 28, 0.04) 25%, transparent 25%),
    #fffdf8;
  background-size: 18px 18px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.85rem;
  box-sizing: border-box;
}

.qr-frame span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--seal);
}

.qr-frame small {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.qr-frame img {
  width: 100%;
  max-width: 180px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.upload-notice {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border: 1.5px solid rgba(183, 28, 28, 0.45);
  background: rgba(183, 28, 28, 0.06);
}

.upload-notice strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--seal);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.upload-notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.submit-shell {
  background: var(--paper-white);
  border: 2px solid var(--seal);
  box-shadow:
    0 0 0 6px var(--paper-white),
    0 0 0 8px rgba(183, 28, 28, 0.35),
    8px 10px 0 rgba(28, 20, 16, 0.08);
  padding: 1.4rem 1.3rem 1.6rem;
}

.qr-label {
  margin: 0 0 1rem;
  font-family: var(--font-brush);
  font-size: 1.8rem;
  color: var(--seal);
}

.entry-form {
  display: grid;
  gap: 1.5rem;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  padding: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}

.form-grid label,
.upload-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-grid label span,
.upload-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.span-2 {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(28, 20, 16, 0.18);
  background: #fffdf8;
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--seal);
  box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.12);
}

.upload-drop {
  position: relative;
  min-height: 9.5rem;
  border: 1.5px dashed rgba(183, 28, 28, 0.45);
  background: #fffdf8;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
}

.upload-drop:hover,
.upload-drop.is-dragover {
  background: rgba(183, 28, 28, 0.04);
}

.upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-prompt {
  display: grid;
  gap: 0.25rem;
  text-align: center;
  padding: 1rem;
  pointer-events: none;
}

.upload-prompt small {
  color: var(--ink-soft);
}

.upload-preview {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fffaf1;
}

.field-hint {
  margin: 0;
  color: var(--seal);
  font-size: 0.9rem;
}

.terms-box {
  padding-top: 1rem;
  border-top: 1px dashed rgba(183, 28, 28, 0.28);
}

.terms-mini,
.terms-full {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.terms-mini li,
.terms-full li {
  margin: 0.45rem 0;
}

.check-line {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.check-line input {
  width: auto;
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.form-note,
.form-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.form-status.is-success { color: #2f6b3a; font-weight: 700; }
.form-status.is-error { color: var(--seal); font-weight: 700; }

.terms {
  background: rgba(28, 20, 16, 0.03);
}

.contact-line {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.site-footer {
  position: relative;
  background: var(--seal);
  color: #fff8ee;
  padding: 2.8rem 0 2.2rem;
  margin-top: 1rem;
}

.footer-wave {
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 20px;
  background:
    radial-gradient(circle at 10px 20px, transparent 10px, var(--seal) 11px) 0 0 / 28px 20px repeat-x;
}

.site-footer a {
  color: #fff;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-brush);
  font-size: 2rem;
}

.footer-inner p {
  margin: 0.3rem 0;
}

.footer-fine {
  margin-top: 0.9rem !important;
  font-size: 0.85rem;
  opacity: 0.85;
}

.judges {
  background: rgba(255, 250, 241, 0.45);
}

.judge-card {
  background: var(--paper-white);
  border: 1px solid rgba(183, 28, 28, 0.22);
  box-shadow: 6px 8px 0 rgba(183, 28, 28, 0.08);
  padding: 1.25rem 1.3rem;
}

.judge-card:has(.judge-photo) {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.4rem;
  align-items: start;
}

.judge-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(28, 20, 16, 0.1);
  background: #efe6d6;
}

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

.judge-body h3 {
  margin: 0;
  font-family: var(--font-brush);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.judge-title {
  margin: 0.25rem 0 0.7rem;
  color: var(--seal);
  font-weight: 700;
  font-size: 0.95rem;
}

.judge-bio {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.judge-highlights {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.judge-highlights li {
  margin: 0.35rem 0;
}

.gallery-teaser,
.gallery-wall-section,
.gallery-hero {
  background: rgba(255, 250, 241, 0.55);
}

.gallery-page {
  padding-top: var(--header-h);
}

.gallery-preview-row,
.gallery-reserved,
.gallery-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* display:grid above would otherwise override the hidden attribute */
.gallery-reserved[hidden],
.gallery-empty[hidden],
.gallery-teaser-count[hidden] {
  display: none !important;
}

.gallery-slot {
  min-height: 180px;
  border: 1.5px dashed rgba(183, 28, 28, 0.35);
  background: rgba(255, 253, 248, 0.8);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.gallery-teaser-count {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

a.work-card-teaser {
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.work-card-teaser:hover {
  transform: translateY(-2px);
  box-shadow: 6px 9px 0 rgba(28, 20, 16, 0.1);
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.gallery-count {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
}

.gallery-sort label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.92rem;
}

.gallery-sort select {
  width: auto;
  min-width: 10rem;
}

.gallery-empty {
  margin: 0 0 1.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(183, 28, 28, 0.2);
  background: var(--paper-white);
  color: var(--ink-soft);
}

.work-card {
  background: var(--paper-white);
  border: 1px solid rgba(28, 20, 16, 0.12);
  box-shadow: 5px 7px 0 rgba(28, 20, 16, 0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.work-card-media {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: #efe6d6;
  overflow: hidden;
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}

.work-card-body {
  padding: 0.9rem 0.95rem 1rem;
  display: grid;
  gap: 0.25rem;
}

.work-card-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.work-meta,
.work-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.work-vote-row {
  margin-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.vote-count {
  font-weight: 700;
  color: var(--seal);
}

.vote-modal[hidden] {
  display: none;
}

.vote-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.vote-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 20, 16, 0.45);
}

.vote-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: var(--paper-white);
  border: 2px solid var(--seal);
  padding: 1.35rem 1.25rem 1.4rem;
  box-shadow: 8px 10px 0 rgba(28, 20, 16, 0.12);
}

.vote-modal-panel h3 {
  margin: 0.2rem 0 0.6rem;
  font-family: var(--font-brush);
  font-size: 1.8rem;
  font-weight: 700;
}

.vote-modal-work,
.vote-modal-copy {
  color: var(--ink-soft);
  margin: 0.4rem 0;
}

.vote-amount-field {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0 0.35rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.vote-amount-field input {
  width: 100%;
  max-width: 12rem;
  border: 1px solid rgba(28, 20, 16, 0.18);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.55rem 0.7rem;
}

.vote-preview {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--seal);
}

.vote-banner {
  margin-top: 1rem;
}

.donation-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--paper-white);
  border: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.donation-panel h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.donation-panel p:last-child {
  margin-bottom: 0;
}

.donation-panel > .btn {
  flex-shrink: 0;
}

.donation-note {
  margin-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@media (max-width: 780px) {
  .donation-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

.vote-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.vote-modal-x {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes poster-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.2%, -0.8%, 0); }
}

@keyframes float-cut {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes frame-tilt {
  from { transform: rotate(1.2deg); }
  to { transform: rotate(-1deg); }
}

@keyframes item-in {
  to { opacity: 1; }
}

@media (max-width: 960px) {
  .fact-list,
  .heritage-grid,
  .heritage-group-grid,
  .about-layout,
  .split,
  .org-row,
  .register-panel,
  .gallery-preview-row,
  .gallery-reserved,
  .gallery-wall {
    grid-template-columns: 1fr 1fr;
  }

  .award-list li,
  .detail-list > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.7rem 1.25rem 1.1rem;
    background: rgba(255, 250, 241, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open { display: flex; }

  .site-nav a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    margin-top: 0.7rem;
    text-align: center;
  }

  .fact-list,
  .heritage-grid,
  .heritage-group-grid,
  .about-layout,
  .split,
  .org-row,
  .register-panel,
  .gallery-preview-row,
  .gallery-reserved,
  .gallery-wall,
  .judge-card:has(.judge-photo),
  .form-grid {
    grid-template-columns: 1fr;
  }

  .judge-card:has(.judge-photo) .judge-photo {
    max-width: 140px;
  }

  .span-2 { grid-column: auto; }

  .hero-media img {
    object-position: 75% center;
  }

  .hero-cut-tl {
    width: 96px;
    opacity: 0.55;
  }

  .hero-cut-br {
    width: 110px;
    opacity: 0.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .heritage-item,
  .hero-media img,
  .hero-cut,
  .poster-frame {
    opacity: 1;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
