:root {
  --ink: #0e1a24;
  --steel: #1a3348;
  --rail: #243b53;
  --copper: #b08d57;
  --copper-bright: #d4b483;
  --mist: #e8eef3;
  --paper: #f4f1ec;
  --line: rgba(176, 141, 87, 0.35);
  --ok: #2f6f4e;
  --warn: #9a6b2f;
  --danger: #8b3a3a;
  --shadow: 0 16px 40px rgba(14, 26, 36, 0.12);
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-body: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --header-h: 64px;
  --footer-h: 44px;
  --page-pad-x: clamp(1.5rem, 4vw, 3.5rem);
  --rail-bg-image: url("../img/railway-bg.webp");
}

@media (max-width: 768px) {
  :root {
    --rail-bg-image: url("../img/railway-bg-sm.webp");
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
  line-height: 1.55;
  position: relative;
}

/* 火车主题淡背景（全站） */
.rail-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(160deg, rgba(244, 241, 236, 0.88), rgba(232, 238, 243, 0.82)),
    var(--rail-bg-image) center / cover no-repeat;
  opacity: 0.42;
  filter: saturate(0.75) contrast(0.95);
}
body > *:not(.rail-bg):not(.mascot-assistant):not(.nav-backdrop):not(.send-fx) {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--page-pad-x);
  background: rgba(14, 26, 36, 0.9);
  backdrop-filter: blur(12px);
  color: #f4efe6;
  border-bottom: 1px solid rgba(212, 180, 131, 0.25);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 0 1 auto;
  min-width: 0;
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(244, 239, 230, 0.28);
  background: transparent;
  border-radius: 2px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #f4efe6;
  transition: transform .2s, opacity .2s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(8, 14, 20, 0.45);
}
body.nav-open { overflow: hidden; }

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  letter-spacing: 0.12em;
  color: var(--copper-bright);
}
.brand-sub {
  font-size: 0.72rem;
  opacity: 0.78;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  font-size: 0.92rem;
}
.nav a { opacity: 0.9; transition: color .2s, opacity .2s; }
.nav a:hover { color: var(--copper-bright); opacity: 1; }
.nav .btn { white-space: nowrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--copper), #8f6d3d);
  color: #16120c;
  font-weight: 600;
}
.btn-ghost {
  border-color: rgba(244, 239, 230, 0.35);
  color: #f4efe6;
  background: transparent;
}
.btn-dark {
  background: var(--steel);
  color: #f4efe6;
}
.btn-line {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--steel);
}

/* ========== 首页：单屏宽布局 ========== */
.page-home .site-footer-slim { display: none; }

