:root {
  --ink: #16212a;
  --muted: #667581;
  --line: #dfe6e9;
  --panel: #ffffff;
  --page: #f5f7f7;
  --field: #fbfcfc;
  --card-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 250, 0.96));
  --subtle-panel: #f7f9f9;
  --warm-panel: #f8faf9;
  --notice-panel: #f3f7f6;
  --table-head: #f2f5f5;
  --navy: #203847;
  --sea: #2f6670;
  --gold: #b8965f;
  --gold-dark: #8b6f45;
  --red: #2f6670;
  --red-dark: #203847;
  --red-soft: #eef4f4;
  --shadow: 0 18px 48px rgba(21, 42, 54, 0.1);
}

body[data-theme="night"] {
  --ink: #eef3f3;
  --muted: #a8b6bb;
  --line: rgba(211, 224, 226, 0.18);
  --panel: #121b20;
  --page: #081014;
  --field: rgba(255, 255, 255, 0.08);
  --card-gradient: linear-gradient(180deg, rgba(22, 32, 38, 0.98), rgba(12, 20, 25, 0.96));
  --subtle-panel: rgba(255, 255, 255, 0.07);
  --warm-panel: rgba(255, 255, 255, 0.06);
  --notice-panel: rgba(255, 255, 255, 0.07);
  --table-head: rgba(255, 255, 255, 0.08);
  --navy: #e8f1f2;
  --sea: #7db7bd;
  --red: #7db7bd;
  --red-dark: #e8f1f2;
  --red-soft: rgba(125, 183, 189, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(47, 102, 112, 0.12), transparent 26rem),
    radial-gradient(circle at 88% 6%, rgba(184, 150, 95, 0.1), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 247, 247, 0.92)),
    url("assets/hero-ship.svg") center top / 1180px auto fixed,
    var(--page);
  transition: color 0.25s ease, background-color 0.25s ease;
}

body[data-theme="night"] {
  background:
    radial-gradient(circle at 12% 8%, rgba(125, 183, 189, 0.12), transparent 24rem),
    radial-gradient(circle at 88% 10%, rgba(184, 150, 95, 0.09), transparent 22rem),
    linear-gradient(180deg, rgba(8, 16, 20, 0.98), rgba(14, 25, 31, 0.9)),
    url("assets/hero-ship.svg") center top / 1180px auto fixed,
    var(--page);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(32, 56, 71, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 56, 71, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.72;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--field);
  outline: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

textarea {
  resize: vertical;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.admin-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  border-radius: 8px;
  padding: 22px 28px;
  color: #fff;
  background: linear-gradient(120deg, rgba(32, 56, 71, 0.96), rgba(47, 102, 112, 0.84));
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(20, 38, 49, 0.7), rgba(47, 102, 112, 0.24), rgba(255, 255, 255, 0.03)),
    url("assets/hero-ship.svg") right center / cover;
  box-shadow: 0 24px 72px rgba(21, 42, 54, 0.18);
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(16, 31, 41, 0.62), rgba(47, 102, 112, 0.2), rgba(8, 28, 38, 0.02)),
    linear-gradient(180deg, rgba(245, 248, 248, 0.08), rgba(16, 31, 41, 0.14));
  pointer-events: none;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.14), transparent 15rem),
    radial-gradient(circle at 88% 16%, rgba(184, 150, 95, 0.14), transparent 12rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent 42%);
}

.festive-string,
.chinese-knot,
.photo-festive-corner {
  display: none;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.45s ease, transform 5s ease;
}

.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.festive-string {
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  z-index: 3;
  height: 68px;
  pointer-events: none;
  border-top: 2px solid rgba(255, 226, 143, 0.82);
}

