:root {
  --paper: #fbf8f0;
  --paper-2: #f5efe4;
  --surface: #fffdf8;
  --surface-2: #f8f3ea;
  --ink: #25231f;
  --muted: #736c62;
  --faint: #a49a8d;
  --line: #d9d0c2;
  --line-strong: #2f2a24;
  --tea: #b7663c;
  --tea-dark: #8f4728;
  --moss: #4f7a5a;
  --moss-soft: #edf5ed;
  --indigo: #405e7c;
  --indigo-soft: #eef3f8;
  --gold: #c79a43;
  --gold-soft: #fbf1d7;
  --red: #a5483f;
  --red-soft: #fbebea;
  --star: #e6c96a;
  --shadow: 0 16px 42px rgba(52, 45, 36, .09);
  --serif: "Iowan Old Style", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(230, 201, 106, .22) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 9%, rgba(64, 94, 124, .18) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 78%, rgba(79, 122, 90, .15) 0 1px, transparent 2px),
    linear-gradient(135deg, var(--paper), #fffaf2 48%, #f8f0e4);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    linear-gradient(120deg, transparent 0 44%, rgba(64, 94, 124, .08) 44.15%, transparent 44.3% 100%),
    linear-gradient(58deg, transparent 0 68%, rgba(183, 102, 60, .08) 68.1%, transparent 68.25% 100%);
  background-size: 680px 680px, 520px 520px;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 240, .9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(47, 42, 36, .16);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.wrap,
.card,
.letter-panel,
.question,
.field,
.option {
  min-width: 0;
}

h1,
h2,
h3,
p,
label {
  overflow-wrap: anywhere;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
  text-decoration: none;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
  padding: 5px;
}

.logo-mark img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-mark::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  right: 6px;
  top: 7px;
  border-radius: 50%;
  background: var(--star);
  box-shadow: -20px 24px 0 rgba(230, 201, 106, .7), 12px 28px 0 rgba(79, 122, 90, .58);
}

.brand-title {
  min-width: 0;
}

.brand-title b {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-title span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}

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

.nav button {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
}

.nav button:hover,
.nav button.on {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.nav .admin-entry {
  opacity: 0;
}

main {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 22px 72px;
}

.narrow {
  max-width: 860px;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: rise .26s ease-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.status-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .78);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.status-pill.open {
  color: var(--moss);
  border-color: rgba(79, 122, 90, .35);
  background: var(--moss-soft);
}

.status-pill.warn {
  color: var(--tea-dark);
  border-color: rgba(183, 102, 60, .35);
  background: #fff1e8;
}

.status-pill.closed {
  color: var(--red);
  border-color: rgba(165, 72, 63, .35);
  background: var(--red-soft);
}

.chip.gold {
  color: #7b5b17;
  background: var(--gold-soft);
  border-color: rgba(199, 154, 67, .35);
}

.chip.indigo {
  color: var(--indigo);
  background: var(--indigo-soft);
  border-color: rgba(64, 94, 124, .24);
}

.chip.moss {
  color: var(--moss);
  background: var(--moss-soft);
  border-color: rgba(79, 122, 90, .28);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 34px;
  align-items: start;
}

.anniversary-banner {
  min-height: 310px;
  margin-bottom: 28px;
  border: 1px solid rgba(183, 102, 60, .22);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, .94), rgba(255, 253, 248, .62) 52%, rgba(255, 253, 248, .24)),
    url("./gallery/csight-12-banner.webp") center / cover no-repeat;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.anniversary-banner::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(216, 208, 194, .42);
  pointer-events: none;
}

.anniversary-copy {
  position: relative;
  z-index: 1;
  min-height: inherit;
  max-width: 860px;
  padding: 38px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.anniversary-copy h1 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--serif);
  color: #211e1a;
  line-height: .88;
}

.anniversary-copy h1 span {
  font-size: 44px;
  font-weight: 600;
}

.anniversary-copy h1 strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 168px;
  line-height: .78;
  color: #1f1b17;
  font-style: italic;
  font-weight: 800;
  text-shadow: 0 12px 0 rgba(183, 102, 60, .18), 0 2px 18px rgba(42, 35, 26, .14);
}

