@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Noto+Serif+TC:wght@500;700;900&family=Poppins:wght@500;600;700&display=swap');

:root {
  --paper: #fffbf5;
  --surface: #ffffff;
  --ink: #1e293b;
  --muted: #5b6b7a;
  --line: #dde3ea;
  --brand-blue: #0369a1;
  --brand-blue-strong: #075985;
  --brand-blue-tint: #e6f4fc;
  --brand-rose: #a81856;
  --brand-rose-strong: #7a1140;
  --brand-rose-tint: #fbe7ef;
  --brand-green: #4d7c0f;
  --brand-green-tint: #eef6e1;
  --anniversary-gold: #c89b3c;
  --anniversary-gold-tint: #fbf0da;
  --danger: #b3261e;
  --danger-tint: #fbeae9;
  /* Existing component aliases. */
  --tea: var(--brand-blue-tint);
  --rose: var(--brand-rose-tint);
  --rose-ink: var(--brand-rose);
  --accent: var(--brand-blue);
  --accent-strong: var(--brand-blue-strong);
  --green: var(--brand-blue);
  --green-dark: var(--brand-blue-strong);
  --gold: var(--anniversary-gold);
  --red: var(--danger);
  --blue: var(--brand-blue);
  --shadow: 0 12px 32px rgba(3, 105, 161, 0.10);
  --display-font: "Noto Serif TC", "PMingLiU", serif;
  --accent-font: "Poppins", "Noto Sans TC", sans-serif;
  --control-font: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-family: var(--control-font);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.85;
  font-family: var(--control-font);
}

a {
  color: inherit;
}

img,
video,
iframe {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 251, 245, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  width: 100%;
  margin: 0;
  padding-left: clamp(16px, 5vw, 64px);
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--brand-blue-strong);
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--green-dark);
  font-size: 24px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a,
.more-toggle {
  padding: 8px 9px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font: inherit;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.more-toggle:hover,
.nav-more.open .more-toggle {
  background: var(--brand-blue-tint);
  color: var(--brand-blue-strong);
}

.nav-more {
  position: relative;
}

.more-toggle::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.72em;
}

.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: none;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.nav-more.open .more-menu {
  display: grid;
  gap: 4px;
}

.more-menu a {
  display: block;
  white-space: nowrap;
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(7, 47, 74, 0.66), rgba(3, 105, 161, 0.25) 52%, rgba(3, 105, 161, 0.02)),
    url("assets/hero-anniversary-cartoon.webp") center / cover no-repeat;
  color: var(--surface);
}

.hero-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0 64px;
}

.hero-mark {
  width: 112px;
  height: 112px;
  object-fit: cover;
  background: transparent;
  border-radius: 50%;
  padding: 0;
  box-shadow: none;
  clip-path: circle(50% at 50% 50%);
}

.eyebrow {
  margin: 22px 0 8px;
  color: #fff0bd;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  line-height: 1.4;
  letter-spacing: 0;
  font-family: var(--display-font);
  font-weight: 700;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: 4.5rem;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.28);
}

.page-hero h1 {
  max-width: none;
  font-size: 3rem;
  text-shadow: none;
}

.hero-subtitle {
  max-width: 680px;
  margin: 18px 0 26px;
  width: fit-content;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.72);
  backdrop-filter: blur(9px);
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.38),
    0 0 14px rgba(0, 0, 0, 0.3);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.section,
.page-hero {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 72px 0;
}

.page-hero {
  padding: 64px 0 36px;
}

.page-hero p,
.section-lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.band {
  background: var(--tea);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3,
.form-panel h3 {
  margin-top: 0;
}

.feature-list {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding-left: 18px;
  border-left: 4px solid var(--gold);
}

.theme-link {
  text-decoration: none;
  display: block;
  min-height: 190px;
}

.theme-link strong {
  display: block;
  color: var(--green-dark);
  font-size: 1.2rem;
}

.theme-link span {
  color: var(--muted);
}

.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  box-shadow: var(--shadow);
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  font: inherit;
  background: var(--surface);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.bot-field {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 18px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--brand-blue);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-blue-strong);
}

.button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.button.secondary {
  background: var(--brand-blue-tint);
  color: var(--brand-blue-strong);
}

.button.danger {
  background: var(--danger);
}

.button.danger:hover {
  background: #8f3028;
}