.festive-string span {
  position: absolute;
  top: 0;
  width: 34px;
  height: 42px;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(180deg, #ffdf75, #cf2636 36%, #9e1424);
  box-shadow: 0 10px 28px rgba(93, 9, 22, 0.34);
}

.festive-string span::before {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 2px;
  height: 12px;
  content: "";
  background: rgba(255, 226, 143, 0.9);
}

.festive-string span::after {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 2px;
  height: 16px;
  content: "";
  background: #ffdf75;
  box-shadow: -5px 3px 0 #ffdf75, 5px 3px 0 #ffdf75;
}

.festive-string span:nth-child(1) {
  left: 4%;
}

.festive-string span:nth-child(2) {
  left: 48%;
}

.festive-string span:nth-child(3) {
  right: 4%;
}

.chinese-knot {
  position: absolute;
  z-index: 3;
  width: 74px;
  height: 98px;
  pointer-events: none;
  opacity: 0.9;
}

.chinese-knot::before {
  position: absolute;
  left: 15px;
  top: 8px;
  width: 44px;
  height: 44px;
  content: "";
  border: 5px solid #f2c258;
  border-radius: 10px;
  background:
    linear-gradient(45deg, transparent 44%, #c51f2f 45% 55%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, #c51f2f 45% 55%, transparent 56%),
    #b91629;
  transform: rotate(45deg);
  box-shadow: 0 10px 26px rgba(80, 12, 18, 0.28);
}

.chinese-knot::after {
  position: absolute;
  left: 34px;
  top: 58px;
  width: 5px;
  height: 34px;
  content: "";
  background: #f2c258;
  box-shadow: -10px 8px 0 #f2c258, 10px 8px 0 #f2c258;
}

.knot-left {
  left: 22px;
  top: 84px;
}

.knot-right {
  right: 22px;
  top: 84px;
  transform: scaleX(-1);
}

.hero.has-uploaded-background .hero-background {
  opacity: 1;
  transform: scale(1);
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 28px;
}

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

.language-select {
  width: auto;
  min-width: 104px;
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 850;
}

.theme-toggle {
  min-width: 82px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 850;
}

.language-select option {
  color: var(--ink);
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  padding: 3px;
  box-shadow: 0 14px 34px rgba(14, 30, 39, 0.18);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #fff;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.08;
  text-shadow: 0 2px 14px rgba(8, 22, 30, 0.32);
}

.brand span {
  margin-top: 5px;
  color: rgba(235, 243, 244, 0.94);
  font-size: clamp(18px, 2vw, 27px);
  font-weight: 900;
  line-height: 1.16;
  text-shadow: 0 2px 12px rgba(8, 22, 30, 0.28);
}

.nav-link,
.primary-link,
.primary-btn,
.export-btn {
  border: 1px solid rgba(32, 56, 71, 0.12);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #203847, #2f6670);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(21, 42, 54, 0.14);
}

.nav-link {
  padding: 10px 16px;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 690px;
  padding: 86px 28px 42px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #d6c4a2;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}

.title-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: clamp(42px, 7vw, 66px);
  height: clamp(42px, 7vw, 66px);
  place-items: center;
  margin-top: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.title-icon svg {
  width: 72%;
  height: 72%;
  fill: #d6c4a2;
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 1.5;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-link,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  text-decoration: none;
}

.secondary-btn,
.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.event-panel,
.plan-card,
.photo-card,
.admin-card,
.registration-card,
.summary-card,
.list-card,
.public-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    var(--card-gradient),
    var(--panel);
  box-shadow: var(--shadow);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}

.event-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: -54px 24px 28px;
  position: relative;
  z-index: 2;
}

.event-panel div {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 20px;
  background:
    var(--card-gradient),
    var(--panel);
  transition: background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.event-panel span,
label span,
.stats-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.event-panel strong {
  color: var(--red-dark);
  font-size: 18px;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 0.9fr;
  gap: 18px;
  margin-bottom: 24px;
}

.plan-card {
  padding: 22px;
}

.milestone-list,
.agenda-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.milestone-list li,
.agenda-list div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle-panel);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.milestone-list {
  list-style: none;
}

.milestone-list time,
.agenda-list time {
  color: var(--red);
  font-weight: 900;
}

.milestone-list span,
.agenda-list span,
.family-card p {
  color: var(--muted);
  line-height: 1.62;
}

.family-card {
  background:
    var(--card-gradient),
    var(--panel);
}

.family-card p:last-child {
  margin-bottom: 0;
}

.photo-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at 12% 12%, rgba(47, 102, 112, 0.08), transparent 15rem),
    radial-gradient(circle at 88% 16%, rgba(184, 150, 95, 0.08), transparent 14rem),
    var(--card-gradient),
    var(--warm-panel);
}

.photo-memory-bg {
  position: absolute;
  inset: -34px;
  z-index: 0;
  width: calc(100% + 68px);
  height: calc(100% + 68px);
  object-fit: cover;
  opacity: 0;
  filter: blur(20px) saturate(0.92) contrast(0.96);
  transform: scale(1.04);
  transition: opacity 0.45s ease, transform 3.5s ease, filter 0.45s ease;
  pointer-events: none;
}