.hero-wide {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 0;
  color: #f7f2e8;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(14, 26, 36, 0.78) 0%, rgba(14, 26, 36, 0.55) 48%, rgba(26, 51, 72, 0.62) 100%),
    var(--rail-bg-image) center / cover no-repeat;
}
.hero-wide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 239, 230, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to right, black 40%, transparent 95%);
  animation: gridDrift 28s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.hero-wide::after {
  content: "";
  position: absolute;
  width: 48vmax;
  height: 48vmax;
  right: -10vmax;
  top: -8vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 141, 87, 0.16), transparent 65%);
  animation: pulseSoft 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* 炫彩光芒层 */
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.fx-aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 45% 40% at 18% 35%, rgba(255, 196, 92, 0.35), transparent 55%),
    radial-gradient(ellipse 40% 45% at 55% 20%, rgba(64, 196, 180, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 78% 55%, rgba(120, 160, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 35% 35% at 40% 70%, rgba(232, 120, 90, 0.18), transparent 55%);
  filter: blur(8px);
  animation: auroraShift 12s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}
.fx-beam {
  position: absolute;
  width: 140%;
  height: 2px;
  left: -20%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 210, 120, 0) 10%,
    rgba(255, 210, 120, 0.85) 45%,
    rgba(120, 220, 255, 0.75) 55%,
    rgba(255, 160, 120, 0) 90%,
    transparent 100%
  );
  filter: blur(1px);
  opacity: 0.55;
  transform-origin: left center;
}
.fx-beam-a {
  top: 28%;
  animation: beamSweep 7s ease-in-out infinite;
}
.fx-beam-b {
  top: 62%;
  opacity: 0.4;
  animation: beamSweep 9s ease-in-out 1.5s infinite reverse;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 220, 200, 0.7) 40%,
    rgba(255, 200, 100, 0.8) 60%,
    transparent
  );
}
.fx-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  mix-blend-mode: screen;
}
.fx-orb-1 {
  width: 18vmin;
  height: 18vmin;
  left: 12%;
  top: 18%;
  background: radial-gradient(circle, rgba(255, 214, 120, 0.75), rgba(255, 160, 80, 0.15) 45%, transparent 70%);
  animation: orbFloat 8s ease-in-out infinite;
}
.fx-orb-2 {
  width: 14vmin;
  height: 14vmin;
  left: 42%;
  top: 58%;
  background: radial-gradient(circle, rgba(90, 220, 200, 0.7), rgba(80, 160, 255, 0.15) 50%, transparent 70%);
  animation: orbFloat 10s ease-in-out 1s infinite reverse;
}
.fx-orb-3 {
  width: 22vmin;
  height: 22vmin;
  left: 28%;
  top: 8%;
  background: radial-gradient(circle, rgba(180, 140, 255, 0.35), rgba(255, 120, 150, 0.12) 45%, transparent 70%);
  animation: orbFloat 11s ease-in-out 2s infinite;
}
.fx-sparkles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 240, 200, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 28% 48%, rgba(180, 240, 255, 0.85), transparent),
    radial-gradient(2px 2px at 48% 18%, rgba(255, 200, 160, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 62% 40%, rgba(200, 255, 220, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 18% 68%, rgba(255, 230, 150, 0.85), transparent),
    radial-gradient(2px 2px at 36% 78%, rgba(170, 200, 255, 0.8), transparent);
  animation: sparkleTwinkle 4s ease-in-out infinite;
}

.hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 2rem var(--page-pad-x) 2.5rem;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: 0;
  margin-top: -2vh;
}
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 8vw, 7rem);
  line-height: 1.02;
  letter-spacing: 0.16em;
  margin: 0 0 1rem;
  animation: riseIn 0.9s ease both;
}
.hero-brand-glow {
  display: inline-block;
  background: linear-gradient(
    110deg,
    #fff6d8 0%,
    #f0c56a 18%,
    #ffe9a8 36%,
    #7ed6c8 52%,
    #9ec5ff 68%,
    #f0c56a 84%,
    #fff6d8 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(240, 197, 106, 0.55))
    drop-shadow(0 0 36px rgba(126, 214, 200, 0.35));
  animation: chromaFlow 5.5s linear infinite, brandPulse 3.2s ease-in-out infinite;
}
.hero-wide h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.85rem, 3.6vw, 3rem);
  letter-spacing: 0.08em;
  animation: riseIn 0.9s ease 0.1s both;
}
.hero-title-glow {
  display: inline-block;
  color: #f7f2e8;
  text-shadow:
    0 0 12px rgba(255, 220, 150, 0.55),
    0 0 28px rgba(100, 200, 220, 0.35),
    0 0 48px rgba(240, 160, 100, 0.25);
  animation: titleSheen 4.5s ease-in-out infinite;
}
.hero-wide .hero-inner > p {
  margin: 0 0 1.6rem;
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  opacity: 0.92;
  animation: riseIn 0.9s ease 0.18s both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: riseIn 0.9s ease 0.26s both;
}
.btn-glow {
  box-shadow:
    0 0 0 1px rgba(255, 220, 150, 0.35),
    0 0 22px rgba(240, 180, 90, 0.45),
    0 0 40px rgba(90, 200, 190, 0.25);
  animation: btnGlow 2.8s ease-in-out infinite;
}

.hero-side {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem clamp(1.2rem, 2.5vw, 2.2rem);
  background: rgba(8, 16, 24, 0.42);
  border-left: 1px solid rgba(212, 180, 131, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 40px rgba(100, 180, 220, 0.08);
}
.hero-side-block h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.1em;
  color: var(--copper-bright);
  font-weight: 500;
}
.hero-side-lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  opacity: 0.78;
  line-height: 1.5;
}
.flow-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.flow-compact .flow-item {
  padding: 0.55rem 0 0.15rem;
  border-top: 1px solid rgba(212, 180, 131, 0.45);
}
.flow-compact .flow-item h3 {
  margin: 0.35rem 0 0.2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.05em;
}
.flow-compact .flow-item p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.88rem;
}
.stats-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0;
}
.stats-compact .stat {
  padding: 0.7rem 0 0;
  border-top: 1px solid rgba(244, 239, 230, 0.18);
}
.stats-compact .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  color: var(--copper-bright);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.stats-compact .stat span {
  opacity: 0.7;
  font-size: 0.82rem;
}

.hero-rail {
  position: absolute;
  left: var(--page-pad-x);
  right: 42%;
  bottom: 1.6rem;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #7ed6c8 20%,
    #f0c56a 50%,
    #9ec5ff 80%,
    transparent
  );
  opacity: 0.7;
  filter: drop-shadow(0 0 8px rgba(240, 197, 106, 0.7));
  animation: railGlow 3.5s ease-in-out infinite;
  z-index: 1;
}

