:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --paper: #fffaf2;
  --ink: #13231d;
  --muted: #69736d;
  --line: #ded5c5;
  --green: #13231d;
  --rose: #ff5a2a;
  --gold: #f0aa42;
  --blue: #315f8c;
  --orange: #ff5a2a;
  --orange-deep: #d8431e;
  --cream: #fff6e7;
  --shadow: 0 18px 50px rgba(49, 50, 45, 0.12);
  --shadow-soft: 0 14px 36px rgba(31, 37, 40, 0.1);
  --shadow-lift: 0 22px 60px rgba(31, 37, 40, 0.16);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% 26%, rgba(255, 90, 42, 0.13), transparent 28%),
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(115deg, rgba(19, 35, 29, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 248, 236, 0.88), rgba(246, 240, 226, 0.94)),
    var(--bg);
  color: var(--ink);
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(216, 209, 197, 0.65);
  background: rgba(246, 243, 238, 0.78);
  backdrop-filter: blur(22px) saturate(1.12);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
  position: relative;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  transform: scaleX(0.45);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.brand:hover::after {
  transform: scaleX(1);
}

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

.nav a,
.ghost-button,
.primary-button {
  position: relative;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 9px 15px;
  border: 1px solid rgba(216, 209, 197, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 242, 0.64)),
    rgba(255, 250, 242, 0.72);
  color: var(--ink);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 6px 16px rgba(31, 37, 40, 0.06);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav a::before,
.ghost-button::before,
.primary-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.34) 42%, transparent 72%);
  opacity: 0;
  transform: translateX(-55%);
  transition: transform 0.34s ease, opacity 0.2s ease;
}

.nav a:hover::before,
.ghost-button:hover::before,
.primary-button:hover::before {
  opacity: 1;
  transform: translateX(55%);
}

.primary-button {
  border-color: rgba(31, 107, 93, 0.34);
  background:
    linear-gradient(135deg, rgba(31, 107, 93, 0.98), rgba(49, 95, 140, 0.94)),
    #1f6b5d;
  color: white;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 12px 28px rgba(31, 107, 93, 0.22);
}

.nav a:hover,
.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 107, 93, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 28px rgba(31, 37, 40, 0.11);
}

.primary-button:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 16px 34px rgba(31, 107, 93, 0.28);
}

.nav a:active,
.ghost-button:active,
.primary-button:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 6px rgba(31, 37, 40, 0.12),
    0 6px 14px rgba(31, 37, 40, 0.08);
}

.hero {
  min-height: calc(100vh - 75px);
  display: grid;
  align-items: center;
  padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(26px, 5vw, 68px);
  align-items: center;
}

.portrait {
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(19, 35, 29, 0.98), rgba(38, 62, 52, 0.9)),
    var(--green);
  box-shadow: var(--shadow-lift);
  color: white;
  font-size: clamp(76px, 12vw, 150px);
  font-weight: 900;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.hero-copy h1,
.admin-title h1 {
  margin: 12px 0 6px;
  font-size: clamp(64px, 10.5vw, 138px);
  line-height: 0.88;
  letter-spacing: 0;
  max-width: 860px;
  color: var(--ink);
  font-weight: 950;
}

.intro {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--ink);
  font-size: clamp(22px, 3.4vw, 42px);
  font-weight: 850;
  line-height: 1.22;
  text-wrap: balance;
}

.kicker {
  margin: 0;
  color: var(--orange);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
}

.hero-actions,
.contact-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  align-items: start;
}

.contact-card {
  display: grid;
  gap: 10px;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 250, 242, 0.86)),
    rgba(255, 250, 242, 0.86);
  border: 1px solid rgba(216, 209, 197, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 24px rgba(49, 50, 45, 0.08);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.pill::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  opacity: 0.42;
  transform: rotate(45deg);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.pill:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 107, 93, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 13px 30px rgba(31, 37, 40, 0.12);
}