.anniversary-copy p {
  margin: 22px 0 0;
  max-width: 580px;
  color: #4d463d;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.8;
}

.letter-panel {
  background: rgba(255, 253, 248, .88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.letter-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(216, 208, 194, .42);
  pointer-events: none;
}

.letter-panel > * {
  position: relative;
}

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tea);
  margin-bottom: 10px;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
  font-weight: 600;
}

.letter-title {
  font-size: 42px;
  line-height: 1.12;
}

h2 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 600;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 650;
}

.sub {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 680px;
  font-size: 16px;
}

.letter-body {
  margin-top: 30px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.95;
  color: #302b25;
}

.letter-body p {
  margin: 0 0 17px;
}

.letter-body b {
  color: #2b2722;
}

.letter-section {
  border-top: 1px dashed rgba(183, 102, 60, .3);
  margin-top: 26px;
  padding-top: 22px;
}

.letter-section h2 {
  font-size: 25px;
  margin-bottom: 14px;
}

.letter-details summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  margin: -8px -10px 0;
  padding: 14px 16px;
  border: 1px solid rgba(183, 102, 60, .24);
  background: linear-gradient(135deg, rgba(255, 248, 239, .96), rgba(255, 253, 248, .74));
  box-shadow: 0 10px 28px rgba(183, 102, 60, .08);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.letter-details summary:hover,
.letter-details summary:focus-visible {
  border-color: rgba(183, 102, 60, .48);
  box-shadow: 0 14px 36px rgba(183, 102, 60, .14);
}

.letter-details summary:focus-visible {
  outline: 2px solid rgba(183, 102, 60, .34);
  outline-offset: 3px;
}

.letter-details summary::-webkit-details-marker {
  display: none;
}

.summary-title {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.18;
  font-weight: 600;
}

.summary-copy {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.summary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid rgba(183, 102, 60, .5);
  color: #fff;
  background: var(--tea);
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: 0 10px 24px rgba(183, 102, 60, .22);
  animation: summaryPulse 1.8s ease-in-out infinite;
}

.summary-action::after {
  content: "↓";
  font-size: 14px;
  line-height: 1;
}

.letter-details[open] .summary-action {
  color: var(--tea);
  background: #fff8ef;
  box-shadow: none;
  animation: none;
}

.letter-details[open] .summary-action::before {
  content: "收起内容";
}

.letter-details[open] .summary-action {
  font-size: 0;
}

.letter-details[open] .summary-action::before {
  font-size: 12px;
}

.letter-details[open] .summary-action::after {
  content: "↑";
  color: var(--tea);
  font-size: 14px;
}

@keyframes summaryPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 10px 24px rgba(183, 102, 60, .22);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(183, 102, 60, .34);
  }
}

@media (prefers-reduced-motion: reduce) {
  .summary-action {
    animation: none;
  }
}

.letter-detail-body {
  margin-top: 18px;
}

.line-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 0 14px;
  padding: 3px 9px;
  border: 1px solid rgba(64, 94, 124, .18);
  background: rgba(238, 243, 248, .72);
  color: var(--indigo);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.podcast-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid rgba(64, 94, 124, .16);
  background: rgba(255, 255, 255, .66);
  color: inherit;
  text-decoration: none;
}

.podcast-card:hover {
  border-color: rgba(183, 102, 60, .34);
  background: #fff8ef;
}

.podcast-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, .08);
}

.podcast-card span {
  display: grid;
  gap: 4px;
  line-height: 1.35;
}

.podcast-card b {
  color: #25231f;
}

.podcast-card small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
}

.letter-list {
  margin: 0 0 17px;
  padding-left: 1.2em;
}

.letter-list li {
  margin: 0 0 10px;
}

.hl {
  background: linear-gradient(transparent 58%, rgba(230, 201, 106, .38) 58%);
  padding: 0 2px;
}

.sig {
  margin-top: 28px;
  text-align: right;
  font-family: var(--serif);
  font-size: 17px;
}

