:root {
  --red: #9f1230;
  --red-dark: #6f0d22;
  --orange: #c8942e;
  --gold: #d6af63;
  --ink: #111827;
  --muted: #6f7785;
  --paper: #fffaf3;
  --card: #ffffff;
  --line: #ead8d2;
  --soft: #f8efe6;
  --shadow: 0 28px 80px rgba(58, 28, 29, 0.14);
  --deep-shadow: 0 34px 100px rgba(62, 18, 27, 0.22);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 4%, rgba(159, 18, 48, 0.12), transparent 260px),
    radial-gradient(circle at 88% 18%, rgba(200, 148, 46, 0.16), transparent 300px),
    radial-gradient(circle at 16px 16px, rgba(111, 13, 34, 0.04) 1.2px, transparent 1.2px),
    linear-gradient(180deg, #fbf4ec, #fffaf3 46%, #f4eadf);
  background-size: auto, auto, 18px 18px, auto;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Microsoft YaHei", "PingFang SC", serif;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  content: "";
}

body::before {
  inset: 0;
  opacity: 0.45;
  background:
    linear-gradient(90deg, rgba(159, 18, 48, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(159, 18, 48, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

body::after {
  right: -130px;
  bottom: -180px;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(159, 18, 48, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 18, 48, 0.08), transparent 68%);
}

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  display: block;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.72), rgba(82, 18, 31, 0.54)),
    radial-gradient(circle at 50% 0, rgba(214, 175, 99, 0.22), transparent 420px);
  backdrop-filter: blur(6px);
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.login-screen--hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.login-card {
  width: min(390px, 100%);
  margin: min(8vh, 64px) auto;
  padding: 42px 34px 34px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 243, 0.96)),
    radial-gradient(circle at 24% 0, rgba(214, 175, 99, 0.16), transparent 220px);
  box-shadow: var(--deep-shadow);
  text-align: center;
}

.login-card::before {
  display: block;
  width: 54px;
  height: 4px;
  margin: 0 auto 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  content: "";
}

.login-card h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.login-copy {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.login-card label,
.login-card label span {
  display: block;
}

.login-card label {
  margin-bottom: 14px;
  text-align: left;
}

.login-card label span {
  margin-bottom: 8px;
  color: #6c7280;
  font-size: 14px;
  font-weight: 800;
}

.login-card input,
.login-card select {
  width: 100%;
  border: 1px solid #e5d8d1;
  border-radius: 18px;
  outline: 0;
  padding: 15px 16px;
  color: var(--ink);
  background: #fff8ef;
  font-size: 17px;
}

.login-field--phone input:focus {
  border-color: #e0a51e;
  box-shadow: 0 0 0 2px rgba(224, 165, 30, 0.18);
}

.email-hint {
  min-height: 22px;
  margin: 2px 0 16px;
  color: #a65c24;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.saved-login-box {
  position: relative;
  margin: -4px 0 16px 54px;
  padding: 18px 18px 14px;
  border: 1px solid rgba(224, 224, 224, 0.9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(33, 42, 54, 0.18);
  text-align: left;
}

.saved-login-box::before {
  position: absolute;
  top: -9px;
  left: 24px;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  border-left: 1px solid rgba(224, 224, 224, 0.9);
  border-top: 1px solid rgba(224, 224, 224, 0.9);
  background: #fff;
  content: "";
}

.saved-login-box p {
  margin: 0 28px 12px 0;
  color: #6c7280;
  font-size: 13px;
}

.saved-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px !important;
  height: 28px;
  margin: 0 !important;
  padding: 0 !important;
  color: #343b48 !important;
  background: transparent !important;
  font-size: 24px !important;
  line-height: 1;
}

.saved-account {
  width: 100%;
  border: 0;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ink) !important;
  background: transparent !important;
  text-align: left;
}

.saved-account strong,
.saved-account span {
  display: block;
}

.saved-account strong {
  margin-bottom: 8px;
  font-weight: 500;
}

.saved-account span {
  letter-spacing: 3px;
}

.saved-login-box small {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eceff3;
  color: #6c7280;
  text-align: left;
}

.email-hint--ok {
  color: #147567;
}

.login-card input:focus,
.login-card select:focus {
  border-color: rgba(191, 23, 50, 0.48);
}