.photo-card.has-memory-background .photo-memory-bg {
  opacity: 0.26;
  transform: scale(1);
}

.photo-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 250, 0.78)),
    radial-gradient(circle at 18% 18%, rgba(47, 102, 112, 0.08), transparent 18rem),
    radial-gradient(circle at 86% 16%, rgba(184, 150, 95, 0.08), transparent 18rem);
  background-size: auto, auto, auto;
}

.photo-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.photo-festive-corner {
  position: absolute;
  top: 18px;
  z-index: 1;
  width: 54px;
  height: 72px;
  pointer-events: none;
}

.photo-festive-corner::before {
  position: absolute;
  inset: 8px 10px 24px;
  content: "";
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(180deg, #ffdc75, #d72336 42%, #9f1423);
  box-shadow: 0 10px 24px rgba(123, 24, 31, 0.22);
}

.photo-festive-corner::after {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 2px;
  height: 22px;
  content: "";
  background: #d72336;
  box-shadow: -7px 5px 0 #f0b94d, 7px 5px 0 #f0b94d;
}

.photo-festive-corner.left {
  left: 18px;
}

.photo-festive-corner.right {
  right: 18px;
}

.photo-card > *:not(.photo-memory-bg):not(.photo-stars):not(.photo-festive-corner) {
  position: relative;
  z-index: 1;
}

.photo-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}

.photo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--panel) 76%, transparent);
}

.photo-upload input {
  background: var(--field);
}

.photo-form .primary-btn {
  align-self: end;
}

.upload-progress {
  position: relative;
  grid-column: 1 / -1;
  overflow: hidden;
  min-height: 42px;
  border: 1px solid rgba(47, 102, 112, 0.24);
  border-radius: 8px;
  background: var(--notice-panel);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #203847, #2f6670 70%, #b8965f);
  transition: width 0.18s ease;
}

.upload-progress span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 6px rgba(8, 22, 30, 0.34);
}

.carousel {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  border-radius: 8px;
  border: 1px solid rgba(47, 102, 112, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 18rem),
    linear-gradient(135deg, #10212b, #203847 52%, #2f6670);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(21, 42, 54, 0.14);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.carousel figure {
  position: relative;
  min-height: 380px;
  margin: 0;
}

.carousel img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  display: block;
  background: #0b2530;
}

.carousel figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(5, 19, 25, 0.88));
}

.carousel figcaption span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.carousel-btn {
  z-index: 1;
  width: 40px;
  height: 40px;
  margin: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 30px;
  line-height: 1;
}

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

.photo-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(21, 42, 54, 0.06);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.photo-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.photo-tile figcaption {
  display: grid;
  gap: 3px;
  padding: 10px;
}

.photo-tile strong {
  color: var(--red-dark);
  font-size: 14px;
}

.photo-tile span {
  color: var(--muted);
  font-size: 12px;
}

.photo-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  border: 0;
  border-radius: 8px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--red);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  font-size: 12px;
  font-weight: 850;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.registration-card,
.photo-card,
.admin-card,
.summary-card,
.list-card,
.public-card {
  padding: 24px;
}

.admin-grid {
  display: grid;
  gap: 24px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stats-strip div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm-panel);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.stats-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stats-strip strong {
  color: var(--red);
  font-size: 28px;
}

.admin-photo-form {
  margin-bottom: 18px;
}

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