.google-button {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.google-button:hover {
  background: var(--paper);
}

.fallback-login {
  width: 100%;
  margin-top: 10px;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 20px 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.countdown-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 10px;
}

.countdown-grid span,
.countdown-grid strong {
  display: grid;
  place-items: center;
}

.countdown-grid span {
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(200, 155, 60, 0.5);
  border-radius: 14px;
  background: var(--brand-blue-tint);
  color: var(--muted);
  box-shadow: 0 10px 26px rgba(3, 105, 161, 0.10);
}

.countdown-grid strong {
  color: var(--brand-blue-strong);
  font-size: 3.25rem;
  line-height: 1;
}

.interaction-section .grid {
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-entry {
  margin-top: 18px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
}

.check-row input {
  width: auto;
  margin-top: 7px;
}

.upload-entry {
  align-content: start;
}

.upload-facts {
  display: grid;
  gap: 0;
  margin: 8px 0 18px;
  border-block: 1px solid var(--line);
}

.upload-facts p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.upload-facts p:last-child {
  border-bottom: 0;
}

.upload-facts span {
  color: var(--muted);
  text-align: right;
}

.upload-button {
  width: 100%;
  margin-top: 18px;
}

.upload-gateway {
  display: grid;
  place-items: center;
  padding-top: 42px;
}

.upload-gateway .form-panel {
  width: min(620px, 100%);
}

.form-status {
  min-height: 1.6em;
  color: var(--muted);
  font-weight: 700;
}

.form-status[data-type="success"] {
  color: var(--brand-green);
}

.form-status[data-type="error"] {
  color: var(--red);
}

.story-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.story-card,
.admin-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.story-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--paper);
}

.story-card > div,
.admin-item > div {
  padding: 20px;
}

.story-card h3,
.admin-item h3 {
  margin: 4px 0 8px;
}

.story-type,
.story-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.media-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--green);
  font-weight: 600;
}

.admin-login {
  max-width: 520px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.admin-status-column {
  display: grid;
  gap: 14px;
}

.admin-status-column h2 {
  position: sticky;
  top: 68px;
  z-index: 1;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(251, 247, 242, 0.94);
  backdrop-filter: blur(10px);
}

.admin-status-column h2 span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  margin-left: 6px;
  border-radius: 3px;
  background: var(--rose);
  color: var(--green-dark);
  font-size: 0.9rem;
}

.admin-item {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

.admin-item.status-approved {
  border-top: 5px solid var(--brand-green);
}

.admin-item.status-rejected {
  border-top: 5px solid var(--red);
}

.admin-item.status-pending {
  border-top: 5px solid var(--gold);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 20px 20px;
}

.admin-actions .button {
  margin-top: 0;
}

.reason-field {
  min-height: 86px;
  margin-top: 6px;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.slides {
  display: flex;
  transition: transform 0.35s ease;
}

.slide {
  min-width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  color: var(--surface);
  background:
    linear-gradient(135deg, rgba(3, 105, 161, 0.82), rgba(168, 24, 86, 0.58)),
    url("assets/gate.jpg") center / cover no-repeat;
}

.slide.alt {
  background:
    linear-gradient(135deg, rgba(168, 24, 86, 0.80), rgba(3, 105, 161, 0.56)),
    url("assets/gate.jpg") center / cover no-repeat;
}

.slide h3 {
  margin: 0 0 8px;
  font-size: 2.25rem;
}

.gallery-section {
  padding-top: 44px;
}

.photo-carousel {
  margin-top: 26px;
  box-shadow: var(--shadow);
}

.photo-slide {
  padding: 0;
  background: var(--paper);
}

.photo-slide img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--paper);
}

.carousel-controls {
  position: absolute;
  inset: auto 14px 14px auto;
  display: flex;
  gap: 8px;
}

.carousel button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  background: rgba(7, 89, 133, 0.92);
  color: var(--surface);
  font-size: 22px;
  cursor: pointer;
}

.media-frame {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.committee-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
}

.committee-table th,
.committee-table td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

.committee-table th {
  background: var(--rose);
  color: var(--green-dark);
}

.timeline {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.timeline li {
  padding: 18px;
  border-left: 5px solid var(--green);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
}

.footer {
  padding: 36px 16px;
  background: var(--brand-blue-strong);
  color: #ffffff;
  border-top: 1px solid var(--line);
  text-align: center;
}

@media (max-width: 1080px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    width: 100%;
    padding: 0 0 14px;
    justify-content: flex-start;
  }

  .nav-links.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-more {
    display: grid;
  }

  .more-toggle {
    width: 100%;
    text-align: left;
  }

  .more-menu {
    position: static;
    min-width: 0;
    margin-top: 4px;
    box-shadow: none;
    background: var(--surface);
  }

  .grid,
  .two-col,
  .countdown-section,
  .admin-list {
    grid-template-columns: 1fr;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 680px;
  }
}