.login-card button {
  width: 100%;
  border: 0;
  border-radius: 18px;
  margin-top: 14px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-dark), var(--red) 56%, #c44739);
  box-shadow: 0 14px 28px rgba(159, 18, 48, 0.22);
  font-size: 18px;
  font-weight: 900;
}

.login-card .login-ghost {
  color: var(--red);
  background: transparent;
  box-shadow: none;
}

.login-card small {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 16px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 12;
  margin: -8px -10px 20px;
  padding: 10px;
  border: 1px solid rgba(234, 216, 210, 0.42);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.78);
  box-shadow: 0 12px 34px rgba(83, 43, 35, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-seal {
  display: block;
  overflow: hidden;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(151, 17, 42, 0.18);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 22px rgba(141, 16, 37, 0.16);
}

.brand-seal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong {
  display: block;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.top-actions {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 12px;
  color: var(--red);
  font-weight: 900;
}

.profile-pill {
  min-width: 92px;
  border: 1px solid rgba(151, 17, 42, 0.18);
  border-radius: 999px;
  padding: 12px 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.hero-card {
  overflow: hidden;
  position: relative;
  min-height: 360px;
  padding: 40px 30px 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(92, 8, 27, 0.98) 0%, rgba(159, 18, 48, 0.96) 48%, rgba(198, 73, 51, 0.72) 100%),
    url("./assets/places/campus-view-1.jpg") right center / cover no-repeat;
  box-shadow: 0 34px 110px rgba(91, 18, 31, 0.26);
}

.hero-card::before {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background:
    radial-gradient(circle, #fff 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 58%, rgba(255, 255, 255, 0.22) 58% 58.5%, transparent 58.5%);
  background-size: 12px 12px, 100% 100%;
  content: "";
}

.hero-card::after {
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 236, 188, 0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 188, 0.16), transparent 66%);
  content: "";
}

.hero-card > * {
  position: relative;
}

.hero-card p {
  margin: 0 0 26px;
  color: rgba(255, 231, 169, 0.96);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.hero-card h1 {
  margin: 0 0 18px;
  font-size: 40px;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.hero-card h2 {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.75;
}

.hero-card span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 188, 0.22);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.ask-card {
  margin-top: 26px;
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(234, 216, 210, 0.82);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 243, 0.9)),
    radial-gradient(circle at 8% 0, rgba(200, 148, 46, 0.12), transparent 260px);
  box-shadow: var(--shadow);
}

.ask-card::before {
  position: absolute;
  top: 0;
  right: 34px;
  left: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 175, 99, 0.62), transparent);
  content: "";
}

.desktop-content {
  display: block;
}

.ask-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.ask-head h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0.02em;
}

.ask-head span {
  color: var(--muted);
  font-size: 13px;
}

.chat-list {
  display: grid;
  max-height: 300px;
  overflow: auto;
  gap: 12px;
  padding: 2px 4px 2px 0;
  scrollbar-color: rgba(159, 18, 48, 0.36) transparent;
}

.message {
  display: flex;
}

.message p {
  max-width: 88%;
  margin: 0;
  padding: 15px 17px;
  border-radius: 20px;
  line-height: 1.75;
}

.message aside {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 4px solid rgba(179, 22, 45, 0.55);
  border-radius: 12px;
  color: #8a5a22;
  background: #fff7e8;
  line-height: 1.65;
}

.message--assistant {
  justify-content: flex-start;
}

.message--assistant p {
  color: #334155;
  border: 1px solid rgba(234, 216, 210, 0.72);
  background: linear-gradient(180deg, #f8f3ec, #f2ede7);
}

.message--assistant {
  display: block;
}

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

.message--user p {
  margin-left: auto;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #c44739 58%, var(--orange));
  box-shadow: 0 14px 28px rgba(159, 18, 48, 0.18);
}

.answer-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.answer-gallery figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(234, 216, 210, 0.92);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(83, 43, 35, 0.08);
}

.answer-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.answer-gallery figure:hover img {
  transform: scale(1.035);
  filter: saturate(1.04) contrast(1.02);
}

.preview-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
}