.section-head {
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

.wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.primary-btn,
.ghost-btn,
.export-btn {
  min-height: 46px;
  padding: 0 18px;
}

.ghost-btn {
  border-color: rgba(197, 31, 47, 0.22);
  color: var(--red-dark);
  background: var(--notice-panel);
}

.privacy-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.stats-grid div {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    var(--card-gradient),
    var(--warm-panel);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.stats-grid strong {
  color: var(--red);
  font-size: 34px;
  line-height: 1;
}

.notice {
  margin: 18px 0;
  padding: 16px;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: var(--notice-panel);
}

.notice p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.export-btn {
  width: 100%;
}

.export-menu {
  position: relative;
}

.export-menu summary {
  list-style: none;
  cursor: pointer;
}

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

.export-menu summary::after {
  content: "⌄";
  margin-left: 8px;
  font-size: 15px;
  transition: transform 0.2s ease;
}

.export-menu[open] summary::after {
  transform: rotate(180deg);
}

.export-menu .export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 46px;
}

.export-options {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(240, 185, 77, 0.45);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 16px 34px rgba(123, 24, 31, 0.14);
}

.export-options a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.export-options a:hover,
.export-options a:focus-visible {
  border-color: rgba(197, 31, 47, 0.45);
  box-shadow: 0 10px 22px rgba(197, 31, 47, 0.14);
  transform: translateY(-1px);
}

.list-card {
  margin-top: 24px;
}

.public-card {
  margin-top: 24px;
}

.public-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.funding-total {
  display: grid;
  gap: 6px;
  min-width: 210px;
  padding: 16px;
  border: 1px solid rgba(197, 31, 47, 0.24);
  border-radius: 8px;
  background: var(--notice-panel);
}

.funding-total span,
.funding-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.funding-total strong {
  color: var(--red);
  font-size: 30px;
}

.funding-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.funding-grid div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm-panel);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.funding-grid strong {
  color: var(--red);
  font-size: 26px;
}

.payment-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: var(--red-soft);
}

.payment-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.payment-note code {
  color: var(--navy);
  font-weight: 800;
}

.list-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.list-toolbar input {
  max-width: 300px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  background: var(--panel);
}

.public-table {
  min-width: 860px;
}

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

th {
  color: var(--muted);
  background: var(--table-head);
  font-size: 13px;
}

td {
  color: var(--ink);
  font-size: 14px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 8px;
  color: var(--sea);
  background: rgba(15, 118, 110, 0.1);
  font-weight: 800;
}

.badge.pending {
  color: #8a5a05;
  background: #fff2cd;
}

.badge.absent {
  color: var(--red);
  background: #fdecea;
}

.delete-btn {
  border: 1px solid #f0c9c4;
  border-radius: 8px;
  min-width: 48px;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--red);
  background: var(--red-soft);
  font-weight: 800;
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.pay-btn,
.confirm-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--navy);
  background: var(--panel);
  font-size: 12px;
  font-weight: 850;
}

.pay-btn.wechat {
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--sea);
  background: rgba(15, 118, 110, 0.1);
}