.sig small {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: rgba(255, 253, 248, .9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card.flat {
  box-shadow: none;
  background: rgba(255, 253, 248, .72);
}

.card.is-disabled {
  opacity: .72;
}

.cta-card {
  border-color: rgba(183, 102, 60, .26);
  background: linear-gradient(180deg, #fff9f1, #fff3e8);
}

.cta-card h2 {
  font-size: 28px;
}

.mini-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.event-list {
  margin: 18px 0 0;
  display: grid;
  gap: 9px;
}

.event-list div {
  border-top: 1px solid rgba(216, 208, 194, .7);
  padding-top: 9px;
}

.event-list dt {
  font-size: 12px;
  color: var(--muted);
}

.event-list dd {
  margin: 2px 0 0;
  font-weight: 650;
}

.actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.actions.center {
  justify-content: center;
}

.actions.inline {
  margin: 0;
}

.btn {
  min-height: 42px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--tea);
  background: var(--tea);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 620;
  line-height: 1.2;
}

.btn:hover {
  background: var(--tea-dark);
  border-color: var(--tea-dark);
}

.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.secondary:hover {
  background: var(--paper-2);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.btn.ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, .55);
}

.btn.moss {
  background: var(--moss);
  border-color: var(--moss);
}

.btn.indigo {
  background: var(--indigo);
  border-color: var(--indigo);
}

.btn:disabled {
  opacity: .52;
  cursor: wait;
}

.plain-link {
  padding: 0;
  background: transparent;
  color: var(--indigo);
  cursor: pointer;
  text-decoration: underline;
}

.danger-link {
  color: #b23a30;
}

.star-map {
  min-height: 230px;
  border: 1px solid rgba(64, 94, 124, .22);
  background:
    radial-gradient(circle at 18% 24%, var(--star) 0 3px, transparent 4px),
    radial-gradient(circle at 42% 38%, rgba(79, 122, 90, .85) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 24%, rgba(199, 154, 67, .9) 0 3px, transparent 4px),
    radial-gradient(circle at 78% 72%, rgba(64, 94, 124, .72) 0 3px, transparent 4px),
    linear-gradient(128deg, transparent 0 24%, rgba(64, 94, 124, .16) 24.2%, transparent 24.7% 100%),
    linear-gradient(34deg, transparent 0 50%, rgba(183, 102, 60, .12) 50.2%, transparent 50.6% 100%),
    #fffaf2;
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.star-map::after {
  content: "2026 · Passion · Csight";
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 7px 10px;
  background: rgba(255, 253, 248, .86);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--indigo);
  letter-spacing: .04em;
}

.map-title {
  font-family: var(--serif);
  font-size: 23px;
  max-width: 260px;
  line-height: 1.25;
}

.map-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  max-width: 260px;
}

.city-map {
  min-height: 430px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.city-map::after {
  display: none;
}

.map-chart {
  position: relative;
  min-height: 285px;
  border: 1px solid rgba(64, 94, 124, .14);
  background:
    linear-gradient(112deg, transparent 0 38%, rgba(64, 94, 124, .08) 38.2%, transparent 38.8% 100%),
    linear-gradient(35deg, transparent 0 54%, rgba(79, 122, 90, .08) 54.2%, transparent 54.8% 100%),
    radial-gradient(circle at 76% 62%, rgba(230, 201, 106, .18), transparent 36%),
    rgba(255, 253, 248, .66);
  overflow: hidden;
}

.map-city-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 24px;
}

.map-city-list span {
  border: 1px solid rgba(79, 122, 90, .22);
  background: rgba(237, 245, 237, .72);
  color: var(--moss);
  padding: 3px 7px;
  font-size: 12px;
}

.pulse-card {
  background: #fbfdf8;
  border-color: rgba(79, 122, 90, .24);
  box-shadow: none;
}

.pulse-card h3 {
  font-family: var(--serif);
  font-size: 22px;
}

.pulse-list {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.pulse-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding-top: 9px;
  border-top: 1px solid rgba(216, 208, 194, .62);
}

.pulse-list b {
  color: var(--moss);
  font-size: 13px;
}

.pulse-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.gallery-card {
  padding: 12px;
  background: rgba(255, 253, 248, .9);
  border-color: rgba(64, 94, 124, .18);
  box-shadow: none;
}