@media (max-width: 560px) {
  h1 { font-size: 2.25rem; }
  .page-hero h1 { font-size: 2rem; }
  .slide h3 { font-size: 1.5rem; }
  .section {
    padding: 52px 0;
  }

  .hero-inner {
    padding: 64px 0 46px;
  }

  .nav-links.open {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    width: 86px;
    height: 86px;
  }

  .card,
  .form-panel {
    padding: 18px;
  }

  .countdown-grid span {
    min-height: 88px;
  }
}

/* Shared accessibility and layout corrections. */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--rose-ink); outline-offset: 3px; }
body { overflow-wrap: anywhere; }
button, select { font: inherit; }
input, textarea, select, .button { font-family: var(--control-font); color: var(--ink); }
.button { color: var(--surface); font-weight: 600; }
.button.secondary, .google-button { color: var(--ink); }
.countdown-grid strong { font-family: var(--accent-font); font-weight: 700; }
.countdown-grid span { border-width: 1px; border-radius: 14px; background: var(--brand-blue-tint); }
.brand { font-weight: 600; }
.theme-link { min-height: 188px; background: var(--surface); border-width: 1px; border-radius: 14px; box-shadow: var(--shadow); }
.theme-link:hover { background: var(--surface); }
.admin-page .page-hero, .contest-heading { border-bottom-color: var(--line); }
.admin-view-tabs button[aria-pressed="true"], .review-tabs button[aria-pressed="true"] { background: var(--rose); }
.admin-item.status-approved, .admin-item.status-rejected, .admin-item.status-pending { border-top-width: 2px; }
.voter-bar { background: var(--tea); padding-inline: 16px; }
.form-panel { box-shadow: var(--shadow); }
.hero h1 { font-weight: 900; text-shadow: 0 3px 18px rgba(7, 47, 74, .52); }
.hero .eyebrow { color: #fff2e4; }
.hero-subtitle { font-weight: 700; }
.hero-meta span { backdrop-filter: blur(7px); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
select { max-width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
input[type="checkbox"] { accent-color: var(--green); width: 18px; height: 18px; flex: 0 0 18px; }
.nav .brand { flex-shrink: 0; }
.section .eyebrow, .page-hero .eyebrow { color: var(--accent); }
.hero .eyebrow { color: #ffe2a8; }
.two-col > *, .grid > * { min-width: 0; }
.text-link { color: var(--rose-ink); text-underline-offset: 4px; font-weight: 700; }
.muted { color: var(--muted); font-weight: 500; }
.preserve-lines, .work-caption { white-space: pre-wrap; }
.button { gap: 8px; font-size: .94rem; }
.button.secondary:hover { background: var(--rose); }
.button:disabled { cursor: not-allowed; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--surface); color: var(--ink); }
.skip-link:focus { top: 12px; }
.empty-state { grid-column: 1 / -1; padding: 44px 20px; text-align: center; color: var(--muted); border-block: 1px solid var(--line); }
.empty-state h2, .empty-state h3 { color: var(--ink); }
.notice { padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--tea); }
.status-chip { display: inline-block; padding: 3px 9px; border-radius: 4px; background: var(--rose); color: var(--rose-ink); font-size: .82rem; font-weight: 700; }
.admin-page .page-hero { padding: 36px 0 10px; border-bottom: 1px solid var(--line); }
.admin-page .page-hero h1 { font-size: 2rem; }
.admin-page .section { padding-top: 20px; }
.admin-page .admin-toolbar { align-items: center; }
.admin-toolbar .button { margin-top: 0; }
.admin-toolbar h2 { margin-right: auto; font-size: 1.35rem; }
.admin-view-tabs, .review-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-view-tabs { margin-right: auto; }
.admin-view-tabs button, .review-tabs button { padding: 11px 16px; background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; }
.admin-view-tabs button[aria-pressed="true"], .review-tabs button[aria-pressed="true"] { border-bottom-color: var(--green); color: var(--green-dark); font-weight: 700; }
.review-tabs span { margin-left: 5px; font-variant-numeric: tabular-nums; }
.admin-list { display: block; }
.admin-status-column { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.admin-status-column > h2 { grid-column: 1 / -1; position: static; background: transparent; border: 0; padding: 0 0 8px; font-size: 1.15rem; }
.admin-status-column .admin-item { box-shadow: none; }
.admin-item h3 { font-size: 1.2rem; }
.contest-heading { display: grid; grid-template-columns: 1fr 240px; align-items: center; gap: 30px; border-bottom: 1px solid var(--line); padding-top: 32px; }
.contest-heading h1 { font-size: 2.5rem; }
.contest-heading-image { width: 240px; height: 150px; object-fit: cover; border-radius: 3px; }
.contest-content { padding-top: 24px; }
.contest-grid, .works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.contest-card { display: block; overflow: hidden; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.contest-card > img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.contest-card > div { padding: 20px; }
.contest-card h2 { font-size: 1.4rem; }
.contest-card p { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.contest-intro { padding: 24px 0; max-width: 780px; }
.contest-intro h2 { font-size: 2rem; }
.voter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 16px 0; border-block: 1px solid var(--line); }
.voter-bar > span { margin-right: auto; }
.voter-bar .button { margin: 0; }
.voter-bar strong { font-variant-numeric: tabular-nums; color: var(--accent); }
.works-toolbar { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin: 30px 0 20px; }
.works-toolbar h2 { margin: 0 auto 0 0; font-size: 1.35rem; }
.works-toolbar label { margin: 0; font-size: .95rem; }
.sort-control { display: flex; align-items: center; gap: 8px; }
.work-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.work-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.work-photo { display: block; padding: 0; border: 0; width: 100%; aspect-ratio: 4/3; background: var(--tea); cursor: zoom-in; }
.work-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.work-body { display: flex; flex-direction: column; padding: 20px; flex: 1; }
.work-body h3 { margin: 8px 0; font-size: 1.25rem; }
.work-caption { margin: 0 0 18px; color: var(--muted); font-size: .94rem; }
.work-vote { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: .87rem; }
.work-vote .button { margin: 0; flex-shrink: 0; }
.photo-dialog { width: min(1000px, 95vw); padding: 16px; border: 0; border-radius: 4px; background: var(--surface); }
.photo-dialog::backdrop { background: rgba(10, 20, 25, .8); }
.photo-dialog img { display: block; margin: auto; max-height: 75vh; object-fit: contain; }
.photo-dialog p { margin-bottom: 0; text-align: center; }
.dialog-close { float: right; width: 44px; height: 44px; border: 0; font-size: 2rem; background: var(--surface); cursor: pointer; }
.submission-details { padding: 20px 0; border-bottom: 1px solid var(--line); }
.submission-details > summary { color: var(--green); font-weight: 700; cursor: pointer; padding: 8px 0; }
.contest-form { max-width: 820px; padding: 10px 0 24px; }
.contest-form .admin-toolbar { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.form-grid > div { min-width: 0; }
.contest-table { border-top: 1px solid var(--line); }
.contest-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contest-row img { width: 96px; height: 76px; object-fit: cover; border-radius: 4px; }
.contest-row h3 { margin: 6px 0; font-size: 1.25rem; }
.contest-row p { margin: 0; }
.contest-row .button { margin: 0; }
.editor-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin: 16px 0; }
.editor-heading h2 { font-size: 1.5rem; }
.entries-admin { padding-top: 24px; border-top: 1px solid var(--line); }
.entry-review-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.entry-review-row img { width: 220px; aspect-ratio: 4/3; object-fit: contain; background: var(--tea); border-radius: 4px; }
.entry-review-row h3 { margin: 6px 0; }
.entry-review-row textarea { min-height: 76px; }
.entry-review-row .admin-toolbar { margin-top: 14px; }
.import-panel { padding: 20px 0; margin-bottom: 24px; border-block: 1px solid var(--line); }
.import-panel select { width: 100%; }
@media (max-width: 1080px) {
  .nav { padding-right: 16px; gap: 12px; }
  .nav-links.open { max-height: calc(100dvh - 90px); overflow-y: auto; }
  .hero h1 { font-size: 3.25rem; }
  .works-grid, .contest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .interaction-section .grid { grid-template-columns: 1fr; }
  .admin-status-column, .works-grid, .contest-grid, .form-grid { grid-template-columns: 1fr; }
  .contest-heading { grid-template-columns: 1fr; gap: 12px; padding-top: 24px; }
  .contest-heading-image { width: 100%; height: 140px; }
  .contest-heading h1, .contest-intro h2 { font-size: 1.8rem; }
  .contest-row { grid-template-columns: 72px 1fr; gap: 14px; }
  .contest-row img { width: 72px; height: 64px; }
  .contest-row .button { grid-column: 2; justify-self: start; }
  .entry-review-row { grid-template-columns: 1fr; }
  .entry-review-row img { width: 100%; max-height: 280px; }
  .works-toolbar { gap: 14px; }
  .works-toolbar h2 { flex-basis: 100%; }
  .voter-bar { gap: 10px; }
  .admin-view-tabs { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 2.25rem; }
  .hero { min-height: 680px; }
  .brand { font-size: .9rem; gap: 6px; }
  .nav { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Interactive activities */
.interaction-hero {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.interaction-hero h1 { max-width: 720px; }
.interaction-shell { padding-top: 34px; }
.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.activity-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  min-height: 230px;
  padding: 26px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--rose-ink);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}
.activity-card:hover { transform: translateY(-3px); border-color: var(--rose-ink); }
.activity-card h2 { margin: 6px 0 10px; font-size: 1.45rem; }
.activity-card p:last-child { color: var(--muted); }
.activity-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--rose-ink);
  border-radius: 50%;
  background: var(--rose);
  color: var(--rose-ink);
  font-size: .88rem;
  font-weight: 700;
}
.activity-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  padding: 34px 0 28px;
}
.activity-heading h1 { margin: 8px 0 10px; font-size: 2.6rem; }
.activity-heading > div > p:last-child { max-width: 760px; color: var(--muted); }
.activity-dates { display: flex; gap: 28px; margin: 0; }
.activity-dates div { min-width: 100px; border-top: 1px solid var(--line); padding-top: 10px; }
.activity-dates dt { color: var(--muted); font-size: .82rem; }
.activity-dates dd { margin: 3px 0 0; color: var(--green-dark); font-weight: 700; }
.member-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 36px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
}
.member-bar span { margin-right: auto; }
.member-bar .button { margin: 0; }
.interaction-compose {
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr);
  gap: 48px;
  align-items: start;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.interaction-compose h2, .board-toolbar h2 { font-size: 1.8rem; }
.compact-form { padding: 24px; }
.board-section { padding-top: 48px; }
.board-toolbar { display: flex; align-items: end; gap: 24px; margin-bottom: 24px; }
.board-toolbar > div { margin-right: auto; }
.board-toolbar label { min-width: 220px; margin: 0; }
.board-toolbar select { width: 100%; margin-top: 6px; }
.class-wall { columns: 3 300px; column-gap: 18px; }
.class-post {
  break-inside: avoid;
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.class-post-meta { display: flex; gap: 8px; align-items: center; color: var(--rose-ink); }
.class-post-meta span { color: var(--muted); }
.class-post h3 { margin: 10px 0; font-size: 1.25rem; }
.looking-for { padding: 10px 12px; border-left: 3px solid var(--gold); background: var(--tea); }
.reply-panel { margin-top: 16px; border-top: 1px solid var(--line); }
.reply-panel summary { padding-top: 14px; color: var(--green); font-weight: 700; cursor: pointer; }
.reply-panel form { margin-top: 16px; }
.reply-panel textarea { min-height: 90px; }
.reply-item { margin-top: 12px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.reply-item > span { margin-right: 8px; color: var(--rose-ink); font-size: .8rem; font-weight: 700; }
.reply-item p { margin: 4px 0; }
.prompt-strip { padding: 30px 0 44px; border-bottom: 1px solid var(--line); }
.prompt-strip > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.prompt-strip article { min-height: 150px; padding: 22px; background: var(--rose); border-top: 2px solid var(--rose-ink); }
.prompt-strip article span { color: var(--rose-ink); font-family: var(--accent-font); font-size: 1.5rem; }
.prompt-strip h2 { margin-top: 18px; font-size: 1.28rem; }
.mission-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-top: 8px; }
.mission-gallery article { border: 1px solid var(--line); background: var(--surface); }
.mission-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--tea); }
.mission-gallery article > div { padding: 18px; }
.footprint-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 54px; align-items: start; }
.taiwan-map { display: grid; justify-items: center; padding: 30px; background: var(--rose); text-align: center; }
.taiwan-map > p strong { display: block; color: var(--rose-ink); font-family: var(--accent-font); font-size: 4rem; line-height: 1; }
.taiwan-shape {
  position: relative;
  width: 230px;
  height: 400px;
  margin: 10px auto 26px;
  background: #d1b6a7;
  clip-path: polygon(54% 0, 69% 7%, 78% 21%, 75% 36%, 83% 49%, 70% 65%, 63% 79%, 48% 100%, 33% 89%, 27% 74%, 16% 61%, 24% 44%, 18% 28%, 31% 13%);
}
.map-mark { position: absolute; display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--surface); border-radius: 50%; background: var(--rose-ink); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(73,54,47,.18); }
.map-mark.north { top: 45px; left: 110px; }.map-mark.central { top: 155px; left: 80px; }.map-mark.south { top: 295px; left: 55px; }.map-mark.east { top: 205px; right: 35px; }
.region-bars { display: grid; gap: 9px; margin: 24px 0 34px; }
.region-bars > div { display: grid; grid-template-columns: 90px 1fr 30px; gap: 10px; align-items: center; }
.region-bars i { display: block; width: var(--size); height: 8px; background: var(--rose-ink); }
.region-bars strong { text-align: right; font-variant-numeric: tabular-nums; }
.footprint-form { max-width: 540px; }
.interaction-admin-row { grid-template-columns: 64px 1fr auto; }
.interaction-review-card { display: grid; grid-template-columns: minmax(0, 190px) 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.interaction-review-card > a img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--tea); }
.interaction-review-card textarea { min-height: 74px; }
.interaction-review-card .button { margin-top: 0; }