/* ========== 工作台宽屏紧凑布局 ========== */
.panel-page {
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.1rem var(--page-pad-x) 1.2rem;
  background: transparent;
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.panel-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  letter-spacing: 0.08em;
  color: var(--steel);
}
.panel-head p {
  margin: 0.2rem 0 0;
  color: rgba(14, 26, 36, 0.65);
  font-size: 0.92rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.metric {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  border-left: 3px solid var(--copper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.metric strong {
  display: block;
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: var(--steel);
  line-height: 1.15;
}
.metric span { color: rgba(14, 26, 36, 0.6); font-size: 0.85rem; }

.table-wrap, .form-panel, .chat-panel, .list-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(26, 51, 72, 0.08);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  backdrop-filter: blur(8px);
}
.table-wrap h2, .form-panel h2, .chat-panel h2, .list-panel h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  color: var(--steel);
}

/* 工作台双栏：减少纵向滚动 */
.dash-wide {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0.85rem;
  align-items: start;
}
.dash-wide .table-wrap {
  margin-bottom: 0;
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 210px);
  display: flex;
  flex-direction: column;
}
.dash-wide .table-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid rgba(26, 51, 72, 0.08);
  vertical-align: top;
}
th { color: rgba(14, 26, 36, 0.55); font-weight: 600; font-size: 0.8rem; }
tr:hover td { background: rgba(232, 238, 243, 0.45); }

.badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  font-size: 0.75rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  letter-spacing: 0.04em;
}
.badge-ok { color: var(--ok); }
.badge-warn { color: var(--warn); }
.badge-danger { color: var(--danger); }
.badge-steel { color: var(--steel); }

.form-grid { display: grid; gap: 0.75rem; }
.form-grid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: rgba(14, 26, 36, 0.78);
}
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(26, 51, 72, 0.18);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: 2px solid rgba(176, 141, 87, 0.35);
  border-color: var(--copper);
}
.form-grid textarea { min-height: 96px; resize: vertical; }
.helptext, .errorlist {
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--danger);
}

.messages {
  list-style: none;
  margin: 0.6rem var(--page-pad-x) 0;
  padding: 0;
}
.messages li {
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.4rem;
  background: rgba(176, 141, 87, 0.14);
  border-left: 3px solid var(--copper);
  backdrop-filter: blur(6px);
}

.chat {
  display: grid;
  gap: 0.65rem;
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 220px);
  overflow: auto;
}
.bubble {
  padding: 0.7rem 0.85rem;
  border-left: 3px solid rgba(26, 51, 72, 0.15);
  background: rgba(232, 238, 243, 0.85);
}
.bubble.ai { border-color: var(--copper); background: rgba(176, 141, 87, 0.12); }
.bubble.staff { border-color: var(--ok); background: rgba(47, 111, 78, 0.08); }
.bubble.system { border-color: transparent; background: transparent; color: rgba(14, 26, 36, 0.55); font-size: 0.88rem; }
.bubble .meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

.split-2 {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 0.85rem;
  align-items: start;
}
.split-2 .chat-panel,
.split-2 .form-panel,
.split-2 .list-panel { margin-bottom: 0.85rem; }

.form-wide {
  max-width: none !important;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}
.form-wide .form-grid { grid-column: 1 / -1; }
.form-inline-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-shell {
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  display: grid;
  place-items: center;
  padding: 1.5rem var(--page-pad-x);
  background:
    linear-gradient(135deg, rgba(14, 26, 36, 0.78), rgba(26, 51, 72, 0.72)),
    var(--rail-bg-image) center / cover no-repeat;
}
.auth-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.auth-card-visual {
  padding: 2rem 1.6rem;
  background:
    linear-gradient(160deg, rgba(14, 26, 36, 0.82), rgba(26, 51, 72, 0.7)),
    var(--rail-bg-image) center / cover no-repeat;
  color: #f4efe6;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.auth-card-visual h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  font-size: 1.8rem;
  color: var(--copper-bright);
}
.auth-card-visual p { margin: 0; opacity: 0.8; font-size: 0.92rem; }
.demo-accounts {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 180, 131, 0.28);
}
.demo-accounts h3 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--copper-bright);
}
.demo-accounts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.demo-accounts li {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.4rem 0.55rem;
  align-items: baseline;
  font-size: 0.86rem;
  opacity: 0.92;
}
.demo-accounts li span { opacity: 0.75; }
.demo-accounts code {
  font-family: "IBM Plex Sans", Consolas, monospace;
  font-size: 0.84rem;
  color: #f4efe6;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.08rem 0.35rem;
  border-radius: 2px;
}
.auth-card-form { padding: 1.6rem 1.5rem; }
.auth-card-form h1 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  color: var(--steel);
  font-size: 1.45rem;
}
.auth-card-form > p { margin: 0 0 1rem; color: rgba(14, 26, 36, 0.65); font-size: 0.9rem; }