.gallery-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 230px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.gallery-open {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  display: block;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 34px 16px 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .42);
  background: linear-gradient(180deg, rgba(24, 22, 20, 0), rgba(24, 22, 20, .74));
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-open img,
.gallery-lightbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-nav,
.gallery-light-nav,
.gallery-close {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(37, 35, 31, .62);
  color: #fff;
  cursor: pointer;
}

.gallery-nav {
  top: 50%;
  width: 34px;
  height: 46px;
  transform: translateY(-50%);
  font-size: 28px;
}

.gallery-prev {
  left: 8px;
}

.gallery-next {
  right: 8px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 18px;
  margin-top: 10px;
}

.gallery-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  background: rgba(115, 108, 98, .36);
  cursor: pointer;
}

.gallery-dots button.on {
  background: var(--tea);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(24, 22, 20, .86);
  display: grid;
  place-items: center;
  padding: 6vw;
}

.gallery-lightbox img {
  width: auto;
  height: auto;
  object-fit: contain;
  max-width: min(1100px, 100%);
  max-height: 86vh;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

.gallery-light-caption {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 2;
  width: min(900px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 12px 18px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  background: rgba(24, 22, 20, .68);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .24);
}

.gallery-close {
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  font-size: 28px;
}

.gallery-light-nav {
  top: 50%;
  width: 46px;
  height: 58px;
  transform: translateY(-50%);
  font-size: 34px;
}

.light-prev {
  left: 20px;
}

.light-next {
  right: 20px;
}

.progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 22px 0;
}

.step {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .75);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.step b {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}

.step.on {
  color: var(--ink);
  border-color: rgba(183, 102, 60, .45);
  background: #fff1e8;
}

.step.done {
  color: var(--moss);
  border-color: rgba(79, 122, 90, .35);
  background: var(--moss-soft);
}

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

.form-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stack-space {
  margin-top: 14px;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  padding: 10px 12px;
  outline: none;
  border-radius: 0;
  font-size: 16px;
}

textarea {
  resize: vertical;
  min-height: 108px;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--tea);
  box-shadow: 0 0 0 3px rgba(183, 102, 60, .12);
}

.mono {
  font-family: var(--mono);
}

.message {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
}

.message.error {
  background: var(--red-soft);
  border-color: rgba(165, 72, 63, .35);
  color: var(--red);
}

.message.ok {
  background: var(--moss-soft);
  border-color: rgba(79, 122, 90, .35);
  color: var(--moss);
}

.message.warn {
  background: #fff1e8;
  border-color: rgba(183, 102, 60, .32);
  color: var(--tea-dark);
}

.hidden {
  display: none !important;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.identity-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, #fffdf8, #f5efe4);
  border: 1px solid var(--line);
  padding: 16px;
  margin-bottom: 16px;
}

.avatar {
  width: 58px;
  height: 58px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  color: var(--tea);
  font-size: 25px;
  position: relative;
}

.avatar::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--star);
  position: absolute;
  right: 8px;
  top: 9px;
}

.match-panel {
  border: 1px solid rgba(64, 94, 124, .22);
  background: rgba(238, 243, 248, .62);
  padding: 18px;
  margin-bottom: 16px;
}

.match-panel h3 {
  font-family: var(--serif);
  font-size: 22px;
}

.match-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.match-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(64, 94, 124, .18);
  background: rgba(255, 253, 248, .86);
  padding: 12px;
}

.match-item b {
  display: block;
}

.match-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.match-item.new-member-choice {
  border-style: dashed;
  background: rgba(255, 250, 242, .72);
}

.identity-card h3 {
  font-family: var(--serif);
  font-size: 25px;
}

.identity-card .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.data-grid.compact .data-item {
  min-height: 66px;
}

.data-item {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .66);
  padding: 12px;
  min-height: 74px;
}

.data-item .k {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}

.data-item .v {
  font-size: 15px;
  word-break: break-word;
}

.question {
  border-top: 1px dashed var(--line);
  padding-top: 22px;
  margin-top: 22px;
}

.question.first {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.q-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--tea);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.question h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 11px 12px;
  cursor: pointer;
  min-height: 48px;
}

.option:hover {
  border-color: var(--tea);
  background: #fff8ef;
}

.option input {
  width: auto;
  min-height: 0;
  accent-color: var(--tea);
}