@media (max-width: 900px) {
  .activity-grid, .prompt-strip > div, .mission-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-heading, .interaction-compose, .footprint-layout { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .activity-grid, .prompt-strip > div, .mission-gallery { grid-template-columns: 1fr; }
  .activity-card { min-height: 0; padding: 20px; }
  .activity-heading h1 { font-size: 2rem; }
  .activity-dates { display: grid; grid-template-columns: 1fr 1fr; }
  .board-toolbar { display: grid; align-items: start; }
  .board-toolbar label { min-width: 0; }
  .class-wall { columns: 1; }
  .interaction-review-card { grid-template-columns: 1fr; }
  .taiwan-shape { transform: scale(.88); margin-block: -12px 0; }
}

/* Neixin emblem-based visual system */
h1, h2, h3 { font-weight: 700; }
.page-hero h1, .contest-heading h1, .activity-heading h1 { font-weight: 900; }
.site-header { box-shadow: 0 5px 20px rgba(3, 105, 161, 0.06); }
.brand { color: var(--brand-blue-strong); }
.brand img { border-radius: 50%; }
.menu-toggle { border-radius: 10px; border-color: #bfdbea; }
.nav-links a, .more-toggle { border-radius: 9px; }
.nav-links a:hover, .nav-links a[aria-current="page"], .more-toggle:hover, .nav-more.open .more-toggle {
  background: var(--brand-blue-tint);
  color: var(--brand-blue-strong);
}
.more-menu { box-shadow: 0 16px 36px rgba(3, 105, 161, .14); }
.section .eyebrow, .page-hero .eyebrow { color: var(--brand-blue); }
.hero .eyebrow { color: #fff0bd; }
.anniversary-number {
  display: inline-block;
  margin-inline: .08em;
  color: #ffe09a;
  font-family: var(--accent-font);
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(122, 76, 0, .45), 0 4px 18px rgba(0, 0, 0, .32);
}
.hero-subtitle {
  border-color: rgba(255, 255, 255, .48);
  border-radius: 12px;
  background: rgba(30, 41, 59, .76);
  color: #fff;
  box-shadow: 0 12px 30px rgba(7, 47, 74, .20);
}
.hero-meta span { color: #fff; }
.band { background: var(--brand-blue-tint); }
.card, .form-panel, .story-card, .admin-item, .contest-card, .work-card, .activity-card,
.class-post, .mission-gallery article, .taiwan-map, .prompt-strip article, .photo-dialog {
  border-radius: 14px;
}
.form-panel, .contest-card, .work-card, .activity-card, .class-post, .mission-gallery article {
  box-shadow: var(--shadow);
}
.button { box-shadow: 0 6px 16px rgba(3, 105, 161, .14); }
.button.secondary { box-shadow: none; }
.button.secondary:hover { background: #cfeafb; }
input:focus, textarea:focus, select:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(3, 105, 161, .12); outline: 0; }
input[type="checkbox"] { accent-color: var(--brand-blue); }
.form-status[data-type="success"] { color: var(--brand-green); }
.status-chip { background: var(--brand-blue-tint); color: var(--brand-blue-strong); }
.notice { background: var(--anniversary-gold-tint); border-left-color: var(--anniversary-gold); }
.text-link, .media-link { color: var(--brand-blue); }

.countdown-section {
  margin-top: 28px;
  margin-bottom: 28px;
  padding: 44px;
  border: 1px solid #d5e9f4;
  border-radius: 16px;
  background: linear-gradient(120deg, #ffffff, var(--brand-blue-tint));
  box-shadow: var(--shadow);
}
.countdown-grid { gap: 12px; }
.countdown-grid span {
  min-width: 104px;
  border-color: rgba(200, 155, 60, .58);
  background: #fff;
  color: var(--muted);
  box-shadow: 0 10px 22px rgba(3, 105, 161, .09);
}
.countdown-grid strong { color: var(--brand-blue-strong); font-size: 3.4rem; }

#about { align-items: stretch; }
#about > div:first-child { padding-block: 12px; }
.about-themes {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  border-top: 5px solid var(--brand-rose);
  background: linear-gradient(145deg, #fff 35%, var(--brand-rose-tint));
}
.about-themes .eyebrow { margin-top: 0; color: var(--brand-rose); }
.about-themes h3 { margin-bottom: 20px; font-size: 1.4rem; }
.theme-summary-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; padding: 0; list-style: none; }
.theme-summary-list li { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; min-width: 0; }
.theme-summary-list li > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-rose);
  border: 1px solid #f0bfd2;
  font-weight: 700;
}
.theme-summary-list strong, .theme-summary-list small { display: block; }
.theme-summary-list strong { color: var(--ink); }
.theme-summary-list small { color: var(--muted); line-height: 1.45; }

.interaction-section .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.theme-link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 220px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--theme-color, var(--brand-blue));
  transition: transform .2s ease, box-shadow .2s ease;
}
.theme-link:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(3, 105, 161, .15); }
.theme-link:nth-child(1) { --theme-color: var(--brand-blue); --theme-tint: var(--brand-blue-tint); }
.theme-link:nth-child(2) { --theme-color: var(--brand-rose); --theme-tint: var(--brand-rose-tint); }
.theme-link:nth-child(3) { --theme-color: var(--brand-green); --theme-tint: var(--brand-green-tint); }
.theme-link:nth-child(4) { --theme-color: var(--anniversary-gold); --theme-tint: var(--anniversary-gold-tint); }
.theme-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  padding: 11px;
  border-radius: 14px;
  background: var(--theme-tint);
  color: var(--theme-color);
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-link strong { color: var(--ink); font-size: 1.28rem; }
.theme-link span { line-height: 1.65; }
.admin-entry { text-align: right; }