.site-footer {
  padding: 0.7rem var(--page-pad-x);
  min-height: var(--footer-h);
  display: flex;
  align-items: center;
  background: rgba(14, 26, 36, 0.92);
  color: rgba(244, 239, 230, 0.65);
  font-size: 0.85rem;
}
.site-footer strong { color: var(--copper-bright); }

.remind-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  margin-bottom: 0.75rem;
}
.remind-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
  background: rgba(255, 255, 255, 0.82);
  border-left: 3px solid var(--warn);
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  max-width: 420px;
}
.remind-chip.critical { border-left-color: var(--danger); }

.student-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  align-items: center;
}
.student-filter input,
.student-filter select {
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(26, 51, 72, 0.18);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
  min-width: 160px;
}
.student-table-scroll {
  max-height: min(38vh, 360px);
  overflow: auto;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  margin: 0;
}
.info-grid-1 { grid-template-columns: 1fr; }
.info-grid > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.4rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(26, 51, 72, 0.06);
  font-size: 0.9rem;
}
.info-grid dt {
  margin: 0;
  color: rgba(14, 26, 36, 0.5);
  font-weight: 500;
}
.info-grid dd { margin: 0; word-break: break-all; }

.nav a.nav-active { color: var(--copper-bright); opacity: 1; }
.nav-user { opacity: 0.8; font-size: 0.88rem; }
.feedback-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.chart-split { margin-bottom: 0.85rem; }
.chart-box { height: 240px; position: relative; }
.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}
.legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend-item i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  display: inline-block;
}
.status-pill {
  display: inline-block;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
}
.content-list { display: grid; gap: 0.45rem; }
.content-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.2rem;
  border-bottom: 1px solid rgba(26, 51, 72, 0.08);
}
.content-row strong { font-weight: 600; }
.content-row em { font-style: normal; font-size: 0.82rem; opacity: 0.55; }
.kind-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--copper);
  color: var(--steel);
  letter-spacing: 0.04em;
}
.content-body { font-size: 1.02rem; line-height: 1.75; max-width: 860px; }

/* 信息墙便利贴 */
.wall-page { padding-bottom: 1.5rem; }
.wall-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: 1rem;
  align-items: start;
}
.sticky-wall {
  position: relative;
  min-height: calc(100vh - var(--header-h) - var(--footer-h) - 140px);
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.15)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(26, 51, 72, 0.04) 28px
    );
  border: 1px solid rgba(26, 51, 72, 0.08);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.1rem;
  align-content: start;
}
.sticky {
  position: relative;
  min-height: 160px;
  padding: 1rem 0.9rem 1.8rem;
  box-shadow: 0 10px 24px rgba(14, 26, 36, 0.12);
  transform: rotate(-1.5deg);
  transition: transform .2s, box-shadow .2s;
}
.sticky:nth-child(3n) { transform: rotate(2deg); }
.sticky:nth-child(4n) { transform: rotate(-2.5deg); }
.sticky:nth-child(5n) { transform: rotate(1.2deg); }
.sticky:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 16px 32px rgba(14, 26, 36, 0.18);
  z-index: 2;
}
.sticky h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.sticky p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0.9;
}
.sticky footer {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.65;
}
.sticky-link { position: absolute; inset: 0; }
.sticky-yellow { background: #f6e7a8; }
.sticky-mint { background: #c9e8d5; }
.sticky-peach { background: #f5d0b5; }
.sticky-sky { background: #c7def5; }
.sticky-lilac { background: #ddd0ef; }
.sticky-sand { background: #e8d9c3; }
.wall-compose { position: sticky; top: calc(var(--header-h) + 0.8rem); }
.wall-empty { grid-column: 1 / -1; opacity: 0.6; }


@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(64px); }
}
@keyframes pulseSoft {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}
@keyframes railGlow {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 0.75; }
}
@keyframes auroraShift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.75; }
  50% { transform: translate3d(3%, 2%, 0) scale(1.06); opacity: 1; }
  100% { transform: translate3d(1%, -2%, 0) scale(1.02); opacity: 0.85; }
}
@keyframes beamSweep {
  0% { transform: translateX(-8%) rotate(-8deg); opacity: 0.15; }
  40% { opacity: 0.7; }
  100% { transform: translateX(18%) rotate(6deg); opacity: 0.2; }
}
@keyframes orbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.65; }
  50% { transform: translate3d(4%, -8%, 0) scale(1.12); opacity: 1; }
}
@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.95; }
}
@keyframes chromaFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}
@keyframes brandPulse {
  0%, 100% {
    filter: drop-shadow(0 0 16px rgba(240, 197, 106, 0.5))
      drop-shadow(0 0 32px rgba(126, 214, 200, 0.28));
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(255, 220, 140, 0.8))
      drop-shadow(0 0 52px rgba(120, 200, 255, 0.45));
  }
}
@keyframes titleSheen {
  0%, 100% {
    text-shadow:
      0 0 12px rgba(255, 220, 150, 0.45),
      0 0 28px rgba(100, 200, 220, 0.28),
      0 0 48px rgba(240, 160, 100, 0.18);
  }
  50% {
    text-shadow:
      0 0 18px rgba(255, 230, 180, 0.75),
      0 0 36px rgba(120, 220, 200, 0.45),
      0 0 64px rgba(160, 140, 255, 0.3);
  }
}
@keyframes btnGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 220, 150, 0.3),
      0 0 18px rgba(240, 180, 90, 0.35),
      0 0 32px rgba(90, 200, 190, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 230, 180, 0.55),
      0 0 28px rgba(255, 200, 100, 0.6),
      0 0 48px rgba(100, 210, 220, 0.35);
  }
}