.hero-actions .pill {
  background:
    linear-gradient(135deg, rgba(31, 107, 93, 0.98), rgba(49, 95, 140, 0.94)),
    #1f6b5d;
  border-color: rgba(31, 107, 93, 0.44);
  color: white;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 14px 32px rgba(31, 107, 93, 0.24);
}

.hero-actions .pill small {
  color: rgba(255, 255, 255, 0.78);
}

.pill:hover::after {
  opacity: 0.75;
  transform: rotate(45deg) translate(2px, -2px);
}

.pill small {
  color: var(--muted);
}

.qr-image,
.qr-placeholder {
  width: 152px;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 8px 24px rgba(49, 50, 45, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.contact-card:hover .qr-image,
.contact-card:hover .qr-placeholder {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.qr-image {
  display: block;
  object-fit: cover;
  padding: 8px;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(31, 107, 93, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(31, 107, 93, 0.09) 1px, transparent 1px),
    white;
  background-size: 14px 14px;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.7);
  backdrop-filter: blur(12px);
}

.stat {
  padding: clamp(22px, 4vw, 42px);
  border-right: 1px solid var(--line);
  transition: background 0.18s ease, transform 0.18s ease;
}

.stat:hover {
  background: rgba(255, 255, 255, 0.38);
  transform: translateY(-2px);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  color: var(--green);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.stat span,
.info-card h3,
.timeline-item h3 {
  display: block;
  margin-top: 10px;
  font-weight: 800;
  font-size: 20px;
}

.stat p,
.info-card p,
.timeline-item p,
.contact p,
.admin-title p {
  color: var(--muted);
  line-height: 1.7;
}

.content-wrap,
.updates,
.contact,
.admin-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 96px) 0;
}

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

.section-head h2,
.contact h2,
.editor-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0;
}

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

.info-card,
.editor-panel,
.repeat-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.82);
  box-shadow: var(--shadow-soft);
}

.info-card {
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  border-color: rgba(49, 95, 140, 0.35);
  box-shadow: var(--shadow-lift);
}

.info-card ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.7;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  transition: transform 0.18s ease, background 0.18s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
  background: rgba(255, 250, 242, 0.44);
}

.timeline-item time {
  color: var(--blue);
  font-weight: 800;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.admin-title {
  max-width: 760px;
  padding-bottom: 28px;
}

.admin-title h1 {
  font-size: clamp(42px, 7vw, 82px);
}

.admin-form {
  display: grid;
  gap: 18px;
}

.hidden {
  display: none !important;
}

.login-panel {
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.82);
  box-shadow: var(--shadow);
  padding: 24px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-error {
  min-height: 24px;
  margin: 0;
  color: var(--rose);
  font-weight: 700;
}

.editor-panel {
  padding: 22px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

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

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

input[type="file"] {
  padding: 10px;
  cursor: pointer;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-row input {
  flex: 1 1 260px;
}

.upload-row button {
  flex: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 107, 93, 0.14);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.repeat-list {
  display: grid;
  gap: 12px;
}

.repeat-item {
  position: relative;
  padding: 18px;
  padding-top: 52px;
  background: white;
}

.remove-button {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(178, 90, 84, 0.45);
  border-radius: 8px;
  color: var(--rose);
  background: #fff7f6;
  padding: 7px 10px;
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 12px 16px;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .site-header,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy h1,
  .admin-title h1 {
    font-size: clamp(54px, 18vw, 86px);
    line-height: 0.95;
  }

  .intro {
    font-size: clamp(22px, 7vw, 34px);
    line-height: 1.24;
  }

  .kicker {
    letter-spacing: 0.08em;
  }

  .hero-inner,
  .section-grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .contact-list {
    grid-template-columns: 1fr;
  }

  .portrait {
    width: min(310px, 100%);
    animation: none;
    transform: none;
  }

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

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .timeline-item,
  .form-grid,
  .repeat-item {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