.activity-card { border-top-color: var(--brand-rose); }
.activity-icon { border-color: var(--brand-rose); background: var(--brand-rose-tint); color: var(--brand-rose); }
.prompt-strip article { border-top-color: var(--brand-rose); background: var(--brand-rose-tint); }
.prompt-strip article span, .class-post-meta, .reply-item > span { color: var(--brand-rose); }
.taiwan-map { background: var(--brand-blue-tint); }
.taiwan-shape { background: #72c8e8; }
.map-mark { background: var(--brand-rose); }
.region-bars i { background: var(--brand-blue); }
.admin-view-tabs button[aria-pressed="true"], .review-tabs button[aria-pressed="true"] { background: var(--brand-blue-tint); border-bottom-color: var(--brand-blue); color: var(--brand-blue-strong); }

@media (max-width: 1080px) {
  .countdown-section { padding: 32px; }
  .interaction-section .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .countdown-section { margin-block: 16px; padding: 28px 20px; }
  .countdown-grid span { min-width: 0; }
  .theme-summary-list { grid-template-columns: 1fr; }
  .interaction-section .grid { grid-template-columns: 1fr; }
  .theme-link { min-height: 0; }
}

/* Theme content management */
.cms-admin-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cms-admin-row h3 { margin: 6px 0; }
.cms-admin-row p { margin: 0; color: var(--muted); }
.cms-admin-row .button { flex-shrink: 0; }
.cms-filter, .cms-editor-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cms-filter label { min-width: 180px; }
.cms-editor-top { justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.cms-editor-form fieldset { border: 0; border-bottom: 1px solid var(--line); padding: 20px 0 32px; margin: 0 0 24px; min-width: 0; }
.cms-editor-form legend { font-size: 1.3rem; font-weight: 700; color: var(--brand-blue-strong); }
.cms-editor-form label { display: block; }
.cms-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.cms-photo-grid > .empty-state { grid-column: 1 / -1; }
.cms-photo-edit { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.cms-photo-edit.is-hidden { border-style: dashed; background: #f0f2f4; }
.cms-photo-edit img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--brand-blue-tint); }
.cms-photo-edit input:not([type="checkbox"]):not([type="radio"]) { padding: 8px; }
.cms-photo-edit .check-row { display: flex; }
.cms-photo-tools { display: flex; gap: 8px; }
.cms-photo-tools button, .cms-gallery-controls button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--brand-blue-strong); cursor: pointer; font-size: 1.25rem; }
.cms-video-row { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.cms-actions { display: flex; gap: 12px; flex-wrap: wrap; padding: 16px 0; }
.cms-actions .button { margin: 0; }
.cms-event { padding: 16px 0 48px; border-bottom: 1px solid var(--line); margin-bottom: 32px; scroll-margin-top: 100px; }
.cms-event header { max-width: 820px; margin-bottom: 24px; }
.cms-event header h2 { font-size: 2rem; margin: 8px 0 16px; }
.cms-event header > p:last-child { color: var(--muted); }
.cms-gallery { background: #edf4f7; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cms-stage figure { margin: 0; }
.cms-stage button { width: 100%; aspect-ratio: 3 / 2; display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.cms-stage img { width: 100%; height: 100%; object-fit: contain; }
.cms-stage figcaption { min-height: 2.5em; padding: 8px 16px; text-align: center; }
.cms-gallery-controls { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 12px; }
.cms-gallery-controls span { min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.cms-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.cms-videos figure { margin: 0; }
.cms-videos iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.cms-preview { margin-top: 32px; border-top: 3px solid var(--brand-blue); }
[data-theme-content][hidden], [data-theme-fallback][hidden], .cms-stage figure[hidden] { display: none; }
@media (max-width: 1000px) { .cms-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 650px) {
  .cms-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cms-video-row, .cms-videos { grid-template-columns: 1fr; }
  .cms-admin-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .cms-event header h2 { font-size: 1.5rem; }
}

/* Interaction hub */
.interaction-section-heading,
.interaction-overview-heading,
.managed-activity-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.interaction-section-heading { margin-bottom: 22px; }
.interaction-section-heading h2,
.interaction-overview-heading h2,
.managed-activity-heading h2 { margin-bottom: 0; }
.interaction-section-heading .section-lead { margin: 8px 0 0; }
.interaction-section-heading .button { flex: 0 0 auto; margin: 0; }

.interaction-hero {
  background: var(--brand-blue-tint);
  border-bottom-color: #cce5f3;
}
.interaction-hero > p:not(.eyebrow) { max-width: 720px; }
.interaction-hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.interaction-hero-notes span {
  padding: 7px 12px;
  border: 1px solid #bcdceb;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--brand-blue-strong);
  font-size: .88rem;
  font-weight: 700;
}
.interaction-global-status {
  width: min(1120px, calc(100% - 40px));
  margin: 18px auto 0;
}
.interaction-global-status:empty { display: none; }
.interaction-overview { padding-top: 46px; }
.interaction-overview[hidden] { display: none; }
.interaction-overview-heading > p,
.managed-activity-heading > p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

.interaction-route-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.interaction-route {
  --route-color: var(--brand-blue);
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--route-color);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.interaction-route:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(3, 105, 161, .16);
}
.interaction-route > svg {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  padding: 9px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--route-color) 12%, white);
  stroke: var(--route-color);
  stroke-width: 1.8;
}
.interaction-route-label {
  color: var(--route-color);
  font-size: .82rem;
  font-weight: 700;
}
.interaction-route h3 { margin: 4px 0 8px; font-size: 1.45rem; }
.interaction-route p { margin: 0 0 20px; color: var(--muted); line-height: 1.65; }
.interaction-route > strong {
  margin-top: auto;
  color: var(--route-color);
  font-size: .94rem;
}
.interaction-route > strong span { display: inline-block; margin-left: 4px; }
.route-blessing { --route-color: var(--brand-rose); }
.route-memory { --route-color: var(--brand-blue); }
.route-story { --route-color: var(--brand-green); }
.route-vote { --route-color: #9a6b08; }

.managed-activity-heading {
  margin-top: 68px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}
.managed-activity-heading + [data-activity-list] { margin-top: 24px; }
.activity-card {
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: 260px;
  padding: 24px;
  border-top-width: 4px;
}
.activity-card h3 { margin: 12px 0 8px; font-size: 1.35rem; }
.activity-card p { margin: 0; }
.activity-card > div { display: flex; min-width: 0; flex-direction: column; }
.activity-icon {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 12px;
}
.activity-icon svg { width: 30px; height: 30px; stroke: currentColor; stroke-width: 1.8; }
.activity-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--brand-blue-strong) !important;
  font-size: .8rem;
  font-weight: 700;
}
.activity-phase {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-blue-tint);
}
.activity-phase.is-open { background: var(--brand-green-tint); color: var(--brand-green); }
.activity-phase.is-upcoming { background: var(--anniversary-gold-tint); color: #7a5405; }
.activity-phase.is-closed { background: #edf0f3; color: var(--muted); }
.activity-card-action { margin-top: auto; padding-top: 18px; color: var(--brand-blue); font-size: .9rem; }
.past-activities { margin-top: 28px; border-top: 1px solid var(--line); }
.past-activities summary {
  padding: 20px 0;
  color: var(--brand-blue-strong);
  font-weight: 700;
  cursor: pointer;
}
.past-activities .activity-grid { margin-top: 4px; }
.compact-empty { padding: 28px; border: 1px dashed #b9d5e5; background: var(--brand-blue-tint); }
.compact-empty h3 { margin: 0 0 6px; }
.compact-empty p { margin: 0; }

@media (max-width: 1080px) {
  .interaction-route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .interaction-route { min-height: 270px; }
}
@media (max-width: 760px) {
  .interaction-section-heading,
  .interaction-overview-heading,
  .managed-activity-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .interaction-hero-notes { display: grid; }
  .interaction-hero h1 span { display: block; }
  .interaction-route-grid { grid-template-columns: 1fr; }
  .interaction-route { min-height: 0; }
  .managed-activity-heading { margin-top: 48px; padding-top: 32px; }
  .activity-card { grid-template-columns: 48px minmax(0, 1fr); min-height: 0; padding: 20px; }
  .activity-icon { width: 48px; height: 48px; }
  .activity-icon svg { width: 26px; height: 26px; }
}