/* ========== 平板 / 手机端布局 ========== */
@media (max-width: 1100px) {
  .hero-wide {
    height: auto;
    min-height: calc(100vh - var(--header-h));
    grid-template-columns: 1fr;
  }
  .hero-main {
    min-height: 52vh;
    align-items: center;
    padding-top: 2.5rem;
  }
  .hero-side { border-left: none; border-top: 1px solid rgba(212, 180, 131, 0.22); }
  .hero-rail { right: var(--page-pad-x); }
  .dash-wide, .split-2, .form-wide, .auth-card { grid-template-columns: 1fr; }
  .auth-card-visual { min-height: 140px; }
  .dash-wide .table-wrap { max-height: none; }
  .page-home .site-footer-slim { display: flex; }
  .feedback-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wall-layout { grid-template-columns: 1fr; }
  .wall-compose { position: static; }
}

@media (max-width: 900px) {
  :root {
    --header-h: 56px;
    --page-pad-x: 1rem;
    --footer-h: 52px;
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: var(--header-h);
    padding: 0;
  }
  .header-bar {
    width: 100%;
    height: var(--header-h);
    padding: 0 var(--page-pad-x);
    flex: none;
  }
  .nav-toggle { display: inline-flex; }
  .brand-sub { display: none; }
  .brand-mark { font-size: 1.35rem; letter-spacing: 0.1em; }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.4rem 0 0.8rem;
    background: rgba(14, 26, 36, 0.98);
    border-top: 1px solid rgba(212, 180, 131, 0.18);
    max-height: min(70vh, 520px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-open .nav { display: flex; }
  .nav a,
  .nav .nav-user,
  .nav .btn {
    display: block;
    padding: 0.85rem var(--page-pad-x);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.98rem;
  }
  .nav .btn {
    margin: 0.65rem var(--page-pad-x) 0.2rem;
    text-align: center;
    width: calc(100% - 2 * var(--page-pad-x));
  }
  .nav .btn-ghost {
    border-color: rgba(244, 239, 230, 0.35);
  }
  .nav-user {
    opacity: 0.65;
    font-size: 0.85rem !important;
  }

  .grid-3,
  .stats-compact,
  .form-inline-2,
  .feedback-metrics { grid-template-columns: 1fr 1fr; }

  .panel-page {
    padding: 1rem var(--page-pad-x) 5.5rem;
  }
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .panel-head h1 {
    font-size: 1.45rem;
  }
  .panel-head .btn,
  .panel-head > div:last-child {
    width: 100%;
  }
  .panel-head a.btn,
  .panel-head .student-filter {
    width: 100%;
  }
  .student-filter {
    flex-direction: column;
    align-items: stretch;
  }
  .student-filter input,
  .student-filter select,
  .student-filter .btn {
    width: 100%;
    min-width: 0;
  }

  /* 表格横向滑动，避免挤爆 */
  .table-wrap,
  .form-panel,
  .chat-panel,
  .list-panel {
    padding: 0.8rem;
  }
  .table-scroll,
  .student-table-scroll {
    max-height: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 560px;
    font-size: 0.86rem;
  }
  th, td { padding: 0.55rem 0.4rem; }

  .content-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .content-row em { justify-self: start; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid > div { grid-template-columns: 4.8rem 1fr; }

  .chart-box { height: 200px; }
  .hero-brand { font-size: clamp(2.6rem, 14vw, 3.8rem); letter-spacing: 0.1em; }
  .hero-wide h1 { font-size: clamp(1.35rem, 5.5vw, 1.75rem); }
  .hero-wide .hero-inner > p { font-size: 0.95rem; max-width: none; }
  .hero-inner { max-width: none; margin-top: 0; }
  .hero-main {
    min-height: auto;
    padding: 2.2rem var(--page-pad-x) 1.6rem;
  }
  .hero-side { padding: 1.2rem var(--page-pad-x) 1.6rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .fx-orb-3, .fx-beam-b { display: none; }
  .fx-aurora { opacity: 0.85; }

  .auth-shell { padding: 1rem var(--page-pad-x) 5rem; }
  .auth-card { width: 100%; }
  .auth-card-visual { min-height: 120px; padding: 1.25rem 1.1rem; }
  .auth-card-form { padding: 1.2rem 1.1rem 1.4rem; }
  .demo-accounts li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .sticky-wall {
    min-height: auto;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.85rem;
  }
  .sticky { min-height: 140px; transform: none !important; }
  .sticky:hover { transform: scale(1.02) !important; }

  .messages { margin: 0.5rem var(--page-pad-x) 0; }
  .site-footer {
    padding: 0.75rem var(--page-pad-x);
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .chat { max-height: none; }
}

@media (max-width: 600px) {
  .grid-3,
  .stats-compact,
  .feedback-metrics,
  .form-inline-2 { grid-template-columns: 1fr; }

  .metric strong { font-size: 1.35rem; }
  .panel-head h1 { font-size: 1.3rem; }

  table { min-width: 480px; }
  .sticky-wall { grid-template-columns: 1fr; }
  .status-pill { white-space: normal; }

  .hero-wide { min-height: auto; }
  .page-home .site-footer-slim { font-size: 0.72rem; }

  /* 手机卡片化列表提示：表格区域加阴影提示可横滑 */
  .table-scroll::after,
  .student-table-scroll::after {
    content: "左右滑动查看更多";
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(14, 26, 36, 0.45);
    padding-top: 0.35rem;
  }

  .mascot-toggle { width: 76px; height: 76px; }
  .btn { min-height: 42px; padding: 0.7rem 1rem; }
}

/* ========== 右下角吉祥物助手「铁小小」 ========== */
.mascot-assistant {
  position: fixed !important;
  right: 1.2rem;
  bottom: 5.5rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
  pointer-events: none;
}
.mascot-assistant > * { pointer-events: auto; }
.mascot-toggle {
  position: relative;
  width: 104px;
  height: 104px;
  border: none;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 230, 160, 0.9), transparent 45%),
    linear-gradient(145deg, #2a455c, #152433);
  box-shadow:
    0 10px 28px rgba(14, 26, 36, 0.35),
    0 0 0 3px rgba(240, 197, 106, 0.35),
    0 0 24px rgba(126, 214, 200, 0.35);
  animation: mascotBounce 3.2s ease-in-out infinite;
}
.mascot-toggle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.mascot-badge {
  position: absolute;
  right: -2px;
  top: 0;
  background: linear-gradient(135deg, #f0c56a, #e08a4c);
  color: #1a1208;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.mascot-panel {
  width: min(400px, calc(100vw - 1.6rem));
  max-height: min(72vh, 560px);
  display: none;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(26, 51, 72, 0.1);
  box-shadow: 0 20px 50px rgba(14, 26, 36, 0.28);
  overflow: hidden;
  transform-origin: bottom right;
}
.mascot-assistant.is-open .mascot-panel,
.mascot-panel:not([hidden]) {
  display: flex;
  animation: mascotPanelIn 0.28s ease;
}
.mascot-panel[hidden] {
  display: none !important;
}
.mascot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: linear-gradient(120deg, #1a3348, #243b53 55%, #2f5a52);
  color: #f7f2e8;
}
.mascot-head-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.mascot-head-main img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}
.mascot-head-main strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}
.mascot-head-main span {
  font-size: 0.78rem;
  opacity: 0.75;
}
.mascot-close {
  border: none;
  background: transparent;
  color: #f7f2e8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.mascot-messages {
  flex: 1;
  overflow: auto;
  padding: 0.75rem;
  display: grid;
  gap: 0.55rem;
  background:
    radial-gradient(circle at top right, rgba(240, 197, 106, 0.12), transparent 40%),
    #f7f5f1;
}
.mascot-bubble {
  max-width: 92%;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
  border-radius: 4px;
  white-space: pre-wrap;
}
.mascot-bubble.bot {
  justify-self: start;
  background: #fff;
  border-left: 3px solid var(--copper);
  box-shadow: 0 4px 14px rgba(14, 26, 36, 0.06);
}
.mascot-bubble.user {
  justify-self: end;
  background: #1a3348;
  color: #f7f2e8;
}
.mascot-bubble.thinking { opacity: 0.7; font-style: italic; }
.mascot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.mascot-links a {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(176, 141, 87, 0.55);
  color: var(--steel);
  background: rgba(240, 197, 106, 0.12);
}
.mascot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-top: 1px solid rgba(26, 51, 72, 0.08);
  background: #fff;
}
.mascot-quick button {
  border: 1px solid rgba(26, 51, 72, 0.15);
  background: #f4f1ec;
  color: var(--steel);
  font-size: 0.78rem;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
  border-radius: 2px;
}
.mascot-quick button:hover {
  border-color: var(--copper);
  background: rgba(240, 197, 106, 0.18);
}
.mascot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem 0.8rem;
  background: #fff;
  border-top: 1px solid rgba(26, 51, 72, 0.08);
}
.mascot-input {
  border: 1px solid rgba(26, 51, 72, 0.18);
  padding: 0.55rem 0.65rem;
  border-radius: 2px;
}
@keyframes mascotBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes mascotPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== 畅所欲言：信封装封传达动效 ========== */
body.send-fx-lock { overflow: hidden; }
.send-fx {
  position: fixed !important;
  inset: 0;
  z-index: 200 !important;
  display: grid;
  place-items: center;
  pointer-events: auto;
}
.send-fx[hidden] { display: none !important; }
.send-fx-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(240, 197, 106, 0.16), transparent 45%),
    rgba(8, 14, 20, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.send-fx[data-phase] .send-fx-backdrop { opacity: 1; }
.send-fx-stage {
  position: relative;
  width: min(520px, calc(100vw - 1.5rem));
  height: min(420px, 70vh);
  display: grid;
  place-items: center;
  z-index: 1;
}
.send-fx-letter {
  position: absolute;
  top: 8%;
  width: min(300px, 78vw);
  min-height: 168px;
  padding: 1.1rem 1.15rem 1.2rem;
  background: linear-gradient(180deg, #fffdf8 0%, #f4efe6 100%);
  border: 1px solid rgba(176, 141, 87, 0.4);
  box-shadow: 0 18px 40px rgba(14, 26, 36, 0.28);
  color: var(--ink);
  transform: translateY(-12px) scale(1);
  opacity: 0;
  transition:
    top 0.75s cubic-bezier(0.4, 0.1, 0.2, 1),
    transform 0.75s cubic-bezier(0.4, 0.1, 0.2, 1),
    opacity 0.35s ease,
    filter 0.4s ease;
  z-index: 3;
}
.send-fx-letter-seal {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--copper);
  border: 1px solid rgba(176, 141, 87, 0.45);
  padding: 0.12rem 0.4rem;
}
.send-fx-letter strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}
.send-fx-letter p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(14, 26, 36, 0.72);
  white-space: pre-wrap;
  max-height: 5.8em;
  overflow: hidden;
}