.option-other {
  align-items: center;
  flex-wrap: wrap;
}

.other-input {
  flex: 1 1 160px;
  min-width: 150px;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 14px;
  background: rgba(255, 253, 248, .9);
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.example-chips button {
  border: 1px solid rgba(64, 94, 124, .18);
  background: rgba(238, 243, 248, .72);
  color: var(--indigo);
  padding: 6px 9px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
}

.example-chips button:hover {
  border-color: rgba(183, 102, 60, .32);
  background: #fff8ef;
  color: var(--tea-dark);
}

.done-hero {
  text-align: center;
  padding: 44px 28px;
  background: rgba(255, 253, 248, .9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.done-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  border: 1.5px solid var(--moss);
  background: var(--moss-soft);
  display: grid;
  place-items: center;
  color: var(--moss);
  font-family: var(--serif);
  font-size: 38px;
  position: relative;
}

.done-mark::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--star);
  position: absolute;
  right: 12px;
  top: 12px;
}

.login-card {
  max-width: 480px;
  margin: 40px auto;
}

.admin-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-width: 0;
}

.admin-shell > * {
  min-width: 0;
}

.admin-side {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .86);
  box-shadow: var(--shadow);
  padding: 14px;
}

.admin-side .title {
  padding: 8px 10px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.admin-side .title b {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
}

.admin-side .title span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-nav button {
  width: 100%;
  min-height: 38px;
  text-align: left;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  cursor: pointer;
}

.admin-nav button:hover,
.admin-nav button.on {
  color: var(--ink);
  background: var(--indigo-soft);
  border-color: rgba(64, 94, 124, .22);
}

.admin-session-note {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding: 12px 10px 2px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.admin-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
  animation: rise .2s ease-out;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .88);
  padding: 16px;
  min-height: 112px;
}

.stat .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat .v {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  margin-top: 10px;
}

.stat .d {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}

.empty-state {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.table {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .84);
  overflow: auto;
  width: 100%;
  max-width: 100%;
}

.table-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.table-tools .btn {
  min-height: 44px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 600;
}

tr:hover td {
  background: #fff8ef;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.task {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.task b {
  display: block;
  margin-bottom: 3px;
}

.task span {
  font-size: 13px;
  color: var(--muted);
}

.csv-box {
  min-height: 220px;
  white-space: pre;
  overflow: auto;
}

@media (max-width: 900px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .anniversary-copy h1 strong {
    font-size: 132px;
  }

  .anniversary-copy h1 span {
    font-size: 38px;
  }

  .form-grid,
  .form-grid.two,
  .data-grid,
  .options,
  .stats,
  .task-list,
  .table-tools {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

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

  .identity-card {
    grid-template-columns: auto 1fr;
  }

  .identity-card .actions {
    grid-column: 1 / -1;
  }

  .letter-details summary {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .summary-action {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    padding: 14px;
    flex-wrap: wrap;
  }

  .nav {
    gap: 4px;
  }

  .nav button {
    padding: 7px 9px;
    font-size: 12px;
  }

  .wrap {
    padding: 22px 14px 56px;
  }

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

  .anniversary-banner {
    min-height: 270px;
  }

  .anniversary-copy {
    padding: 26px 22px;
  }

  .anniversary-copy h1 {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .anniversary-copy h1 strong {
    font-size: 92px;
    line-height: .82;
  }

  .anniversary-copy h1 span {
    font-size: 30px;
  }

  .anniversary-copy p {
    font-size: 16px;
    line-height: 1.72;
  }

  .letter-panel::before {
    inset: 10px;
  }

  .letter-title {
    font-size: 31px;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 26px;
  }

  .letter-body {
    font-size: 17px;
    line-height: 1.85;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .nav button {
    font-size: 12px;
    padding: 7px 9px;
    white-space: nowrap;
  }

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

  .btn {
    width: 100%;
  }

  .actions {
    align-items: stretch;
  }

  .brand-title b {
    font-size: 18px;
  }

  .gallery-lightbox {
    padding: 64px 14px;
  }

  .gallery-light-nav {
    width: 38px;
    height: 50px;
  }

  .light-prev {
    left: 10px;
  }

  .light-next {
    right: 10px;
  }
}