.answer-gallery figcaption {
  padding: 9px 10px 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.answer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.answer-links a {
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #c44739);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(159, 18, 48, 0.16);
}

.follow-up-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  max-width: 88%;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.follow-up-buttons span {
  width: 100%;
}

.follow-up-buttons button {
  border: 1px solid rgba(191, 23, 50, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: #8f1830;
  background: rgba(255, 250, 248, 0.86);
  font-weight: 700;
  cursor: pointer;
}

.image-preview {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(12, 17, 25, 0.82);
  backdrop-filter: blur(5px);
}

.image-preview[hidden] {
  display: none;
}

.image-preview img {
  max-width: min(980px, 94vw);
  max-height: 78vh;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  object-fit: contain;
}

.image-preview button {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 30px;
  line-height: 1;
}

.image-preview p {
  max-width: min(860px, 90vw);
  margin: 14px auto 0;
  color: #fff;
  text-align: center;
  line-height: 1.6;
}

.senior-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.72), rgba(82, 18, 31, 0.56)),
    radial-gradient(circle at 50% 0, rgba(214, 175, 99, 0.2), transparent 440px);
  backdrop-filter: blur(6px);
  -webkit-overflow-scrolling: touch;
}

.senior-modal[hidden] {
  display: none;
}

.senior-dialog {
  position: relative;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 38px 34px 34px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 243, 0.96)),
    radial-gradient(circle at 16% 0, rgba(214, 175, 99, 0.14), transparent 220px);
  box-shadow: var(--deep-shadow);
}

.senior-dialog::before {
  display: block;
  width: 48px;
  height: 4px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  content: "";
}

.senior-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #5d6675;
  background: #f6f1ec;
  font-size: 26px;
  line-height: 1;
}

.senior-dialog h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
  text-align: center;
}

.senior-dialog > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  text-align: center;
}

.senior-dialog label {
  display: block;
  margin-top: 14px;
}

.senior-dialog label span {
  display: block;
  margin-bottom: 8px;
  color: #6c7280;
  font-size: 14px;
  font-weight: 800;
}

.senior-dialog input,
.senior-dialog textarea {
  width: 100%;
  border: 1px solid #e5d8d1;
  border-radius: 18px;
  outline: 0;
  padding: 15px 16px;
  color: var(--ink);
  background: #fffaf8;
  font-size: 16px;
  resize: vertical;
}

.senior-dialog input:focus,
.senior-dialog textarea:focus {
  border-color: rgba(191, 23, 50, 0.48);
  box-shadow: 0 0 0 2px rgba(191, 23, 50, 0.08);
}

.senior-submit {
  width: 100%;
  border: 0;
  border-radius: 18px;
  margin-top: 22px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-dark), var(--red) 56%, #c44739);
  box-shadow: 0 14px 28px rgba(159, 18, 48, 0.22);
  font-size: 18px;
  font-weight: 900;
}

.senior-result {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(191, 23, 50, 0.14);
  border-radius: 20px;
  background: #fff7e8;
  text-align: center;
}

.senior-result[hidden] {
  display: none;
}

.senior-result p {
  margin: 0 0 8px;
  color: #6c7280;
}

.senior-result h3 {
  margin: 0;
  color: #1e2432;
  font-size: 24px;
  line-height: 1.25;
}

.senior-result small {
  display: inline-block;
  margin: 8px 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(191, 23, 50, 0.08);
  color: #a22335;
  font-weight: 700;
}

.senior-result strong {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--red);
  font-size: 26px;
  letter-spacing: 0.08em;
}

.senior-result img {
  display: block;
  width: min(250px, 82%);
  margin: 0 auto 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(43, 12, 21, 0.12);
}

.senior-result span {
  display: block;
  color: #8a5a22;
  font-size: 14px;
  line-height: 1.6;
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.quick-questions button {
  border: 1px solid rgba(159, 18, 48, 0.18);
  border-radius: 999px;
  padding: 11px 16px;
  color: #8f1830;
  background: rgba(255, 250, 248, 0.88);
  box-shadow: 0 8px 18px rgba(83, 43, 35, 0.05);
}

.quick-questions button:hover,
.follow-up-buttons button:hover {
  border-color: rgba(159, 18, 48, 0.34);
  background: #fff5ef;
  box-shadow: 0 12px 24px rgba(83, 43, 35, 0.08);
}

.ask-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 12px 28px rgba(83, 43, 35, 0.06);
}

.ask-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 13px 12px;
  color: var(--ink);
  background: transparent;
}