/* 大信封：开口朝上的经典造型 */
.send-fx-envelope {
  position: absolute;
  bottom: 18%;
  width: min(340px, 86vw);
  height: 210px;
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition:
    transform 1s cubic-bezier(0.45, 0.05, 0.2, 1),
    opacity 0.35s ease,
    bottom 1s cubic-bezier(0.45, 0.05, 0.2, 1);
  z-index: 2;
  filter: drop-shadow(0 22px 36px rgba(14, 26, 36, 0.4));
  perspective: 900px;
}
.send-fx-pocket {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, #3d6280 0%, #1a3348 48%, #122230 100%);
  border: 2px solid rgba(240, 197, 106, 0.45);
  border-radius: 4px 4px 6px 6px;
  overflow: hidden;
}
.send-fx-pocket::before {
  /* 信封正面 V 形开口 */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 52%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 70%);
  clip-path: polygon(0 0, 50% 70%, 100% 0, 100% 100%, 0 100%);
  opacity: 0.55;
}
.send-fx-pocket::after {
  content: "机械之声";
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.28em;
  color: rgba(240, 197, 106, 0.92);
}
.send-fx-stamp {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #f0c56a;
  border: 2px solid rgba(240, 197, 106, 0.75);
  padding: 0.28rem 0.45rem;
  border-radius: 2px;
  transform: rotate(-10deg);
  opacity: 0;
  transition: opacity 0.35s ease 0.1s;
  background: rgba(14, 26, 36, 0.35);
}
.send-fx-flap {
  position: absolute;
  left: -2px;
  right: -2px;
  top: -2px;
  height: 48%;
  background: linear-gradient(180deg, #4a7390, #2a4a61 70%, #1f3a4e);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform: rotateX(0deg) scaleY(1);
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1);
  z-index: 4;
  border: 2px solid rgba(240, 197, 106, 0.4);
  border-bottom: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}
