:root {
  --ink: #17342d;
  --muted: #677d76;
  --forest: #123f35;
  --forest-2: #1d5c4d;
  --jade: #2f8068;
  --mint: #dff3eb;
  --cream: #fbf8ef;
  --paper: #fffdf8;
  --gold: #e3b85d;
  --line: rgba(18, 63, 53, 0.11);
  --shadow: 0 24px 80px rgba(17, 63, 52, 0.13);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e8f0eb;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

body {
  min-height: 100dvh;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
}

.ambient-one {
  width: 32vw;
  height: 32vw;
  min-width: 260px;
  min-height: 260px;
  top: -10vw;
  left: -8vw;
  background: rgba(103, 176, 149, 0.28);
}

.ambient-two {
  width: 42vw;
  height: 42vw;
  min-width: 300px;
  min-height: 300px;
  right: -14vw;
  bottom: -18vw;
  background: rgba(227, 184, 93, 0.18);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 780px);
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  min-height: 70px;
  padding: 11px 18px;
  padding-top: max(11px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: white;
  background: rgba(18, 63, 53, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(244, 213, 141, 0.95);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-copy span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  white-space: nowrap;
}

.brand-copy i,
.local-badge i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #56d889;
  box-shadow: 0 0 0 4px rgba(86, 216, 137, 0.12);
}

.source-button,
.icon-button,
.clear-button {
  height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  transition: 0.2s ease;
}

.source-button {
  padding: 0 12px;
  gap: 6px;
  font-size: 12px;
}

.source-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button {
  width: 40px;
}

.clear-button {
  padding: 0 13px;
  font-size: 12px;
}

.source-button:hover,
.icon-button:hover,
.clear-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.content {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-color: rgba(18, 63, 53, 0.2) transparent;
  scrollbar-width: thin;
}

.content:focus {
  outline: 0;
}

.home-view {
  padding: 18px;
  animation: view-in 0.35s ease both;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 33px 28px 28px;
  text-align: center;
  color: white;
  background:
    radial-gradient(circle at 18% 6%, rgba(111, 190, 157, 0.35), transparent 26%),
    radial-gradient(circle at 92% 90%, rgba(227, 184, 93, 0.2), transparent 28%),
    linear-gradient(145deg, #113b32, #1b5e4e 72%, #256d59);
  border-radius: 28px;
  box-shadow: 0 20px 46px rgba(18, 63, 53, 0.19);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(30deg, transparent 24%, currentColor 25%, currentColor 26%, transparent 27%, transparent 74%, currentColor 75%, currentColor 76%, transparent 77%),
    linear-gradient(150deg, transparent 24%, currentColor 25%, currentColor 26%, transparent 27%, transparent 74%, currentColor 75%, currentColor 76%, transparent 77%);
  background-size: 48px 84px;
  pointer-events: none;
}

.hero-avatar-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto 18px;
}

.hero-avatar {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #f2d486;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.hero-orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.orbit-one {
  inset: -8px;
}

.orbit-two {
  inset: -17px;
  border-style: dashed;
  animation: spin 18s linear infinite;
}

.online-badge {
  position: absolute;
  z-index: 3;
  right: 5px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  border: 4px solid #17483d;
  border-radius: 50%;
  background: #5cda8b;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 9px;
}

.eyebrow span {
  padding: 5px 11px;
  color: #f2d486;
  background: rgba(242, 212, 134, 0.1);
  border: 1px solid rgba(242, 212, 134, 0.25);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.hero-card h1 {
  margin: 0;
  font-family: "STZhongsong", "Songti SC", "SimSun", serif;
  font-size: clamp(30px, 7vw, 42px);
  letter-spacing: 0.02em;
}

.hero-card h1 span {
  display: inline-block;
  font-family: sans-serif;
  transform-origin: bottom right;
  animation: wave 2.5s ease-in-out infinite;
}

.hero-lead {
  max-width: 480px;
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.8;
}

.hero-tags {
  margin: 17px 0 21px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hero-tags span {
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 11px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button {
  color: #143c33;
  background: linear-gradient(135deg, #f4d991, #e6b957);
  box-shadow: 0 8px 20px rgba(229, 184, 87, 0.25);
}

.secondary-button {
  color: white;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.primary-button svg,
.secondary-button svg {
  width: 17px;
  height: 17px;
}

.primary-button:hover,
.secondary-button:hover,
.question-card:hover,
.qr-button:hover {
  transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active,
.question-card:active,
.qr-button:active {
  transform: scale(0.98);
}

.notice-strip {
  margin: 14px 2px 30px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #806621;
  background: #fff7d9;
  border: 1px solid #f2e4ae;
  border-radius: 15px;
}

.notice-strip svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.notice-strip p {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
}

.notice-strip strong {
  margin-right: 4px;
}

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

.section-heading.compact {
  margin-bottom: 13px;
}

.section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--jade);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.section-kicker.light {
  color: #f2d486;
}

.section-heading h2,
.contact-copy h2 {
  margin: 0;
  font-family: "STZhongsong", "Songti SC", "SimSun", serif;
  font-size: 22px;
}

.local-badge {
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--jade);
  background: var(--mint);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.local-badge i {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

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

.question-card {
  position: relative;
  min-height: 104px;
  padding: 14px;
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: 0 8px 24px rgba(17, 63, 52, 0.06);
  transition: 0.2s ease;
}

.question-card::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  right: -30px;
  bottom: -34px;
  border-radius: 50%;
  background: var(--card-tint, #edf7f2);
}

.question-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 11px;
  display: grid;
  place-items: center;
  color: var(--card-color, var(--jade));
  background: var(--card-tint, #edf7f2);
  border-radius: 11px;
}

.question-icon svg {
  width: 18px;
  height: 18px;
}

.question-card strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 13px;
  line-height: 1.45;
}

.question-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 4px;
  color: #899b95;
  font-size: 10px;
}

.campus-section {
  margin-top: 34px;
}

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

.campus-card {
  position: relative;
  padding: 18px;
  overflow: hidden;
  border-radius: 22px;
}

.campus-xuecheng {
  color: #164a3d;
  background: linear-gradient(145deg, #dff3eb, #eff9f5);
  border: 1px solid #cbe8dd;
}

.campus-shizhong {
  color: #6f4a21;
  background: linear-gradient(145deg, #fbecd6, #fff7ec);
  border: 1px solid #f0ddc1;
}

.campus-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.campus-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest-2);
  border-radius: 13px;
  font-family: "STZhongsong", "Songti SC", serif;
  font-size: 19px;
  font-weight: 800;
}

.campus-shizhong .campus-icon {
  background: #b57939;
}

.campus-number {
  opacity: 0.18;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 900;
}

.campus-card h3 {
  margin: 16px 0 3px;
  font-size: 17px;
}

.campus-card > p {
  margin: 0;
  opacity: 0.7;
  font-size: 10px;
}

.campus-card ul {
  margin: 13px 0;
  padding: 0;
  display: grid;
  gap: 5px;
  list-style: none;
  font-size: 11px;
}

.campus-card li::before {
  content: "·";
  margin-right: 6px;
  font-weight: 900;
}

.campus-card button {
  padding: 0;
  color: currentColor;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.campus-card button span {
  margin-left: 3px;
}

.contact-card {
  position: relative;
  margin-top: 34px;
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, #123f35, #235f4f);
  border-radius: 25px;
  box-shadow: 0 16px 35px rgba(18, 63, 53, 0.18);
}

.contact-glow {
  position: absolute;
  width: 190px;
  height: 190px;
  right: -70px;
  top: -80px;
  border-radius: 50%;
  background: rgba(227, 184, 93, 0.15);
}

.contact-profile {
  position: relative;
  align-self: start;
}

.contact-profile img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border: 3px solid #efd27f;
  border-radius: 19px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.contact-spark {
  position: absolute;
  right: -7px;
  top: -10px;
  color: #f6dc8c;
  font-size: 21px;
}

.contact-copy {
  position: relative;
  z-index: 1;
}

.contact-copy h2 {
  color: white;
  font-size: 21px;
}

.contact-copy > p {
  margin: 7px 0 13px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.7;
}

.wechat-number {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.wechat-number span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.wechat-number strong {
  color: #f5d77e;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.wechat-number button {
  padding: 4px 8px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  font-size: 9px;
}

.qr-button {
  grid-column: 1 / -1;
  min-height: 42px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #173e34;
  background: linear-gradient(135deg, #f5dc92, #e5b957);
  border-radius: 13px;
  font-size: 12px;
  font-weight: 800;
  transition: 0.18s ease;
}

.qr-button svg {
  width: 18px;
  height: 18px;
}

.page-footer {
  margin: 28px 2px 2px;
  padding: 15px 3px 5px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.footer-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #f2d486;
  background: var(--forest);
  border-radius: 10px;
  font-family: "STZhongsong", "Songti SC", serif;
  font-weight: 800;
}

.page-footer strong {
  display: block;
  font-size: 10px;
}

.page-footer p {
  margin: 3px 0 0;
  color: #92a09b;
  font-size: 9px;
}

.page-footer button {
  padding: 7px 9px;
  color: var(--jade);
  background: var(--mint);
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
}

.composer {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  padding: 10px 16px calc(8px + var(--safe-bottom));
  background: rgba(255, 253, 248, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px rgba(18, 63, 53, 0.05);
  backdrop-filter: blur(16px);
}

.composer-inner {
  min-height: 47px;
  padding: 5px 5px 5px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f1f4ef;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: 0.2s ease;
}

.composer-inner:focus-within {
  background: white;
  border-color: rgba(47, 128, 104, 0.35);
  box-shadow: 0 0 0 4px rgba(47, 128, 104, 0.08);
}

.composer-spark {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--jade);
}

.composer input {
  min-width: 0;
  flex: 1;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.composer input::placeholder {
  color: #95a39e;
}

.send-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 12px;
  transition: 0.2s ease;
}

.send-button:disabled {
  color: #a9b4b0;
  background: #dfe5e2;
  cursor: not-allowed;
}

.send-button:not(:disabled):hover {
  background: var(--jade);
  transform: translateY(-1px);
}

.send-button svg {
  width: 17px;
  height: 17px;
}

.composer > p {
  margin: 5px 0 0;
  text-align: center;
  color: #9aa7a2;
  font-size: 8px;
}

.chat-view {
  min-height: 100%;
  padding: 18px;
  background:
    linear-gradient(rgba(250, 248, 240, 0.93), rgba(250, 248, 240, 0.93)),
    radial-gradient(circle at 20% 10%, rgba(47, 128, 104, 0.14), transparent 30%);
  animation: view-in 0.28s ease both;
}

.chat-intro {
  margin-bottom: 20px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #5f756e;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.chat-intro span {
  padding: 5px 8px;
  flex: 0 0 auto;
  color: var(--jade);
  background: var(--mint);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}

.chat-intro p {
  margin: 0;
  font-size: 9px;
  line-height: 1.5;
}

.messages {
  display: grid;
  gap: 18px;
}

.message-block {
  display: grid;
  gap: 10px;
  animation: bubble-in 0.32s ease both;
}

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

.user-bubble {
  max-width: 82%;
  padding: 11px 14px;
  color: white;
  background: linear-gradient(135deg, var(--forest-2), var(--jade));
  border-radius: 17px 17px 4px 17px;
  box-shadow: 0 8px 20px rgba(47, 128, 104, 0.15);
  font-size: 13px;
  line-height: 1.6;
}

.assistant-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 9px;
}

.assistant-avatar {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 2px solid #ebcc79;
  border-radius: 11px;
}

.answer-card {
  min-width: 0;
  padding: 17px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px 19px 19px 19px;
  box-shadow: 0 10px 30px rgba(18, 63, 53, 0.07);
}

.answer-header {
  padding-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf1ee;
}

.answer-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.answer-header .answer-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--jade);
  background: var(--mint);
  border-radius: 9px;
}

.answer-icon svg {
  width: 16px;
  height: 16px;
}

.answer-header h2 {
  margin: 0;
  font-size: 15px;
}

.answer-header small {
  display: block;
  margin-top: 3px;
  color: #94a29d;
  font-size: 8px;
}

.verified-pill {
  padding: 5px 7px;
  flex: 0 0 auto;
  color: #286f5c;
  background: #e9f7f1;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
}

.answer-intro {
  margin: 13px 0 0;
  color: #465d56;
  font-size: 12px;
  line-height: 1.8;
}

.answer-section {
  margin-top: 15px;
}

.answer-section h3 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--forest);
  font-size: 12px;
}

.answer-section h3::before {
  content: "";
  width: 4px;
  height: 13px;
  background: linear-gradient(var(--jade), var(--gold));
  border-radius: 999px;
}

.answer-section p {
  margin: 0;
  color: #556b64;
  font-size: 11px;
  line-height: 1.8;
}

.answer-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.answer-list li {
  position: relative;
  padding-left: 16px;
  color: #556b64;
  font-size: 11px;
  line-height: 1.7;
}

.answer-list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ab7a3;
}

.answer-note {
  margin-top: 14px;
  padding: 11px 12px;
  color: #806621;
  background: #fff8df;
  border-left: 3px solid #e5bd5c;
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.7;
}

.answer-contact {
  margin-top: 15px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  background: linear-gradient(135deg, #17463b, #28745f);
  border-radius: 15px;
}

.answer-contact img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border: 2px solid #f1d37c;
  border-radius: 12px;
}

.answer-contact > div {
  min-width: 0;
  flex: 1;
}

.answer-contact strong {
  display: block;
  font-size: 12px;
}

.answer-contact p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
  line-height: 1.5;
}

.answer-contact button {
  padding: 8px 10px;
  flex: 0 0 auto;
  color: #1b453b;
  background: #f2d37d;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
}

.related-wrap {
  margin: 3px 0 0 43px;
}

.related-wrap > span {
  display: block;
  margin-bottom: 7px;
  color: #879690;
  font-size: 9px;
}

.related-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.related-buttons button {
  padding: 8px 10px;
  color: var(--forest-2);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 9px;
  box-shadow: 0 5px 14px rgba(18, 63, 53, 0.05);
}

.fallback-card .answer-header .answer-icon {
  color: #9a6f2b;
  background: #fff1cf;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(5, 27, 22, 0.72);
  backdrop-filter: blur(10px);
  animation: fade-in 0.2s ease both;
}

.modal-card {
  position: relative;
  width: min(100%, 410px);
  max-height: min(90dvh, 720px);
  padding: 27px;
  overflow-y: auto;
  text-align: center;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 27px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  animation: modal-in 0.25s ease both;
}

.modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #657a73;
  background: #edf2ef;
  border-radius: 11px;
}