.ask-form button {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-dark), var(--red) 58%, #c44739);
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(159, 18, 48, 0.22);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.guide-head {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.guide-head h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.guide-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.info-grid article {
  padding: 18px;
  border: 1px solid rgba(234, 216, 210, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
}

.info-grid span {
  color: var(--red);
  font-weight: 900;
}

.info-grid h3 {
  margin: 8px 0 7px;
}

.info-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.senior-card {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid rgba(159, 18, 48, 0.2);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 250, 248, 0.98), rgba(255, 244, 235, 0.95)),
    radial-gradient(circle at 90% 0, rgba(214, 175, 99, 0.18), transparent 150px);
  box-shadow: 0 18px 40px rgba(83, 43, 35, 0.08);
}

.senior-card h3 {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 20px;
}

.senior-card p {
  margin: 0;
  color: #5d6675;
  line-height: 1.7;
}

.senior-card button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  margin: 14px 0;
  padding: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-dark), var(--red) 56%, #c44739);
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(159, 18, 48, 0.2);
}

.senior-card small {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: #8a5a22;
  background: #fff1d9;
  line-height: 1.6;
}

.footer {
  display: grid;
  gap: 8px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 14px;
}

.footer strong {
  color: #5d6675;
}

@keyframes refinedRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar,
.hero-card,
.ask-card,
.guide-card {
  animation: refinedRise 0.55s ease both;
}

.hero-card {
  animation-delay: 0.04s;
}

.ask-card {
  animation-delay: 0.08s;
}

.guide-card {
  animation-delay: 0.12s;
}