.send-fx-caption {
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  margin: 0;
  padding: 0.45rem 1rem;
  min-width: 12em;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  letter-spacing: 0.14em;
  color: #f7f2e8;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.35s ease;
  white-space: nowrap;
  background: rgba(14, 26, 36, 0.35);
  border: 1px solid rgba(240, 197, 106, 0.25);
}

/* 阶段：出现 —— 信纸在上，大信封在下，同时清晰可见 */
.send-fx[data-phase="show"] .send-fx-letter {
  opacity: 1;
  top: 6%;
  transform: translateY(0) scale(1);
}
.send-fx[data-phase="show"] .send-fx-envelope,
.send-fx[data-phase="fold"] .send-fx-envelope,
.send-fx[data-phase="seal"] .send-fx-envelope {
  opacity: 1;
  bottom: 16%;
  transform: translateY(0) scale(1);
}
.send-fx[data-phase="show"] .send-fx-caption,
.send-fx[data-phase="fold"] .send-fx-caption,
.send-fx[data-phase="seal"] .send-fx-caption {
  opacity: 0.95;
  transform: translateX(-50%) translateY(0);
}

/* 阶段：信纸落入信封 */
.send-fx[data-phase="fold"] .send-fx-letter {
  top: 42%;
  transform: translateY(0) scale(0.38);
  opacity: 0.2;
  filter: blur(0.5px);
}

