:root {
  --cuit-blue: #0b5db5;
  --cuit-blue-dark: #06316d;
  --cuit-blue-deep: #041c3d;
  --cuit-sky: #eaf4ff;
  --cuit-cyan: #18b8d8;
  --gold: #f3b33d;
  --ink: #102a43;
  --muted: #5c7187;
  --line: #dbe8f5;
  --paper: #ffffff;
  --bg: #f5f9fe;
  --shadow: 0 18px 50px rgba(6, 49, 109, .12);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  color: #fff;
  background: var(--cuit-blue-dark);
  border-radius: 10px;
}

.skip-link:focus { top: 16px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--cuit-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.button:hover { transform: translateY(-2px); }
.button:focus-visible { outline: 3px solid rgba(24, 184, 216, .4); outline-offset: 3px; }
.button--primary { color: #fff; background: linear-gradient(135deg, var(--cuit-blue), var(--cuit-blue-dark)); box-shadow: 0 12px 26px rgba(11, 93, 181, .24); }
.button--primary:hover { box-shadow: 0 16px 32px rgba(11, 93, 181, .32); }
.button--outline { color: var(--cuit-blue-dark); background: #fff; border-color: var(--line); }
.button--outline:hover { border-color: var(--cuit-blue); }
.button--ghost { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); backdrop-filter: blur(8px); }
.button--ghost:hover { background: rgba(255, 255, 255, .2); }
.button--small { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.button--large { min-height: 54px; padding: 13px 28px; }
.button--full { width: 100%; }
.button[disabled] { cursor: not-allowed; opacity: .65; transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(219, 232, 245, .9);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand img { width: 46px; height: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: var(--cuit-blue-dark); font-size: 17px; }
.brand-text small { color: var(--muted); font-size: 12px; letter-spacing: .08em; }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--muted); font-size: 15px; font-weight: 600; }
.site-nav a:hover { color: var(--cuit-blue); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.nav-toggle span { display: block; height: 2px; margin: 4px 0; background: var(--cuit-blue-dark); border-radius: 2px; }
.mobile-nav { display: none; padding: 8px 20px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 12px 8px; color: var(--ink); font-weight: 700; }

.hero {
  position: relative;
  min-height: 680px;
  color: #fff;
  background: linear-gradient(120deg, rgba(4, 28, 61, .88), rgba(4, 28, 61, .5) 55%, rgba(6, 49, 109, .32)), url("assets/campus-photo.jpg") center / cover no-repeat;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(24, 184, 216, .36), transparent 68%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 96px 0 120px;
}

.hero .eyebrow { color: #9feaff; }
.hero h1 { margin: 0; font-size: clamp(40px, 7vw, 76px); line-height: 1.12; letter-spacing: -.04em; text-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.hero h1 em { color: #8ff0ff; font-style: normal; }
.hero-motto { margin: 18px 0 0; color: #f3c86a; font-size: clamp(18px, 2.6vw, 26px); font-weight: 800; letter-spacing: .18em; }
.hero-lead { max-width: 680px; margin: 22px 0 0; color: rgba(255, 255, 255, .88); font-size: clamp(16px, 2vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 48px 0 0;
  padding: 0;
}

.hero-stats div {
  min-width: 150px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.hero-stats dt { color: rgba(255, 255, 255, .72); font-size: 13px; }
.hero-stats dd { margin: 4px 0 0; color: #fff; font-size: 30px; font-weight: 800; line-height: 1; }
.hero-note { position: absolute; right: 22px; bottom: 20px; z-index: 2; margin: 0; color: rgba(255, 255, 255, .62); font-size: 12px; }

.section { padding: 92px 0; }
.section--write { background: linear-gradient(180deg, #fff, var(--bg)); }
.section--wall { background: var(--bg); }
.section--share { background: linear-gradient(135deg, var(--cuit-blue-dark), var(--cuit-blue) 60%, #0f7fc4); color: #fff; }
.section--about { padding-top: 72px; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-heading h2, .write-intro h2, .share-copy h2, .about-grid h2 { margin: 0; color: var(--cuit-blue-dark); font-size: clamp(28px, 4vw, 42px); line-height: 1.2; letter-spacing: -.02em; }
.section-heading p:not(.eyebrow), .write-intro p, .about-grid p { margin: 10px 0 0; color: var(--muted); }
.section--share .eyebrow, .section--share .share-copy h2 { color: #fff; }
.section--share .share-copy p { color: rgba(255, 255, 255, .82); }

.write-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 54px; align-items: start; }
.write-intro { position: sticky; top: 110px; }
.write-points { display: grid; gap: 14px; margin: 30px 0 0; padding: 0; list-style: none; }
.write-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.write-points span { flex: 0 0 auto; color: var(--cuit-blue); font-weight: 800; font-size: 13px; letter-spacing: .08em; }

.blessing-form {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 18px; }
.field > span, .upload-field legend { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14px; font-weight: 800; }
.field b { color: #d64b3f; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus { background: #fff; border-color: var(--cuit-blue); box-shadow: 0 0 0 4px rgba(11, 93, 181, .1); }
.field textarea { min-height: 150px; resize: vertical; }
.char-count { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; text-align: right; }

.upload-field { margin: 8px 0 20px; }
.upload-field legend small { color: var(--muted); font-weight: 400; }
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background: #f8fbff;
  border: 2px dashed #c5ddf3;
  border-radius: 16px;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.dropzone:hover, .dropzone.is-dragover { background: #eef7ff; border-color: var(--cuit-blue); transform: translateY(-1px); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; color: var(--cuit-blue); background: #e3f1ff; border-radius: 50%; font-size: 22px; font-weight: 800; }
.dropzone strong { color: var(--ink); font-size: 15px; }
.dropzone small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.dropzone--video .dropzone-icon { color: #fff; background: var(--cuit-blue); }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.photo-preview { position: relative; overflow: hidden; aspect-ratio: 1; background: #eaf4ff; border-radius: 12px; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview button, .video-preview button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: rgba(4, 28, 61, .72);
  border: 0;
  border-radius: 50%;
}
.video-preview { position: relative; margin-top: 12px; padding: 12px; color: var(--muted); background: #f8fbff; border: 1px solid var(--line); border-radius: 12px; }
.video-preview video { width: 100%; max-height: 240px; border-radius: 10px; background: #041c3d; }
.video-preview .video-name { margin-top: 8px; padding-right: 34px; font-size: 13px; }

.check-field { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 18px; color: var(--muted); font-size: 14px; }
.check-field input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--cuit-blue); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.form-status { min-height: 24px; margin-bottom: 8px; color: var(--cuit-blue); font-size: 14px; }
.form-status.is-error { color: #c0392b; }
.form-status.is-success { color: #14804a; }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.wall-heading-actions { display: flex; gap: 10px; }
.wall-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 30px rgba(6, 49, 109, .06); }
.search-field { position: relative; flex: 1 1 260px; }
.search-field svg { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; transform: translateY(-50%); }
.search-field input { width: 100%; min-height: 44px; padding: 10px 14px 10px 42px; background: #f8fbff; border: 1px solid var(--line); border-radius: 999px; outline: none; }
.search-field input:focus { background: #fff; border-color: var(--cuit-blue); box-shadow: 0 0 0 4px rgba(11, 93, 181, .1); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 8px 15px; color: var(--muted); background: #f8fbff; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; }
.chip:hover { color: var(--cuit-blue); border-color: #a9cff0; }
.chip.is-active { color: #fff; background: var(--cuit-blue); border-color: var(--cuit-blue); }
.sort-field { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.sort-field select { min-height: 40px; padding: 6px 30px 6px 12px; color: var(--ink); background: #f8fbff; border: 1px solid var(--line); border-radius: 10px; }
.wall-status { min-height: 24px; margin-bottom: 8px; color: var(--muted); font-size: 13px; }

.blessing-wall { columns: 3 320px; column-gap: 20px; }
.blessing-card {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(6, 49, 109, .07);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: cardIn .4s ease both;
}
.blessing-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(6, 49, 109, .12); }
.blessing-card.is-highlight { outline: 3px solid rgba(24, 184, 216, .4); }
.card-head { display: flex; align-items: flex-start; gap: 12px; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 46px; height: 46px; color: #fff; background: linear-gradient(135deg, var(--cuit-blue), var(--cuit-cyan)); border-radius: 50%; font-weight: 800; }
.card-person { min-width: 0; flex: 1; }
.card-name { color: var(--cuit-blue-dark); font-size: 16px; font-weight: 800; }
.card-meta { margin-top: 1px; color: var(--muted); font-size: 12px; }
.system-badge { flex: 0 0 auto; padding: 3px 8px; color: var(--cuit-blue); background: var(--cuit-sky); border-radius: 999px; font-size: 11px; font-weight: 800; }
.card-message { margin: 16px 0; color: var(--ink); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-media { display: grid; gap: 8px; margin: 14px 0; }
.card-media--1 { grid-template-columns: 1fr; }
.card-media--2 { grid-template-columns: 1fr 1fr; }
.card-media--3 { grid-template-columns: repeat(3, 1fr); }
.card-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.card-media--1 img { aspect-ratio: 4 / 3; }
.card-video { margin: 14px 0; }
.card-video video { width: 100%; max-height: 420px; border-radius: 12px; background: #041c3d; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.like-button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; color: var(--muted); background: #f8fbff; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; }
.like-button:hover { color: #d64b3f; border-color: #f0b4ae; }
.like-button.is-liked { color: #d64b3f; background: #fff1f0; border-color: #f0b4ae; }
.like-button .heart { font-size: 15px; line-height: 1; }
.card-foot time { color: var(--muted); font-size: 12px; }

.wall-empty { padding: 70px 20px; color: var(--muted); text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: 20px; }
.wall-empty__icon { font-size: 42px; }
.wall-empty h3 { margin: 10px 0 4px; color: var(--cuit-blue-dark); }
.wall-empty p { margin: 0 0 20px; }
.wall-more { margin-top: 24px; text-align: center; }

.share-card { display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: center; padding: 48px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 24px; }
.share-link { display: flex; gap: 10px; margin-top: 24px; }
.share-link input { flex: 1; min-width: 0; padding: 12px 14px; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .26); border-radius: 12px; outline: none; }
.share-tip { margin-top: 12px; color: rgba(255, 255, 255, .68); font-size: 12px; }
.share-qr { display: grid; place-items: center; width: 260px; height: 260px; padding: 10px; background: #fff; border-radius: 20px; box-shadow: 0 20px 40px rgba(0, 0, 0, .2); }
.share-qr img { width: 240px; height: 240px; border-radius: 12px; }
.qr-fallback { color: var(--muted); text-align: center; }
.qr-fallback span { display: block; color: var(--cuit-blue-dark); font-weight: 800; }
.qr-fallback small { font-size: 12px; }

.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.about-cards div { padding: 22px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 26px rgba(6, 49, 109, .06); }
.about-cards strong { display: block; color: var(--cuit-blue); font-size: 17px; }
.about-cards span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }

.site-footer { padding: 30px 0; color: rgba(255, 255, 255, .78); background: var(--cuit-blue-deep); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner strong { color: #fff; }
.footer-inner p { margin: 4px 0 0; font-size: 13px; }

.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 30px; background: rgba(4, 28, 61, .9); backdrop-filter: blur(10px); }
.lightbox[hidden] { display: none; }
.lightbox-content img, .lightbox-content video { max-width: min(100%, 1080px); max-height: 86vh; border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.lightbox-close { position: absolute; top: 22px; right: 24px; display: grid; place-items: center; width: 46px; height: 46px; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; font-size: 28px; line-height: 1; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 400; max-width: min(360px, calc(100% - 48px)); padding: 14px 18px; color: #fff; background: var(--cuit-blue-dark); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); }
.toast.is-error { background: #9d2c24; }
.toast.is-success { background: #16704a; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1040px) {
  .write-layout, .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .write-intro { position: static; }
  .share-card { grid-template-columns: 1fr; gap: 30px; }
  .share-qr { width: 220px; height: 220px; }
  .share-qr img { width: 200px; height: 200px; }
}

@media (max-width: 820px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .mobile-nav:not([hidden]) { display: block; }
  .container { width: min(var(--container), calc(100% - 28px)); }
  .section { padding: 68px 0; }
  .hero { min-height: 620px; }
  .hero-content { padding: 76px 0 100px; }
  .hero-stats div { min-width: 130px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .blessing-form { padding: 22px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .about-cards { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .hero {
    min-height: 580px;
    background-image: linear-gradient(120deg, rgba(4, 28, 61, .9), rgba(4, 28, 61, .58) 55%, rgba(6, 49, 109, .4)), url("assets/campus-photo-mobile.jpg");
  }
  .hero h1 { font-size: 38px; }
  .hero-actions .button { width: 100%; }
  .hero-stats { gap: 8px; }
  .hero-stats div { flex: 1; min-width: 0; padding: 12px; }
  .hero-stats dd { font-size: 24px; }
  .hero-note { display: none; }
  .blessing-wall { columns: 1; }
  .wall-toolbar { align-items: stretch; }
  .search-field { flex-basis: 100%; }
  .filter-chips { width: 100%; }
  .chip { flex: 1; text-align: center; }
  .sort-field { width: 100%; justify-content: space-between; }
  .share-card { padding: 28px; }
  .share-link { flex-direction: column; }
  .share-qr { margin: 0 auto; }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .toast { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}