:root {
  --paper: #f5f1e9;
  --paper-deep: #ebe3d6;
  --paper-light: #fffdf8;
  --ink: #28231f;
  --muted: #746c63;
  --line: #ded5c7;
  --brand: #8f2f2a;
  --brand-dark: #6e211e;
  --brand-light: #ae5149;
  --brand-soft: #f1ddd8;
  --forest: #24483d;
  --forest-soft: #dce8e1;
  --gold: #d7a343;
  --gold-soft: #f7eccf;
  --blue: #456789;
  --shadow: 0 22px 70px rgba(63, 47, 34, 0.13);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0, rgba(215, 163, 67, 0.13), transparent 30rem),
    var(--paper);
}

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

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

button {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(215, 163, 67, 0.62);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.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;
}

.app-shell {
  display: flex;
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  flex-direction: column;
}

.app-header {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  color: white;
  background:
    radial-gradient(circle at 76% -50%, rgba(255, 227, 168, 0.27), transparent 20rem),
    linear-gradient(112deg, var(--brand-dark), var(--brand) 56%, var(--brand-light));
  box-shadow: 0 8px 26px rgba(94, 31, 27, 0.18);
}

.app-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.16);
}

.header-inner {
  display: flex;
  width: min(1080px, calc(100% - 28px));
  min-height: 64px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: white;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.header-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.header-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.header-copy strong {
  overflow: hidden;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-copy small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.header-copy i,
.knowledge-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #72df98;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(114, 223, 152, 0.16);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  transition: 160ms ease;
}

.header-actions button:hover {
  background: rgba(255, 255, 255, 0.23);
  transform: translateY(-1px);
}

.header-actions span {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
  font-weight: 700;
}

.chat-area {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(143, 47, 42, 0.22) transparent;
}

.chat-area::before {
  position: fixed;
  z-index: -1;
  inset: 64px 0 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.85), transparent 34rem),
    linear-gradient(180deg, #f8f4ec, var(--paper));
}

.welcome-panel {
  width: min(780px, calc(100% - 30px));
  min-height: 100%;
  margin: 0 auto;
  padding: 26px 0 28px;
  text-align: center;
}

.welcome-hero {
  position: relative;
  display: flex;
  min-height: clamp(360px, 58vh, 540px);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px;
  color: white;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(21, 34, 39, 0.18) 0%, rgba(60, 29, 25, 0.32) 44%, rgba(92, 24, 28, 0.86) 100%),
    linear-gradient(90deg, rgba(30, 38, 33, 0.48), rgba(30, 38, 33, 0.08) 45%, rgba(30, 38, 33, 0.22)),
    url("./assets/sxnu-gate-bg.webp") center 44% / cover;
  border: 1px solid rgba(255, 253, 248, 0.52);
  border-radius: 8px;
  box-shadow:
    0 24px 55px rgba(88, 48, 33, 0.2),
    inset 0 -70px 80px rgba(104, 30, 32, 0.42);
}

.welcome-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.08), transparent 36%),
    radial-gradient(circle at 24% 92%, rgba(215, 163, 67, 0.28), transparent 24rem);
}

.welcome-hero-top,
.welcome-hero-copy {
  position: relative;
  z-index: 1;
}

.welcome-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.profile-emblem {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0;
  place-items: center;
  color: white;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.25), transparent 28%),
    linear-gradient(145deg, var(--brand-light), var(--brand-dark));
  border: 4px solid rgba(255, 253, 248, 0.82);
  border-radius: 50%;
  box-shadow:
    0 16px 34px rgba(32, 23, 18, 0.24),
    0 0 0 1px rgba(255, 253, 248, 0.18);
}

.profile-emblem::before,
.profile-emblem::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(215, 163, 67, 0.28);
  border-radius: 50%;
}

.profile-emblem::before {
  inset: -9px;
}

.profile-emblem::after {
  inset: -16px;
  border-color: rgba(255, 253, 248, 0.16);
}

.profile-emblem span {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 32px;
  font-weight: 800;
}