/* 阶段：封口，信封停留可见 */
.send-fx[data-phase="seal"] .send-fx-letter {
  opacity: 0;
  top: 48%;
  transform: scale(0.22);
}
.send-fx[data-phase="seal"] .send-fx-flap,
.send-fx[data-phase="fly"] .send-fx-flap,
.send-fx[data-phase="done"] .send-fx-flap {
  transform: rotateX(180deg);
}
.send-fx[data-phase="seal"] .send-fx-stamp,
.send-fx[data-phase="fly"] .send-fx-stamp,
.send-fx[data-phase="done"] .send-fx-stamp {
  opacity: 1;
}

/* 阶段：飞向右上角 */
.send-fx[data-phase="fly"] .send-fx-envelope,
.send-fx[data-phase="done"] .send-fx-envelope {
  opacity: 0.15;
  bottom: 70%;
  transform: translate(38vw, -28vh) scale(0.35) rotate(16deg);
}
.send-fx[data-phase="fly"] .send-fx-caption,
.send-fx[data-phase="done"] .send-fx-caption {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  color: #f0c56a;
  border-color: rgba(240, 197, 106, 0.55);
}

@media (max-width: 600px) {
  .send-fx-stage { height: min(380px, 72vh); }
  .send-fx-envelope { width: min(300px, 90vw); height: 180px; }
  .send-fx-caption { font-size: 1.05rem; letter-spacing: 0.08em; }
  .send-fx[data-phase="fly"] .send-fx-envelope,
  .send-fx[data-phase="done"] .send-fx-envelope {
    transform: translate(28vw, -26vh) scale(0.32) rotate(14deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .send-fx-letter,
  .send-fx-envelope,
  .send-fx-flap,
  .send-fx-caption,
  .send-fx-backdrop {
    transition-duration: 0.01ms !important;
  }
}

/* 手机端覆盖（放在组件样式之后，确保生效） */
@media (max-width: 900px) {
  .mascot-assistant {
    right: 0.85rem;
    bottom: calc(4.8rem + env(safe-area-inset-bottom, 0px));
  }
  .mascot-toggle { width: 84px; height: 84px; }
  .mascot-panel {
    width: min(100vw - 1.2rem, 400px);
    max-height: min(70vh, 520px);
  }
}
@media (max-width: 600px) {
  .mascot-toggle { width: 76px; height: 76px; }
  .mascot-assistant {
    bottom: calc(4.2rem + env(safe-area-inset-bottom, 0px));
  }
}