.pay-btn.alipay {
  border-color: rgba(37, 99, 235, 0.24);
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

.confirm-btn {
  border-color: rgba(200, 138, 47, 0.35);
  color: #8a5a05;
  background: var(--notice-panel);
}

.empty-state {
  display: none;
  margin: 16px 0 0;
  color: var(--muted);
}

.empty-state.show {
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 10;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: rgba(18, 51, 68, 0.95);
  box-shadow: var(--shadow);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body[data-theme="night"]::before {
  opacity: 0.24;
}

body[data-theme="night"] .hero::after {
  background:
    linear-gradient(90deg, rgba(19, 10, 16, 0.82), rgba(89, 14, 29, 0.5), rgba(8, 20, 28, 0.22)),
    linear-gradient(180deg, rgba(255, 226, 143, 0.08), rgba(10, 7, 12, 0.36));
}

body[data-theme="night"] .hero-background {
  opacity: 0.58;
  filter: saturate(1.08) brightness(0.72);
}

body[data-theme="night"] .event-panel,
body[data-theme="night"] .plan-card,
body[data-theme="night"] .photo-card,
body[data-theme="night"] .admin-card,
body[data-theme="night"] .registration-card,
body[data-theme="night"] .summary-card,
body[data-theme="night"] .list-card,
body[data-theme="night"] .public-card {
  border-color: rgba(240, 185, 77, 0.26);
}

body[data-theme="night"] .photo-card::before {
  opacity: 0.38;
}

body[data-theme="night"] .carousel {
  background:
    radial-gradient(circle at top left, rgba(240, 185, 77, 0.12), transparent 18rem),
    linear-gradient(135deg, #150b11, #4a1220 48%, #0f2530);
}

body[data-theme="night"] .badge.pending,
body[data-theme="night"] .confirm-btn {
  color: #ffe0a2;
}

body[data-theme="night"] .badge.absent {
  background: rgba(255, 90, 104, 0.13);
}

body[data-theme="night"] .language-select option {
  color: #17212b;
}

@media (hover: hover) and (pointer: fine) {
  .plan-card:hover,
  .photo-card:hover,
  .admin-card:hover,
  .registration-card:hover,
  .summary-card:hover,
  .list-card:hover,
  .public-card:hover {
    transform: translateY(-6px);
    border-color: rgba(240, 185, 77, 0.82);
    box-shadow: 0 28px 72px rgba(123, 24, 31, 0.24);
    filter: saturate(1.04);
  }

  .event-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(240, 185, 77, 0.82);
    box-shadow: 0 28px 72px rgba(123, 24, 31, 0.22);
  }

  .event-panel div:hover,
  .milestone-list li:hover,
  .agenda-list div:hover,
  .stats-grid div:hover,
  .stats-strip div:hover,
  .funding-grid div:hover,
  .photo-tile:hover,
  .carousel:hover {
    transform: translateY(-4px);
    border-color: rgba(197, 31, 47, 0.34);
    box-shadow: 0 18px 42px rgba(123, 24, 31, 0.16);
  }

  .photo-tile:hover img {
    transform: scale(1.025);
  }

  .photo-tile img {
    transition: transform 0.26s ease;
  }

  body[data-theme="night"] .plan-card:hover,
  body[data-theme="night"] .photo-card:hover,
  body[data-theme="night"] .admin-card:hover,
  body[data-theme="night"] .registration-card:hover,
  body[data-theme="night"] .summary-card:hover,
  body[data-theme="night"] .list-card:hover,
  body[data-theme="night"] .public-card:hover,
  body[data-theme="night"] .event-panel:hover {
    border-color: rgba(255, 226, 143, 0.72);
    box-shadow: 0 30px 82px rgba(0, 0, 0, 0.56);
  }

  body[data-theme="night"] .event-panel div:hover,
  body[data-theme="night"] .milestone-list li:hover,
  body[data-theme="night"] .agenda-list div:hover,
  body[data-theme="night"] .stats-grid div:hover,
  body[data-theme="night"] .stats-strip div:hover,
  body[data-theme="night"] .funding-grid div:hover,
  body[data-theme="night"] .photo-tile:hover,
  body[data-theme="night"] .carousel:hover {
    border-color: rgba(255, 226, 143, 0.42);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42);
  }
}

@media (max-width: 880px) {
  .app-shell,
  .admin-shell {
    width: min(100% - 20px, 720px);
    padding-top: 10px;
  }

  .hero {
    min-height: 580px;
  }

  .topbar,
  .admin-hero,
  .top-actions,
  .list-toolbar,
  .public-head {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-link,
  .list-toolbar input {
    max-width: none;
    text-align: center;
  }

  .brand {
    align-items: center;
    width: 100%;
  }

  .brand strong {
    font-size: 24px;
  }

  .brand span {
    font-size: 18px;
  }

  .hero-content {
    padding-top: 72px;
  }

  .event-panel,
  .plan-grid,
  .photo-head,
  .dashboard,
  .form-grid,
  .funding-grid,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .photo-form {
    grid-template-columns: 1fr;
  }

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

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

  .event-panel {
    margin-right: 12px;
    margin-left: 12px;
  }
}

@media (max-width: 520px) {
  body {
    background-size: 760px auto;
  }

  .app-shell,
  .admin-shell {
    width: 100%;
    padding: 0 0 32px;
  }

  .hero,
  .event-panel,
  .plan-card,
  .photo-card,
  .admin-card,
  .admin-hero,
  .registration-card,
  .summary-card,
  .list-card,
  .public-card {
    border-radius: 0;
  }

  .dashboard,
  .plan-grid,
  .photo-card,
  .admin-card,
  .list-card,
  .public-card {
    margin-right: 0;
    margin-left: 0;
  }

  .dashboard {
    gap: 14px;
  }

  .hero-content,
  .topbar,
  .admin-hero,
  .photo-card,
  .admin-card,
  .registration-card,
  .summary-card,
  .list-card,
  .public-card {
    padding-right: 18px;
    padding-left: 18px;
  }

  .photo-festive-corner {
    top: 10px;
    width: 40px;
    height: 56px;
    opacity: 0.82;
  }

  .photo-festive-corner.left {
    left: 8px;
  }

  .photo-festive-corner.right {
    right: 8px;
  }

  .photo-card h2 {
    padding-right: 42px;
    padding-left: 42px;
    text-align: center;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .event-panel {
    margin-top: -36px;
  }

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

  .carousel {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .carousel img {
    height: 300px;
  }

  .photo-wall {
    grid-template-columns: 1fr;
  }

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