@media (max-width: 380px) {
  .phone-shell {
    padding-inline: 12px;
  }

  .top-actions {
    display: none;
  }

  .hero-card,
  .ask-card {
    padding: 24px;
  }

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

@media (max-width: 560px) {
  body {
    background:
      radial-gradient(circle at 18% 0, rgba(159, 18, 48, 0.13), transparent 210px),
      radial-gradient(circle at 92% 16%, rgba(200, 148, 46, 0.12), transparent 220px),
      radial-gradient(circle at 12px 12px, rgba(111, 13, 34, 0.035) 1px, transparent 1px),
      linear-gradient(180deg, #fbf4ec, #fffaf3 54%, #f5ece2);
    background-size: auto, auto, 16px 16px, auto;
  }

  .login-screen {
    padding: max(18px, env(safe-area-inset-top)) 14px max(26px, env(safe-area-inset-bottom));
  }

  .login-card {
    width: min(100%, 420px);
    margin: 14px auto;
    padding: 30px 22px 24px;
    border-radius: 28px;
  }

  .login-card h1 {
    margin-bottom: 14px;
    font-size: 27px;
  }

  .login-copy {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.65;
  }

  .login-card input,
  .login-card select {
    min-height: 52px;
    padding: 14px 15px;
    font-size: 16px;
  }

  .login-card button {
    min-height: 52px;
    padding: 14px;
    font-size: 17px;
  }

  .saved-login-box {
    margin-left: 0;
  }

  .phone-shell {
    width: min(100%, 430px);
    padding: max(14px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
  }

  .topbar {
    margin: 0 0 16px;
    padding: 8px;
    border-radius: 24px;
  }

  .brand {
    gap: 8px;
  }

  .brand-seal {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    font-size: 17px;
  }

  .brand small {
    font-size: 10px;
  }

  .top-actions {
    display: none;
  }

  .profile-pill {
    min-width: 74px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .hero-card {
    min-height: 292px;
    padding: 32px 22px 28px;
    border-radius: 30px;
    background:
      linear-gradient(115deg, rgba(92, 8, 27, 0.98) 0%, rgba(159, 18, 48, 0.94) 58%, rgba(198, 73, 51, 0.64) 100%),
      url("./assets/places/campus-view-1.jpg") 68% center / cover no-repeat;
  }

  .hero-card::after {
    right: -120px;
    bottom: -150px;
  }

  .hero-card p {
    margin-bottom: 20px;
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .hero-card h1 {
    margin-bottom: 14px;
    font-size: clamp(34px, 10vw, 42px);
  }

  .hero-card h2 {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.72;
  }

  .hero-card span {
    padding: 10px 13px;
    font-size: 13px;
  }

  .ask-card {
    margin-top: 18px;
    padding: 22px 18px 20px;
    border-radius: 28px;
  }

  .ask-head {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
  }

  .ask-head h2 {
    font-size: 28px;
  }

  .ask-head span {
    font-size: 12px;
  }

  .chat-list {
    max-height: 52vh;
    gap: 11px;
    padding-right: 0;
  }

  .message p,
  .message--assistant p {
    max-width: 100%;
    padding: 14px 15px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.72;
  }

  .message--user p {
    max-width: 88%;
  }

  .answer-gallery {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .answer-gallery img {
    aspect-ratio: 16 / 10;
  }

  .follow-up-buttons {
    max-width: 100%;
  }

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

  .quick-questions button {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 14px;
    text-align: center;
  }

  .ask-form {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 9;
    gap: 7px;
    padding: 7px;
    border-radius: 22px;
  }

  .ask-form input {
    padding: 12px 10px;
    font-size: 15px;
  }

  .ask-form button {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  .guide-head h2 {
    font-size: 25px;
  }

  .guide-card {
    padding: 20px;
    border: 1px solid rgba(234, 216, 210, 0.82);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
  }

  .guide-card article {
    display: grid;
    grid-template-columns: 42px 1fr;
    column-gap: 12px;
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid rgba(234, 216, 210, 0.82);
    border-radius: 0;
    background: transparent;
  }

  .guide-card article span {
    grid-row: span 2;
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-size: 13px;
  }

  .guide-card article h3 {
    margin: 0 0 4px;
    font-size: 18px;
  }

  .guide-card article p {
    font-size: 13px;
  }

  .senior-card {
    margin-top: 14px;
    padding: 17px;
  }

  .senior-card h3 {
    font-size: 19px;
  }

  .senior-card button {
    min-height: 48px;
  }

  .senior-modal {
    align-items: start;
    padding: max(18px, env(safe-area-inset-top)) 14px max(26px, env(safe-area-inset-bottom));
  }

  .senior-dialog {
    max-height: none;
    padding: 30px 22px 24px;
    border-radius: 28px;
  }

  .senior-dialog h2 {
    font-size: 26px;
  }

  .senior-dialog input,
  .senior-dialog textarea {
    min-height: 52px;
    font-size: 16px;
  }

  .senior-submit {
    min-height: 52px;
    font-size: 17px;
  }

  .image-preview {
    padding: 18px;
  }

  .image-preview img {
    max-width: 94vw;
    max-height: 72vh;
    border-radius: 16px;
  }

  .footer {
    margin-top: 24px;
    font-size: 13px;
    line-height: 1.6;
  }
}

@media (min-width: 900px) {
  .phone-shell {
    width: min(1280px, calc(100% - 72px));
    padding: 28px 0 48px;
  }

  .topbar {
    margin-bottom: 34px;
  }

  .brand-seal {
    width: 58px;
    height: 58px;
  }

  .brand strong {
    font-size: 22px;
    line-height: 1.15;
  }

  .top-actions {
    justify-content: flex-end;
    gap: 28px;
    font-size: 17px;
  }

  .profile-pill {
    min-width: 124px;
    padding: 13px 24px;
    background: rgba(255, 255, 255, 0.86);
  }

  .hero-card {
    min-height: 280px;
    padding: 54px 64px;
    border-radius: 30px;
  }

  .hero-card p {
    margin-bottom: 24px;
    font-size: 14px;
  }

  .hero-card h1 {
    font-size: 46px;
  }

  .hero-card h2 {
    max-width: 560px;
    font-size: 20px;
  }

  .desktop-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
    margin-top: 30px;
  }

  .ask-card,
  .info-grid {
    margin-top: 0;
  }

  .ask-card {
    min-height: 460px;
    padding: 34px;
  }

  .ask-head h2 {
    font-size: 31px;
  }

  .chat-list {
    max-height: 330px;
  }

  .message p {
    max-width: 78%;
  }

  .message--assistant p {
    max-width: 82%;
  }

  .guide-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 30px;
    border: 1px solid rgba(234, 223, 217, 0.78);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
  }

  .guide-card article {
    display: grid;
    grid-template-columns: 36px 1fr;
    column-gap: 14px;
    padding: 18px 0;
    border: 0;
    border-bottom: 1px solid rgba(234, 223, 217, 0.82);
    border-radius: 0;
    background: transparent;
  }

  .guide-card article:last-child {
    border-bottom: 0;
  }

  .guide-card article span {
    grid-row: span 2;
    margin-top: 2px;
  }

  .guide-card article h3 {
    margin: 0 0 6px;
    font-size: 20px;
  }

  .footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
  }
}