.modal-close svg {
  width: 17px;
  height: 17px;
}

.modal-kicker {
  display: block;
  margin-top: 8px;
  color: var(--jade);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.modal-card h2 {
  margin: 7px 0 5px;
  font-family: "STZhongsong", "Songti SC", serif;
  font-size: 25px;
}

.modal-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.qr-frame {
  width: min(100%, 270px);
  height: min(48dvh, 380px);
  margin: 18px auto;
  padding: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(18, 63, 53, 0.1);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 11px;
}

.modal-number {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #edf6f2;
  border-radius: 13px;
}

.modal-number span {
  color: #72867f;
  font-size: 10px;
}

.modal-number strong {
  color: var(--forest);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.modal-number button {
  padding: 5px 8px;
  color: white;
  background: var(--jade);
  border-radius: 7px;
  font-size: 9px;
}

.modal-card .modal-note {
  margin-top: 10px;
  color: #9a7a34;
  font-size: 9px;
}

.source-modal-card {
  text-align: left;
}

.source-modal-card > p {
  max-width: 330px;
}

.source-list {
  margin-top: 18px;
  display: grid;
  gap: 9px;
}

.source-list a {
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: 0.18s ease;
}

.source-list a:hover {
  border-color: rgba(47, 128, 104, 0.38);
  transform: translateY(-1px);
}

.source-list a > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--jade);
  background: var(--mint);
  border-radius: 9px;
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 800;
}