.profile-emblem i {
  position: absolute;
  right: 0;
  bottom: 4px;
  z-index: 2;
  width: 14px;
  height: 14px;
  background: #58d885;
  border: 2px solid white;
  border-radius: 50%;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 13px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(143, 47, 42, 0.84);
  border: 1px solid rgba(255, 253, 248, 0.35);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(37, 26, 22, 0.2);
  backdrop-filter: blur(10px);
}

.welcome-hero-copy {
  max-width: 620px;
  padding-top: 80px;
}

.welcome-kicker {
  margin: 0 0 10px;
  color: #f5c772;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.welcome-panel h1 {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  text-wrap: balance;
  text-shadow: 0 3px 20px rgba(34, 21, 18, 0.42);
}

.welcome-panel h1 span {
  display: block;
}

.welcome-school {
  margin: 14px 0 6px;
  color: rgba(255, 253, 248, 0.96);
  font-size: 17px;
  font-weight: 700;
}

.welcome-tagline {
  margin: 0;
  display: inline-flex;
  padding: 8px 14px;
  color: rgba(255, 253, 248, 0.9);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 253, 248, 0.12);
  border: 1px solid rgba(255, 253, 248, 0.32);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.welcome-hero {
  isolation: isolate;
  min-height: clamp(430px, 62vh, 590px);
  padding: clamp(24px, 4vw, 38px);
  background:
    linear-gradient(180deg, rgba(18, 40, 36, 0.12) 0%, rgba(90, 29, 31, 0.32) 47%, rgba(101, 27, 30, 0.9) 100%),
    linear-gradient(105deg, rgba(18, 44, 38, 0.7), rgba(18, 44, 38, 0.06) 55%, rgba(83, 30, 28, 0.38)),
    url("./assets/sxnu-gate-bg.webp") center 42% / cover;
  border: 1px solid rgba(255, 253, 248, 0.68);
  border-radius: 26px;
  box-shadow:
    0 28px 65px rgba(72, 32, 28, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.welcome-hero::before {
  position: absolute;
  z-index: -1;
  top: -112px;
  right: -88px;
  width: 330px;
  height: 330px;
  content: "";
  border: 1px solid rgba(246, 209, 127, 0.42);
  border-radius: 50%;
  box-shadow:
    0 0 0 26px rgba(246, 209, 127, 0.05),
    0 0 0 54px rgba(246, 209, 127, 0.035);
}

.welcome-hero-copy {
  max-width: 650px;
  margin-top: auto;
  padding-top: clamp(28px, 7vh, 54px);
}

.welcome-panel h1 {
  letter-spacing: -0.04em;
}

.welcome-panel h1 span:last-child {
  color: #fff9eb;
}

.welcome-school {
  max-width: max-content;
  padding: 7px 11px;
  background: rgba(16, 41, 35, 0.23);
  border-left: 3px solid var(--gold);
  border-radius: 2px 9px 9px 2px;
  backdrop-filter: blur(6px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-primary,
.hero-secondary {
  min-height: 42px;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hero-primary {
  color: #5e221f;
  background: linear-gradient(135deg, #f7d786, #e7b951);
  border: 1px solid rgba(255, 251, 231, 0.72);
  box-shadow: 0 11px 25px rgba(37, 21, 17, 0.25);
}

.hero-primary span {
  margin-left: 8px;
  font-size: 17px;
  line-height: 0;
}

.hero-secondary {
  color: white;
  background: rgba(255, 253, 248, 0.11);
  border: 1px solid rgba(255, 253, 248, 0.42);
  backdrop-filter: blur(10px);
}

.hero-primary:hover,
.hero-secondary:hover {
  transform: translateY(-2px);
}

.hero-primary:hover {
  box-shadow: 0 15px 30px rgba(37, 21, 17, 0.33);
}

.hero-secondary:hover {
  background: rgba(255, 253, 248, 0.22);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 19px;
  margin-top: 18px;
  color: rgba(255, 253, 248, 0.9);
  font-size: 11px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.hero-metrics span + span {
  position: relative;
}

.hero-metrics span + span::before {
  position: absolute;
  left: -11px;
  width: 3px;
  height: 3px;
  content: "";
  background: var(--gold);
  border-radius: 50%;
}

.hero-metrics b {
  color: #f7d786;
  font-size: 18px;
  line-height: 1;
}

.knowledge-status {
  margin-top: 20px;
  padding: 11px 13px;
  background: rgba(255, 253, 248, 0.66);
  border: 1px solid rgba(222, 213, 199, 0.9);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(65, 49, 35, 0.05);
}

.knowledge-status {
  position: relative;
  overflow: hidden;
}

.knowledge-status::before {
  position: absolute;
  top: 0;
  left: 13%;
  width: 74%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.82;
}

.official-links a,
.official-links > span {
  box-shadow: 0 6px 16px rgba(65, 49, 35, 0.05);
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease;
}

.official-links a:hover {
  transform: translateY(-1px);
}

.quick-question,
.promo-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.quick-question:hover,
.promo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(65, 49, 35, 0.1);
}

.knowledge-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 18px;
  color: var(--forest);
  font-size: 11px;
}

.knowledge-status span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pitfall-guide {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 17px 18px;
  overflow: hidden;
  color: #fffaf0;
  text-align: left;
  background: linear-gradient(112deg, #6e211e, #983a31 58%, #b85d4f);
  border: 1px solid rgba(255, 239, 201, 0.42);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(102, 37, 31, 0.16);
}

.pitfall-guide::after {
  position: absolute;
  top: -54px;
  right: -34px;
  width: 150px;
  height: 150px;
  content: "";
  border: 1px solid rgba(248, 211, 123, 0.42);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(248, 211, 123, 0.06);
}

.pitfall-guide > div,
.pitfall-guide button {
  position: relative;
  z-index: 1;
}

.pitfall-guide-kicker {
  display: block;
  margin-bottom: 3px;
  color: #f7d786;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.pitfall-guide h2 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 22px;
}

.pitfall-guide p {
  max-width: 440px;
  margin: 4px 0 0;
  color: rgba(255, 250, 240, 0.86);
  font-size: 11px;
  line-height: 1.55;
}

.pitfall-guide button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  color: #65231f;
  font-size: 11px;
  font-weight: 900;
  background: #f7d786;
  border: 1px solid rgba(255, 250, 230, 0.75);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(49, 20, 17, 0.2);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.pitfall-guide button:hover {
  box-shadow: 0 11px 22px rgba(49, 20, 17, 0.28);
  transform: translateY(-1px);
}

.campus-card-guide {
  margin-top: 14px;
  padding: 18px;
  overflow: hidden;
  text-align: left;
  background:
    radial-gradient(circle at 92% 4%, rgba(215, 163, 67, 0.22), transparent 150px),
    linear-gradient(135deg, #143d35, #24483d 58%, #346355);
  border: 1px solid rgba(215, 163, 67, 0.58);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(29, 63, 53, 0.16);
}

.campus-card-guide-heading > span {
  color: #f6cf73;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.campus-card-guide h2 {
  margin: 4px 0 0;
  color: #fffaf0;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 25px;
}

.campus-card-guide-heading p {
  margin: 4px 0 0;
  color: rgba(255, 250, 240, 0.78);
  font-size: 11px;
}

.campus-card-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.campus-card-guide-item {
  min-height: 126px;
  padding: 13px;
  border-radius: 13px;
}

.campus-card-guide-item b,
.campus-card-guide-item strong {
  display: block;
}

.campus-card-guide-item b {
  font-size: 10px;
  letter-spacing: 0.03em;
}

.campus-card-guide-item strong {
  margin-top: 5px;
  font-size: 15px;
}

.campus-card-guide-item p {
  margin: 7px 0 0;
  font-size: 10px;
  line-height: 1.65;
}

.official-card-item {
  color: #1d453b;
  background: linear-gradient(145deg, #fffdf7, #ecf3e8);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.official-card-item b {
  color: #957025;
}

.telecom-card-item {
  color: #fffaf0;
  background: rgba(255, 253, 248, 0.1);
  border: 1px solid rgba(255, 244, 213, 0.28);
}

.telecom-card-item b {
  color: #f7d786;
}

.campus-card-guide-note {
  margin: 11px 0 0;
  padding: 9px 10px;
  color: rgba(255, 250, 240, 0.92);
  font-size: 10px;
  line-height: 1.6;
  background: rgba(7, 31, 26, 0.24);
  border-left: 3px solid #f2c665;
  border-radius: 2px 8px 8px 2px;
}

.campus-card-guide > button {
  width: 100%;
  min-height: 40px;
  margin-top: 11px;
  color: #1d453b;
  font-size: 11px;
  font-weight: 900;
  background: #f7d786;
  border: 1px solid rgba(255, 252, 236, 0.84);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(9, 30, 26, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.campus-card-guide > button:hover {
  box-shadow: 0 11px 22px rgba(9, 30, 26, 0.3);
  transform: translateY(-1px);
}

.official-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 15px auto 0;
  font-size: 10px;
}

.official-links a,
.official-links > span {
  padding: 6px 10px;
  color: #655d54;
  background: rgba(255, 253, 248, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.official-links a:hover {
  color: var(--brand);
  border-color: rgba(143, 47, 42, 0.35);
}

.knowledge-notice {
  max-width: 660px;
  margin: 14px auto 20px;
  color: #92897e;
  font-size: 10px;
  line-height: 1.6;
}

.quick-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  text-align: left;
}

.quick-heading > span {
  color: #686159;
  font-size: 12px;
  font-weight: 700;
}

.quick-heading button {
  padding: 0;
  color: var(--brand);
  font-size: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

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

.quick-question {
  display: flex;
  position: relative;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: #514b44;
  text-align: left;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid #e5d8b9;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(69, 52, 35, 0.04);
  cursor: pointer;
  transition: 160ms ease;
}

.quick-question::after {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 2px;
  content: "";
  background: linear-gradient(var(--gold), var(--brand-light));
  border-radius: 0 2px 2px 0;
  opacity: 0.55;
}

.quick-question:hover {
  color: var(--brand);
  background: white;
  border-color: rgba(143, 47, 42, 0.34);
  box-shadow: 0 12px 28px rgba(93, 53, 36, 0.08);
  transform: translateY(-2px);
}

.quick-question span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--gold-soft);
  border-radius: 9px;
}

.quick-question span:last-child {
  font-size: 12px;
  line-height: 1.45;
}

.category-strip {
  display: flex;
  gap: 7px;
  margin-top: 14px;
  padding: 2px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar,
.library-filters::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  color: #686159;
  font-size: 10px;
  background: rgba(255, 253, 248, 0.68);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.category-pill:hover {
  color: var(--brand);
  background: white;
}

.promo-section {
  margin-top: 20px;
  padding-top: 18px;
  text-align: left;
  border-top: 1px solid rgba(222, 213, 199, 0.9);
  content-visibility: auto;
  contain-intrinsic-size: auto 250px;
}

.promo-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}

.promo-heading span {
  color: var(--brand);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.promo-heading h2 {
  margin: 3px 0 0;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 20px;
}

.promo-heading small {
  color: #948a7f;
  font-size: 9px;
}

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

.promo-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  text-align: left;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(65, 49, 35, 0.05);
  cursor: pointer;
  transition: 160ms ease;
}

.promo-card:hover {
  background: white;
  border-color: rgba(143, 47, 42, 0.34);
  box-shadow: 0 15px 34px rgba(79, 51, 35, 0.09);
  transform: translateY(-2px);
}

.promo-visual {
  position: relative;
  display: block;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  overflow: hidden;
  background: #f0ebe3;
  border-radius: 12px;
}

.promo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 57%;
  filter: saturate(0.82) contrast(1.04);
  transform: scale(1.48);
}

.promo-visual i {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: white;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  background: var(--brand);
  border: 2px solid white;
  border-radius: 8px;
}

.money-card .promo-visual i {
  color: var(--forest);
  background: var(--gold);
}

.promo-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.promo-copy strong {
  font-size: 12px;
  line-height: 1.4;
}

.promo-copy small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.promo-card > b {
  color: var(--brand);
  font-size: 15px;
}

.message-list {
  display: flex;
  width: min(820px, calc(100% - 28px));
  min-height: 100%;
  margin: 0 auto;
  flex-direction: column;
  gap: 16px;
  padding: 26px 0 34px;
}

.conversation-intro {
  align-self: center;
  margin-bottom: 2px;
  padding: 7px 11px;
  color: #8d8479;
  font-size: 9px;
  background: rgba(235, 227, 214, 0.78);
  border-radius: 999px;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.message-row.user {
  justify-content: flex-end;
}

.message-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 15px;
  font-weight: 800;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(101, 38, 32, 0.16);
}

.message-avatar.user-avatar {
  color: var(--forest);
  background: var(--forest-soft);
  box-shadow: none;
}

.message-bubble {
  max-width: min(680px, calc(100% - 44px));
  padding: 14px 16px;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: 6px 18px 18px;
  box-shadow: 0 10px 28px rgba(54, 43, 31, 0.06);
}

.message-row.user .message-bubble {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 0;
  border-radius: 18px 6px 18px 18px;
  box-shadow: 0 10px 24px rgba(104, 34, 29, 0.15);
}

.message-bubble > p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-line;
}

.answer-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 9px;
  padding: 4px 8px;
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
  background: var(--brand-soft);
  border-radius: 999px;
}

.answer-title {
  margin: 0 0 9px;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 19px;
  line-height: 1.4;
}

.answer-content {
  color: #4e4841;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-line;
}

.answer-content a,
.library-detail-content a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.answer-source {
  margin-top: 12px;
  padding-top: 10px;
  color: #948b80;
  font-size: 9px;
  line-height: 1.55;
  border-top: 1px dashed var(--line);
}

.related-questions {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.related-questions span {
  color: #8b8278;
  font-size: 9px;
}

.related-questions button {
  padding: 9px 11px;
  color: #5d564e;
  text-align: left;
  background: #f5efe5;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}

.related-questions button:hover {
  color: var(--brand);
  border-color: var(--brand-soft);
}

.thinking-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 70px;
  min-height: 48px;
}

.thinking-bubble i {
  width: 6px;
  height: 6px;
  background: #a59b90;
  border-radius: 50%;
  animation: thinking 1.1s infinite ease-in-out;
}

.thinking-bubble i:nth-child(2) {
  animation-delay: 0.14s;
}

.thinking-bubble i:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes thinking {
  0%,
  70%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.no-answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.no-answer-actions button {
  padding: 8px 11px;
  color: var(--brand);
  font-size: 10px;
  background: var(--brand-soft);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.composer-wrap {
  position: relative;
  z-index: 15;
  flex: 0 0 auto;
  background: rgba(255, 253, 248, 0.96);
  border-top: 1px solid rgba(222, 213, 199, 0.92);
  box-shadow: 0 -12px 34px rgba(59, 46, 34, 0.05);
  backdrop-filter: blur(16px);
}

.composer-inner {
  width: min(860px, calc(100% - 28px));
  margin: 0 auto;
  padding: 10px 0 8px;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 9px;
}

.composer textarea {
  width: 100%;
  max-height: 120px;
  min-height: 48px;
  padding: 13px 16px;
  overflow-y: auto;
  color: var(--ink);
  line-height: 1.5;
  resize: none;
  background: #faf8f3;
  border: 1px solid #d8cfc1;
  border-radius: 16px;
  outline: 0;
  transition: 150ms ease;
}

.composer textarea:focus {
  background: white;
  border-color: rgba(143, 47, 42, 0.44);
  box-shadow: 0 0 0 4px rgba(143, 47, 42, 0.07);
}

.composer textarea::placeholder {
  color: #aaa197;
}

.composer > button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  color: white;
  background: var(--brand);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(117, 38, 32, 0.18);
  transition: 160ms ease;
}

.composer > button span {
  font-size: 23px;
  line-height: 1;
  transform: translateY(-1px);
}

.composer > button:hover:not(:disabled) {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.composer > button:disabled {
  color: #b7afa5;
  background: #e4ddd3;
  box-shadow: none;
  cursor: not-allowed;
}

.composer-meta {
  display: flex;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 5px;
  color: #a0988e;
  font-size: 8px;
}

.composer-meta button {
  padding: 0;
  color: var(--brand);
  font-size: 9px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.composer-inner > p {
  margin: 0;
  color: #aaa197;
  text-align: center;
  font-size: 8px;
  line-height: 1.4;
}

.panel-dialog {
  width: min(920px, calc(100% - 26px));
  max-height: min(88dvh, 820px);
  padding: 0;
  color: var(--ink);
  background: var(--paper-light);
  border: 0;
  border-radius: 24px;
  box-shadow: 0 35px 120px rgba(34, 27, 21, 0.36);
}

.panel-dialog::backdrop {
  background: rgba(35, 29, 25, 0.58);
  backdrop-filter: blur(5px);
}

.dialog-header {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.dialog-header p {
  margin: 0 0 3px;
  color: var(--brand);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.dialog-header h2 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 27px;
}

.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  color: #5f584f;
  font-size: 24px;
  line-height: 1;
  background: #f0eae1;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.library-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 24px 0;
}

.library-tabs button {
  padding: 9px 13px;
  color: var(--muted);
  font-size: 11px;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.library-tabs button.active {
  color: white;
  background: var(--brand);
}

.library-tabs span {
  margin-left: 4px;
  opacity: 0.72;
}

.library-search-wrap {
  display: grid;
  grid-template-columns: 19px 1fr;
  align-items: center;
  gap: 8px;
  margin: 12px 24px 0;
  padding: 4px 13px;
  background: #f5f0e8;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.library-search-wrap svg {
  width: 18px;
  fill: none;
  stroke: #8a8178;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.library-search-wrap input {
  width: 100%;
  padding: 9px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.library-filters {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  padding: 0 24px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.library-filter {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #6e665d;
  font-size: 9px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.library-filter.active {
  color: white;
  background: var(--forest);
  border-color: var(--forest);
}

.library-body {
  min-height: 220px;
  max-height: calc(88dvh - 230px);
  padding: 12px 24px 24px;
  overflow-y: auto;
}

.library-result-summary {
  margin: 0 0 10px;
  color: #958c82;
  font-size: 9px;
}

.library-list {
  display: grid;
  gap: 8px;
}

.library-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px;
  text-align: left;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  transition: 140ms ease;
}

.library-item:hover {
  border-color: rgba(143, 47, 42, 0.32);
  box-shadow: 0 8px 22px rgba(67, 50, 35, 0.06);
  transform: translateX(2px);
}

.library-item-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: #f2ece3;
  border-radius: 10px;
}

.library-item-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.library-item-copy strong {
  font-size: 12px;
  line-height: 1.45;
}

.library-item-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-arrow {
  color: var(--brand);
}

.library-empty {
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
  background: #f7f2ea;
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.library-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.library-detail-back {
  padding: 0;
  color: var(--brand);
  font-size: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.library-detail h3 {
  margin: 14px 0 13px;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 25px;
  line-height: 1.4;
}

.library-detail-content {
  color: #504a43;
  font-size: 12px;
  line-height: 1.85;
  white-space: pre-line;
}

.library-section {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.library-section h4 {
  margin: 0 0 7px;
  color: var(--brand);
  font-size: 13px;
}

.library-detail-meta {
  margin-top: 18px;
  padding: 11px 12px;
  color: #8e857a;
  font-size: 9px;
  line-height: 1.55;
  background: #f3eee6;
  border-radius: 10px;
}

.ask-this-button,
.primary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0 16px;
  color: white;
  font-weight: 700;
  background: var(--brand);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.ask-this-button:hover,
.primary-button:hover {
  background: var(--brand-dark);
}

.feedback-dialog,
.official-dialog {
  width: min(560px, calc(100% - 26px));
}

.feedback-copy {
  padding: 18px 24px 0;
}

.feedback-copy p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.feedback-copy strong {
  color: var(--forest);
  font-size: 10px;
}

.feedback-form {
  display: grid;
  gap: 14px;
  padding: 18px 24px 24px;
}

.feedback-form label {
  display: grid;
  gap: 7px;
}

.feedback-form label > span {
  font-size: 11px;
  font-weight: 700;
}

.feedback-form small {
  color: var(--muted);
  font-weight: 400;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: #f8f4ed;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
}

.feedback-form textarea {
  resize: vertical;
}

.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
  background: white;
  border-color: rgba(143, 47, 42, 0.44);
  box-shadow: 0 0 0 3px rgba(143, 47, 42, 0.07);
}

.privacy-note {
  margin: -3px 0 0;
  color: #998f84;
  font-size: 9px;
}

.feedback-form .primary-button {
  width: 100%;
  margin-top: 0;
}

.official-card-list {
  display: grid;
  gap: 10px;
  padding: 20px 24px 0;
}

.official-card-list > a,
.official-phone-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f7f2ea;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.official-card-list > a:hover {
  border-color: rgba(143, 47, 42, 0.35);
  transform: translateX(2px);
}

.official-card-list > a > span,
.official-phone-card > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: white;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
  font-weight: 700;
  background: var(--brand);
  border-radius: 11px;
}

.official-card-list div {
  display: grid;
  gap: 3px;
}

.official-card-list strong {
  font-size: 12px;
}

.official-card-list small {
  color: var(--muted);
  font-size: 9px;
}

.official-card-list b {
  color: var(--brand);
}

.official-warning {
  margin: 16px 24px 24px;
  padding: 12px;
  color: #76602e;
  font-size: 10px;
  line-height: 1.6;
  background: var(--gold-soft);
  border-radius: 11px;
}

.promo-dialog {
  width: min(520px, calc(100% - 26px));
}

.promo-dialog-body {
  padding: 20px 24px 24px;
  text-align: center;
}

.promo-dialog-description {
  max-width: 400px;
  margin: 0 auto 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.promo-qr-frame {
  width: min(330px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 15px 38px rgba(61, 46, 34, 0.1);
}

.promo-qr-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.promo-long-press {
  margin: 13px 0 0;
  color: #8e857b;
  font-size: 9px;
  line-height: 1.55;
}

.promo-wechat-link {
  margin-top: 13px;
}

.promo-safety {
  margin-top: 15px;
  padding: 12px;
  color: #755d2c;
  text-align: left;
  font-size: 9px;
  line-height: 1.65;
  background: var(--gold-soft);
  border-radius: 11px;
}

.promo-safety strong {
  display: block;
  margin-bottom: 3px;
  color: #614918;
  font-size: 10px;
}

.share-dialog {
  width: min(500px, calc(100% - 26px));
}

.share-dialog-body {
  display: grid;
  justify-items: center;
  padding: 20px 24px 25px;
  text-align: center;
}

.share-description {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.share-qr-frame {
  width: min(330px, 100%);
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 15px 38px rgba(61, 46, 34, 0.1);
}

.share-qr-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.share-dialog-body > strong {
  margin-top: 13px;
  color: var(--forest);
  font-size: 10px;
}

.share-site-url {
  margin-top: 8px;
  color: var(--brand);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.share-dialog-body .primary-button {
  margin-top: 15px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 112px;
  max-width: calc(100% - 40px);
  padding: 11px 15px;
  color: white;
  font-size: 11px;
  background: var(--forest);
  border-radius: 11px;
  box-shadow: 0 14px 38px rgba(33, 54, 46, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 170ms ease;
}

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

@media (max-width: 700px) {
  .header-inner {
    width: calc(100% - 20px);
    min-height: 60px;
  }

  .header-avatar {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions button {
    width: 34px;
    height: 34px;
  }

  .welcome-panel {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .welcome-hero {
    min-height: 456px;
    padding: 18px;
    background-position: center top;
  }

  .profile-emblem {
    width: 58px;
    height: 58px;
  }

  .profile-emblem span {
    font-size: 26px;
  }

  .welcome-badge {
    min-height: 28px;
    padding: 0 11px;
    font-size: 11px;
  }

  .welcome-hero-copy {
    padding-top: 130px;
  }

  .welcome-panel h1 {
    font-size: 40px;
  }

  .welcome-school {
    font-size: 15px;
  }

  .knowledge-status {
    display: grid;
    gap: 5px;
  }

  .official-links {
    gap: 6px;
  }

  .quick-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quick-question {
    min-height: 45px;
    padding: 9px 12px;
  }

  .category-strip {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

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

  .promo-card {
    padding: 10px;
  }

  .promo-visual {
    width: 62px;
    height: 62px;
  }

  .promo-heading h2 {
    font-size: 18px;
  }

  .message-list {
    width: calc(100% - 20px);
    padding-top: 20px;
  }

  .message-avatar {
    width: 31px;
    height: 31px;
    font-size: 14px;
  }

  .message-bubble {
    max-width: calc(100% - 38px);
    padding: 12px 13px;
  }

  .composer-inner {
    width: calc(100% - 20px);
    padding-top: 8px;
  }

  .composer textarea {
    min-height: 46px;
    padding: 12px 13px;
    font-size: 13px;
  }

  .composer > button {
    width: 46px;
    height: 46px;
  }

  .composer-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 10px);
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }

  .dialog-header {
    padding: 18px 17px 13px;
  }

  .dialog-header h2 {
    font-size: 24px;
  }

  .library-tabs,
  .library-filters {
    padding-right: 17px;
    padding-left: 17px;
  }

  .library-search-wrap {
    margin-right: 17px;
    margin-left: 17px;
  }

  .library-body {
    max-height: calc(100dvh - 240px);
    padding-right: 17px;
    padding-left: 17px;
  }

  .feedback-copy,
  .feedback-form,
  .official-card-list,
  .promo-dialog-body,
  .share-dialog-body {
    padding-right: 17px;
    padding-left: 17px;
  }

  .official-warning {
    margin-right: 17px;
    margin-left: 17px;
  }

  .toast {
    right: 12px;
    bottom: 104px;
    max-width: calc(100% - 24px);
  }
}

@media (max-height: 720px) and (min-width: 701px) {
  .welcome-panel {
    padding-top: 18px;
  }

  .welcome-hero {
    min-height: 430px;
  }

  .profile-emblem {
    width: 60px;
    height: 60px;
  }

  .profile-emblem span {
    font-size: 27px;
  }

  .welcome-hero-copy {
    padding-top: 28px;
  }

  .welcome-panel h1 {
    font-size: clamp(40px, 5.6vw, 56px);
  }

  .knowledge-notice {
    margin-bottom: 12px;
  }

  .quick-question {
    min-height: 42px;
    padding-block: 8px;
  }
}

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

@media (max-width: 700px) {
  .welcome-hero {
    min-height: 520px;
    border-radius: 22px;
  }

  .welcome-hero-copy {
    padding-top: 62px;
  }

  .welcome-panel h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .welcome-school {
    margin-top: 12px;
    font-size: 13px;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 15px;
  }

  .hero-primary,
  .hero-secondary {
    min-height: 39px;
    padding: 0 14px;
    font-size: 12px;
  }

  .hero-metrics {
    gap: 6px 14px;
    margin-top: 14px;
    font-size: 10px;
  }

  .hero-metrics b {
    font-size: 15px;
  }

  .hero-metrics span + span::before {
    left: -9px;
  }

  .knowledge-status {
    padding: 10px 11px;
  }

  .pitfall-guide {
    display: grid;
    gap: 11px;
    padding: 15px;
  }

  .pitfall-guide h2 {
    font-size: 20px;
  }

  .pitfall-guide button {
    width: 100%;
  }

  .campus-card-guide {
    padding: 15px;
  }

  .campus-card-guide h2 {
    font-size: 22px;
  }

  .campus-card-guide-grid {
    grid-template-columns: 1fr;
  }

  .campus-card-guide-item {
    min-height: 0;
  }

  .welcome-badge,
  .welcome-tagline,
  .welcome-school,
  .hero-secondary {
    backdrop-filter: none;
  }

  .welcome-hero {
    box-shadow: 0 18px 40px rgba(72, 32, 28, 0.18);
  }
}
