/* AI优点放大镜 —— 班级优点星光墙 样式 */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #f5a623;
  --orange: #ff8a3d;
  --deep: #7a4a00;
  --cream: #fff8ec;
  --card: #ffffff;
  --pink: #ff6b81;
  --sky: #4aa3df;
  --shadow: 0 6px 18px rgba(190, 130, 30, .18);
}

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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 214, 102, .35), transparent 40%),
    radial-gradient(circle at 88% 92%, rgba(255, 158, 158, .25), transparent 45%),
    var(--cream);
  color: #5b4020;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶栏 ---------- */
.topbar {
  background: linear-gradient(120deg, #ffd86b, #ffb347);
  box-shadow: 0 3px 12px rgba(180, 110, 0, .25);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: #6b3f00;
  text-decoration: none;
  letter-spacing: 1px;
}
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a {
  text-decoration: none;
  color: #6b3f00;
  background: rgba(255, 255, 255, .55);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: all .15s;
}
.nav a:hover { background: #fff; }
.nav a.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(150, 90, 0, .25);
  color: #b35c00;
}

/* ---------- 主区域 ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 16px 40px;
}

h2.page-title {
  font-size: 24px;
  color: #6b3f00;
  margin-bottom: 6px;
}
.page-sub { color: #a0763c; margin-bottom: 20px; font-size: 15px; }

/* ---------- 星光墙 · 夜空 ---------- */
/* 整片天空撑满屏幕宽度，高度刚好一屏放下（笔记本不滚动） */
.sky {
  --skyw: min(calc(100vw - 24px), 1500px);
  position: relative;
  width: var(--skyw);
  margin-left: calc(50% - var(--skyw) / 2);
  height: calc(100vh - 130px);
  min-height: 470px;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(120% 85% at 50% 112%, rgba(255, 190, 90, .5), rgba(255, 150, 60, .16) 40%, transparent 66%),
    radial-gradient(circle at 84% 10%, rgba(130, 150, 255, .22), transparent 42%),
    linear-gradient(180deg, #161f4d 0%, #222b66 46%, #39347a 74%, #53407e 100%);
  box-shadow: 0 14px 40px rgba(70, 50, 120, .35);
}
.sky-head { position: absolute; top: 18px; left: 26px; right: 90px; pointer-events: none; z-index: 3; }
.sky-head h2 { font-size: 23px; color: #ffedb8; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.sky-head p { margin-top: 6px; font-size: 13.5px; color: rgba(255, 236, 190, .78); }
.sky-moon {
  position: absolute; top: 16px; right: 26px; font-size: 40px; z-index: 2;
  filter: drop-shadow(0 0 14px rgba(255, 240, 180, .8));
  animation: moon-float 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes moon-float {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(7px) rotate(-3deg); }
}
.sky-twinkles i {
  position: absolute; border-radius: 50%; background: #fff;
  animation: twinkle 3s ease-in-out infinite; pointer-events: none;
}
@keyframes twinkle {
  0%, 100% { opacity: .15; transform: scale(.8); }
  50% { opacity: .9; transform: scale(1.15); }
}
.shooting {
  position: absolute; top: 16%; left: -10%;
  width: 130px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #fff);
  transform: rotate(14deg); opacity: 0; pointer-events: none;
  animation: shoot 7.5s linear infinite;
}
@keyframes shoot {
  0% { opacity: 0; transform: translate(0, 0) rotate(14deg); }
  4% { opacity: .9; }
  16%, 100% { opacity: 0; transform: translate(70vw, 18vw) rotate(14deg); }
}
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* 星星活动的区域：避开顶部标题，整体往下放一点 */
.sky-stars { position: absolute; left: 0; right: 0; top: 104px; bottom: 24px; }
.sky-star {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--rot));
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-decoration: none; z-index: 2;
  transition: transform .18s, filter .18s;
}
.sky-star:hover {
  transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.13);
  filter: brightness(1.12);
  z-index: 4;
}
.star-orb {
  position: relative;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fffdf2, #ffe08a 58%, #ffb347);
  box-shadow: 0 0 16px 4px rgba(255, 214, 106, .6), 0 0 44px 14px rgba(255, 190, 80, .25);
}
.sky-star.lit .star-orb::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 130, .5), transparent 70%);
  animation: halo 3.2s ease-in-out infinite; animation-delay: var(--d);
  pointer-events: none;
}
@keyframes halo {
  0%, 100% { opacity: .35; transform: scale(.92); }
  50% { opacity: .85; transform: scale(1.06); }
}
/* 还没有优点的星星：暗星，虚线轮廓，等第一句赞美点亮 */
.sky-star:not(.lit) .star-orb {
  background: radial-gradient(circle at 35% 30%, #4d5894, #363f78 62%, #2b3268);
  border: 2px dashed rgba(255, 255, 255, .38);
  box-shadow: 0 0 10px rgba(150, 170, 255, .28);
}
/* 圆圈里直接写姓名：字号随名字长短自动适配，谁是谁一目了然 */
.star-face {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #6b3f00; line-height: 1.15;
  padding: 0 4px; text-align: center; white-space: nowrap;
}
.star-face.n2 { font-size: calc(var(--size) * .34); }
.star-face.n3 { font-size: calc(var(--size) * .28); }
.star-face.n4 { font-size: calc(var(--size) * .21); }
.star-face.n5 { font-size: calc(var(--size) * .16); letter-spacing: -.5px; }
.sky-star:not(.lit) .star-face { color: #ffe9bd; opacity: .92; }
.star-badge {
  position: absolute; right: -8px; bottom: -4px;
  background: linear-gradient(120deg, #ffd86b, #ffb347);
  color: #6b3f00; font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 2px 7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

/* ---------- 同学优点页 ---------- */
.back-link {
  display: inline-block;
  text-decoration: none;
  color: #a0763c;
  font-weight: 700;
  margin-bottom: 14px;
  font-size: 15px;
}
.back-link:hover { color: var(--orange); }

.student-head {
  background: linear-gradient(120deg, #fff, #fff4d9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.student-head h2 { font-size: 30px; color: #6b3f00; }
.student-head .motto { color: #a0763c; margin-top: 4px; font-size: 14px; }
.head-btn {
  margin-left: auto;
  border: none;
  background: linear-gradient(120deg, #ffd86b, #ffb347);
  color: #6b3f00;
  font-weight: 800;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(180, 110, 0, .3);
}
.head-btn:hover { filter: brightness(1.05); }

/* ---------- 闪光点 · 全页主角 ---------- */
.merit-showcase {
  background: linear-gradient(135deg, #fffdf7, #ffedc2);
  border: 2px solid #f5dfa8;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 30px 26px;
  margin: 0 0 26px;
  text-align: center;
  color: #a0763c;
  font-size: 15px;
  font-weight: 700;
}
.merit-tags-label {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #8a5a00;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.merit-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 11px 28px;
  margin: 5px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 3px;
}
/* 每个标签一种色调：蜜橙、桃粉、抹茶、天青、芋紫、薄荷，按顺序循环 */
.merit-tag.t0 { background: linear-gradient(120deg, #ffd86b, #ffb347); color: #6b3f00; box-shadow: 0 3px 10px rgba(180, 110, 0, .28); }
.merit-tag.t1 { background: linear-gradient(120deg, #ffc9d2, #ff9fb2); color: #8c3346; box-shadow: 0 3px 10px rgba(200, 80, 110, .25); }
.merit-tag.t2 { background: linear-gradient(120deg, #d3ecb6, #a9d889); color: #44641f; box-shadow: 0 3px 10px rgba(110, 150, 50, .25); }
.merit-tag.t3 { background: linear-gradient(120deg, #c3e2fa, #92c8f0); color: #28567e; box-shadow: 0 3px 10px rgba(60, 120, 180, .25); }
.merit-tag.t4 { background: linear-gradient(120deg, #e0d0f5, #bfa8ea); color: #553f85; box-shadow: 0 3px 10px rgba(120, 90, 180, .25); }
.merit-tag.t5 { background: linear-gradient(120deg, #c2ecdf, #8fd8c2); color: #1f6350; box-shadow: 0 3px 10px rgba(40, 140, 110, .25); }

/* ---------- 记录页 · 进门身份 ---------- */
.postcard-from .from-locked {
  background: #fff3d6;
  color: #6b3f00;
  font-weight: 800;
  font-size: 16px;
  border-radius: 12px;
  padding: 9px 18px;
  border: 2px solid #f0dcc0;
}
.postcard-from .from-locked.anon { color: #a0763c; }

/* ---------- 同学们的记录 · 弱化显示 ---------- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.entry-list-head {
  color: #b39b78;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.entry-row {
  background: rgba(255, 253, 247, .6);
  border: 1px solid #f3e7d2;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.entry-illust-mini { flex: none; line-height: 1.5; }
.entry-illust-mini .sticker { font-size: 22px; }
.entry-illust-mini img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}
.entry-main { flex: 1; min-width: 0; }
.entry-text {
  font-size: 14px;
  line-height: 1.65;
  color: #8a7658;
  font-weight: 500;
  word-break: break-word;
}
.entry-meta {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #c0ad8d;
  font-size: 12px;
  gap: 8px;
  flex-wrap: wrap;
}
.mini-btn {
  border: 1.5px solid #f0dcc0;
  background: #fffdf7;
  border-radius: 9px;
  padding: 3px 9px;
  font-size: 12px;
  cursor: pointer;
  color: #a0763c;
}
.mini-btn:hover { background: #fff3d6; }
.mini-btn.danger { color: #d05050; border-color: #f3caca; }
.mini-btn.danger:hover { background: #ffecec; }

/* ---------- 表单 ---------- */
.form-card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 26px;
  max-width: 620px;
  margin: 0 auto;
}
.form-card label {
  display: block;
  font-weight: 800;
  color: #6b3f00;
  margin: 18px 0 8px;
  font-size: 15px;
}
.form-card label:first-child { margin-top: 0; }
.form-card input[type="text"],
.form-card input[type="password"],
.form-card select,
.form-card textarea {
  width: 100%;
  font-size: 16px;
  padding: 11px 14px;
  border: 2px solid #f0dcc0;
  border-radius: 13px;
  font-family: inherit;
  background: #fffdf7;
  color: #4a3418;
  outline: none;
  transition: border-color .15s;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { border-color: var(--gold); }
.form-card textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

/* ---------- 进入密码：每台设备第一次打开页面 ---------- */
.entry-gate {
  position: relative;
  max-width: 560px;
  margin: 40px auto;
  padding: 54px 28px 42px;
  border-radius: 26px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 84% 12%, rgba(130, 150, 255, .25), transparent 42%),
    linear-gradient(180deg, #161f4d 0%, #222b66 55%, #39347a 100%);
  box-shadow: 0 14px 40px rgba(70, 50, 120, .35);
  animation: gateIn .5s ease both;
}
@keyframes gateIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.entry-gate .gate-twinkles i {
  position: absolute; border-radius: 50%; background: #fff;
  animation: twinkle 3s ease-in-out infinite; pointer-events: none;
}
.entry-gate .gate-moon {
  position: absolute; top: 16px; right: 22px; font-size: 38px;
  filter: drop-shadow(0 0 14px rgba(255, 240, 180, .8));
  animation: moon-float 7s ease-in-out infinite;
}
.entry-gate .gate-big {
  font-size: 64px; line-height: 1;
  filter: drop-shadow(0 0 18px rgba(255, 214, 106, .9));
  animation: gateStarPulse 2.4s ease-in-out infinite;
}
@keyframes gateStarPulse {
  0%, 100% { transform: scale(1) rotate(-4deg); }
  50% { transform: scale(1.12) rotate(4deg); }
}
.entry-gate h2 {
  color: #ffedb8; font-size: 26px; letter-spacing: 2px; margin-top: 14px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.entry-gate .gate-sub { color: rgba(255, 236, 190, .78); margin: 10px 0 24px; font-size: 14.5px; }
.entry-gate .gate-card {
  background: rgba(255, 252, 244, .97);
  border-radius: 18px;
  padding: 22px;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
.entry-gate .gate-card input {
  width: 100%;
  font-size: 20px;
  text-align: center;
  letter-spacing: 8px;
  padding: 12px 14px;
  border: 2px solid #f0dcc0;
  border-radius: 13px;
  font-family: inherit;
  background: #fffdf7;
  color: #4a3418;
  outline: none;
  transition: border-color .15s;
}
.entry-gate .gate-card input:focus { border-color: var(--gold); }
.entry-gate .gate-card .submit-btn { margin-top: 16px; }

.submit-btn {
  margin-top: 24px;
  width: 100%;
  border: none;
  background: linear-gradient(120deg, #ffb347, #ff8a3d);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  padding: 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(255, 138, 61, .4);
  letter-spacing: 2px;
}
.submit-btn:hover { filter: brightness(1.06); }
.submit-btn:disabled { opacity: .55; cursor: wait; }

.msg {
  margin-top: 14px;
  border-radius: 13px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14.5px;
  display: none;
}
.msg.ok { display: block; background: #e8f9e0; color: #2e7d32; }
.msg.err { display: block; background: #ffecec; color: #c62828; }

/* ---------- 记录优点 · 明信片 ---------- */
/* 明信片撑满页面内容区，宽屏窄屏都自适应 */
.postcard-form { max-width: 100%; margin: 0 auto; }
.postcard-form .submit-btn { max-width: 460px; margin: 24px auto 0; display: block; }
.postcard-form .msg { max-width: 460px; margin-left: auto; margin-right: auto; }
.postcard {
  position: relative;
  background: linear-gradient(165deg, #fffdf4 0%, #fff6e2 100%);
  border: 2px solid #ecd3a5;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(190, 130, 30, .22);
  padding: 26px 28px 20px;
}
/* 内圈虚线装饰框，像明信片的边纹 */
.postcard::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px dashed #e5c78f;
  border-radius: 10px;
  pointer-events: none;
}
/* 右上角邮票 */
.postcard-stamp {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 62px;
  height: 74px;
  background: #fff;
  border: 2px dashed #e0b96e;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 30px;
  transform: rotate(5deg);
  box-shadow: 0 2px 6px rgba(190, 130, 30, .22);
}
.postcard-stamp small { font-size: 9px; color: #b3801f; font-weight: 700; letter-spacing: 1px; }
/* 左上角：写给谁 */
.postcard-to, .postcard-from {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.postcard-to { padding-right: 96px; }
.postcard label {
  font-weight: 800;
  color: #6b3f00;
  font-size: 16px;
  white-space: nowrap;
}
.postcard select {
  flex: 1;
  font-size: 16px;
  padding: 9px 12px;
  border: 2px solid #f0dcc0;
  border-radius: 12px;
  background: #fffdf7;
  color: #4a3418;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.postcard select:focus { border-color: var(--gold); }
/* 中间：信纸正文（带横线，楷体更有手写信的感觉） */
.postcard-body { position: relative; margin: 22px 0 6px; }
.postcard-body textarea {
  width: 100%;
  min-height: 240px;
  border: none;
  outline: none;
  background: transparent;
  background-image: repeating-linear-gradient(transparent 0 33px, rgba(214, 178, 106, .35) 33px 34px);
  line-height: 34px;
  font-size: 18px;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #4a3418;
  padding: 0 6px;
  resize: vertical;
}
.postcard-body textarea::placeholder { color: #c9ab7c; }
/* 右下角：谁写的 */
.postcard-from { justify-content: flex-end; margin-top: 12px; }
.postcard-from select { flex: 0 1 220px; }
.postcard-note { text-align: center; color: #b8966a; font-size: 12.5px; margin-top: 14px; line-height: 1.7; }

/* 宽屏时信纸更高一点，比例更像明信片 */
@media (min-width: 900px) {
  .postcard { padding: 30px 38px 24px; }
  .postcard-body textarea { min-height: 300px; }
}

/* ---------- 寄出动画：信封收起飞出去 ---------- */
.send-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(84, 52, 6, .45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  opacity: 0;
  transition: opacity .3s;
}
.send-overlay.show { opacity: 1; }
.send-scene { position: relative; width: 260px; height: 240px; }
.send-group {
  position: absolute;
  inset: 0;
  animation: sendFly .8s cubic-bezier(.5, 0, .75, .4) 1.55s forwards;
}
/* 整个信封飞出去（先往后蓄一下力再冲出去） */
@keyframes sendFly {
  0%   { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
  12%  { transform: translate(-10px, 12px) rotate(-2deg) scale(1.03); opacity: 1; }
  100% { transform: translate(280px, -340px) rotate(16deg) scale(.25); opacity: 0; }
}
/* 信封正面 */
.send-envelope {
  position: absolute;
  left: 10px; bottom: 0;
  width: 240px; height: 150px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd86b, #ffb347);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
  z-index: 3;
}
/* 正面的 V 形折线 */
.send-envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(160, 95, 0, .2);
  clip-path: polygon(0 16%, 50% 70%, 100% 16%, 100% 30%, 50% 84%, 0 30%);
}
/* 信封盖：开局翻开朝上，等信滑进去后合下来 */
.send-flap {
  position: absolute;
  left: 10px; top: 90px;
  width: 240px; height: 88px;
  background: linear-gradient(180deg, #ffc94d, #ffb347);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: scaleY(-1);
  transform-origin: top center;
  z-index: 1;
  animation: sendFlapClose .5s ease-in 1s forwards;
}
@keyframes sendFlapClose {
  0%   { transform: scaleY(-1); z-index: 1; }
  30%  { transform: scaleY(-.2); z-index: 6; }
  100% { transform: scaleY(1); z-index: 6; }
}
/* 小明信片：从上方滑进信封里 */
.send-letter {
  position: absolute;
  left: 55px; top: 118px;
  width: 150px; height: 105px;
  background: linear-gradient(165deg, #fffdf4, #fff2cf);
  border: 2px solid #ecd3a5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
  z-index: 2;
  opacity: 0;
  animation: sendLetterIn .7s cubic-bezier(.3, .7, .4, 1) .15s forwards;
}
@keyframes sendLetterIn {
  0%   { transform: translateY(-210px) rotate(-5deg); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}
/* 飞出去瞬间的小星光 */
.send-sparkle {
  position: absolute;
  font-style: normal;
  font-size: 24px;
  opacity: 0;
  z-index: 7;
  animation: sendSparkle .7s ease-out forwards;
}
.send-sparkle.sp1 { left: -14px; top: 120px; animation-delay: 1.6s; }
.send-sparkle.sp2 { right: -18px; top: 92px; font-size: 28px; animation-delay: 1.75s; }
.send-sparkle.sp3 { left: 44%; top: 196px; animation-delay: 1.9s; }
@keyframes sendSparkle {
  0%   { opacity: 0; transform: scale(.2) translateY(0); }
  40%  { opacity: 1; transform: scale(1.15) translateY(-14px); }
  100% { opacity: 0; transform: scale(.6) translateY(-34px); }
}
/* 动画下方的提示语 */
.send-caption {
  color: #fff3d6;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  opacity: 0;
  animation: sendCaption .45s ease 2s forwards;
}
@keyframes sendCaption {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 进门动画：输完密码后星光墙点亮 ---------- */
.entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background:
    radial-gradient(120% 85% at 50% 112%, rgba(255, 190, 90, .4), rgba(255, 150, 60, .14) 40%, transparent 66%),
    linear-gradient(180deg, #10173d 0%, #1c2456 52%, #332f6e 100%);
  opacity: 0;
  transition: opacity .35s;
}
.entry-overlay.show { opacity: 1; }
.entry-overlay.hide { opacity: 0; pointer-events: none; transition: opacity .85s; }
.entry-stars i {
  position: absolute;
  font-style: normal;
  color: #ffe9bd;
  opacity: 0;
  text-shadow: 0 0 10px rgba(255, 220, 140, .9);
  animation: entryStarIn 1s ease both;
}
@keyframes entryStarIn {
  0%   { opacity: 0; transform: scale(.2) rotate(-40deg); }
  55%  { opacity: 1; transform: scale(1.3) rotate(8deg); }
  100% { opacity: .85; transform: scale(1) rotate(0); }
}
.entry-moon {
  position: absolute; top: 8%; right: 10%; font-size: 54px;
  filter: drop-shadow(0 0 18px rgba(255, 240, 180, .9));
  animation: entryMoonIn 1s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes entryMoonIn {
  from { opacity: 0; transform: translateY(-46px) rotate(24deg); }
  to   { opacity: 1; transform: none; }
}
.entry-bigstar {
  font-size: 96px;
  filter: drop-shadow(0 0 26px rgba(255, 214, 106, .95));
  animation: entryPop 1s cubic-bezier(.2, .8, .3, 1.15) .25s both;
}
@keyframes entryPop {
  0%   { opacity: 0; transform: scale(.1) rotate(-90deg); }
  70%  { opacity: 1; transform: scale(1.22) rotate(8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.entry-title {
  color: #ffedb8; font-size: 34px; font-weight: 800; letter-spacing: 6px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
  animation: entryRise .7s ease .55s both;
}
.entry-sub {
  color: rgba(255, 236, 190, .85); font-size: 15px; letter-spacing: 2px;
  animation: entryRise .7s ease .8s both;
}
@keyframes entryRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .entry-bigstar { font-size: 68px; }
  .entry-title { font-size: 23px; letter-spacing: 3px; }
  .entry-sub { font-size: 13px; padding: 0 20px; text-align: center; }
  .entry-moon { font-size: 40px; }
}

/* ---------- 空状态 / 引导 ---------- */
.empty-box {
  text-align: center;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 50px 24px;
  max-width: 520px;
  margin: 40px auto;
}
.empty-box .big { font-size: 60px; }
.empty-box h3 { color: #6b3f00; margin: 12px 0 8px; font-size: 20px; }
.empty-box p { color: #a0763c; line-height: 1.8; font-size: 15px; }

/* ---------- 管理页 ---------- */
.admin-section {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
}
.admin-section h3 { color: #6b3f00; margin-bottom: 12px; font-size: 18px; }
.admin-students { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-student-chip {
  background: #fff3d6;
  border-radius: 999px;
  padding: 7px 8px 7px 14px;
  font-weight: 700;
  color: #6b3f00;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.admin-student-chip .del {
  border: none;
  background: #ffd2d2;
  color: #c62828;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.admin-note { color: #b8966a; font-size: 13px; margin-top: 10px; line-height: 1.7; }

/* ---------- 提示浮层 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: #6b3f00;
  color: #ffe9bd;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  transition: all .25s;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
/* 窄屏（手机/竖屏平板）：星空改成一朵星星云，自然换行、可以滚动 */
@media (max-width: 720px) {
  .sky {
    --skyw: calc(100vw - 16px);
    height: auto;
    min-height: 0;
    padding: 108px 10px 30px;
  }
  .sky-stars {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 8px;
  }
  .sky-star { position: static !important; transform: rotate(var(--rot)) !important; }
  .sky-star:hover { transform: rotate(var(--rot)) scale(1.08) !important; }
  .constellation, .shooting { display: none; }
  .sky-head { left: 16px; top: 14px; right: 76px; }
  .sky-head h2 { font-size: 19px; }
  .sky-head p { font-size: 12px; }
  .sky-moon { font-size: 32px; top: 12px; right: 16px; }
}

@media (max-width: 640px) {
  .logo { font-size: 19px; }
  .nav a { font-size: 13.5px; padding: 6px 11px; }
  main { padding: 18px 12px 30px; }
  .student-head { padding: 20px; gap: 14px; }
  .student-head h2 { font-size: 24px; }
  .head-btn { margin-left: 0; width: 100%; text-align: center; }
  .merit-tag { font-size: 18px; padding: 9px 20px; }
  .postcard { padding: 20px 16px 14px; }
  .postcard-stamp { width: 48px; height: 58px; font-size: 22px; top: 12px; right: 12px; }
  .postcard-stamp small { display: none; }
  .postcard-to { padding-right: 66px; }
  .postcard-body textarea { min-height: 200px; font-size: 17px; }
  .postcard-from select { flex-basis: 160px; }
}