.source-list strong,
.source-list small {
  display: block;
}

.source-list strong {
  font-size: 11px;
}

.source-list small {
  margin-top: 3px;
  color: #8a9994;
  font-size: 9px;
}

.source-list b {
  color: var(--jade);
  font-size: 15px;
}

.source-warning {
  margin-top: 14px;
  padding: 10px;
  color: #866927;
  background: #fff6d8;
  border-radius: 10px;
  font-size: 9px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  padding: 10px 14px;
  color: white;
  background: rgba(15, 52, 43, 0.94);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes wave {
  0%, 70%, 100% { transform: rotate(0); }
  78% { transform: rotate(15deg); }
  86% { transform: rotate(-8deg); }
  94% { transform: rotate(8deg); }
}

@media (min-width: 640px) {
  .home-view,
  .chat-view {
    padding: 24px;
  }

  .hero-card {
    padding: 39px 38px 33px;
  }

  .question-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .question-card {
    min-height: 116px;
  }

  .contact-card {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .qr-button {
    grid-column: auto;
    min-width: 120px;
    align-self: stretch;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding-left: 13px;
    padding-right: 13px;
  }

  .home-view,
  .chat-view {
    padding: 14px;
  }

  .hero-card {
    padding: 29px 16px 23px;
    border-radius: 24px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-button,
  .secondary-button {
    padding: 0 12px;
    font-size: 11px;
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 19px;
  }

  .campus-card {
    padding: 15px;
  }

  .campus-card h3 {
    font-size: 15px;
  }

  .contact-card {
    padding: 18px;
    gap: 12px;
  }

  .contact-profile img {
    width: 58px;
    height: 58px;
  }

  .source-button span {
    display: none;
  }

  .source-button {
    width: 40px;
    padding: 0;
  }

  .answer-card {
    padding: 14px;
  }

  .assistant-row {
    grid-template-columns: 30px 1fr;
    gap: 7px;
  }

  .assistant-avatar {
    width: 30px;
    height: 30px;
  }

  .related-wrap {
    margin-left: 37px;
  }
}

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