:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #182238;
  background: #f6f8fc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  --page-gutter: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 50% 0, #ebf2ff 0, transparent 55%), #f6f8fc;
}

.shell {
  width: min(100%, 960px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: auto;
  padding: var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card, .chat-card, .admin-card {
  background: #fff;
  border: 1px solid #e8ecf4;
  box-shadow: 0 18px 54px #23395d0d;
  border-radius: 24px;
}

.auth-card {
  width: min(100%, 480px);
  max-height: 100%;
  overflow-y: auto;
  padding: clamp(24px, 5vw, 38px);
}

.eyebrow {
  margin: 18px 0 6px;
  color: #64759a;
  font-size: 12px;
  letter-spacing: .11em;
}

.auth-card h1, .topbar h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -.03em;
}

.muted { color: #78849a; line-height: 1.6; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand img { flex: none; }
.auth-brand .eyebrow { margin: 0 0 7px; font-size: 11px; letter-spacing: .04em; }
.auth-invitation { margin: 24px 0 7px; color: #48558c; font-size: 18px; font-weight: 600; line-height: 1.6; }
.auth-invitation-detail { margin: 0; font-size: 13px; }
.field-hint { display: block; margin-top: 6px; color: #78849a; font-size: 12px; }
.summary-review, .summary-collection { margin: 16px 0; padding: 14px; border: 1px solid #e4e7f2; border-radius: 12px; background: #fafbff; }
.summary-review textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.summary-review .secondary-button { margin-top: 12px; }
.summary-collection { max-height: 260px; overflow: auto; }
.summary-collection h3 { margin: 0; font-size: 15px; }
.summary-collection details { padding: 10px 0; border-top: 1px solid #e4e7f2; }
.summary-collection summary { cursor: pointer; }
.summary-organized-badge { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: #e3f6e8; color: #267443; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.summary-organized-badge.is-pending { background: #fff3cd; color: #805900; }
.summary-organized-badge.is-integrated { background: #e3f6e8; color: #267443; }
.admin-journal-archive { margin-top: 18px; padding: 14px; border: 1px solid #e4e7f2; border-radius: 12px; background: #fafbff; }
.admin-journal-archive h3 { margin: 0; font-size: 15px; }
.admin-journal-archive > p { margin: 5px 0 10px; font-size: 12px; }
.admin-journal-records { max-height: 260px; overflow: auto; }
.admin-journal-record { padding: 9px 0; border-top: 1px solid #e4e7f2; }
.admin-journal-record summary { cursor: pointer; font-size: 13px; }
.admin-journal-record-content { max-height: 240px; overflow: auto; padding: 10px; border-radius: 8px; background: white; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.journal-status-saved { background: #fff4d6; color: #89620b; }
.journal-status-queued, .journal-status-processing, .journal-status-summary_ready { background: #e8f0ff; color: #3a5c9b; }
.journal-status-failed { background: #fde8e5; color: #a34235; }
.journal-record-delete { border-color: #f0d1ce; color: #a34235; }
.journal-record-delete:hover { background: #fff0ee; }

/* A bright, relaxed welcome that invites people to notice and express feelings. */
.user-page {
  background:
    radial-gradient(circle at 12% 20%, #ffc0a9 0, #ffc0a900 29%),
    radial-gradient(circle at 87% 16%, #ffe18c 0, #ffe18c00 31%),
    radial-gradient(circle at 17% 83%, #b5e9df 0, #b5e9df00 31%),
    radial-gradient(circle at 82% 79%, #c9bcfa 0, #c9bcfa00 32%),
    #fff1dd;
}
.user-page .shell { position: relative; isolation: isolate; }
.user-page .shell::before,
.user-page .shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}
.user-page .shell::before {
  width: 105px;
  height: 105px;
  left: 8%;
  top: 11%;
  background: radial-gradient(circle at 35% 35%, #fff6c8, #ffae73);
  box-shadow: 40px 390px 0 -40px #e6a4e8;
  transform: rotate(-17deg);
}
.user-page .shell::after {
  width: 76px;
  height: 76px;
  right: 9%;
  bottom: 16%;
  background: radial-gradient(circle at 35% 35%, #d0fff2, #69cebd);
  box-shadow: -36px -330px 0 -28px #ffbaae;
}
.user-page .auth-card {
  position: relative;
  background: #fffdf9f2;
  border: 2px solid #ffffff;
  box-shadow: 0 18px 55px #b9716b2b, 0 5px 0 #efa9bd;
}
.user-page .auth-brand img { filter: drop-shadow(0 4px 5px #8c79ca36); }
.user-page .auth-invitation { color: #9b4874; }
.user-page .notice { background: #fff1d8; color: #624d53; }
.user-page .tab.active { color: #aa4574; border-bottom-color: #ed8b9d; }
.user-page .primary, .user-page .send-button { background: #d95f82; }
.user-page .primary:hover, .user-page .send-button:hover { background: #be476d; }
.user-page input:focus, .user-page textarea:focus { border-color: #d95f82; box-shadow: 0 0 0 3px #f6b4c458; }
.auth-watermark { margin: 22px 0 0; padding-top: 12px; border-top: 1px solid #eddfe2; color: #a6949e; font-size: 10px; line-height: 1.6; text-align: center; letter-spacing: .03em; }
@media (min-width: 901px) {
  .user-page .shell { width: min(100%, 1120px); padding-block: 48px; }
  .user-page .auth-card { width: min(100%, 940px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 46px; padding: 48px; }
  .user-page .auth-intro { align-self: center; }
  .user-page .auth-entry { align-self: center; }
  .user-page .auth-card > .tiny, .user-page .auth-watermark { grid-column: 1 / -1; }
  .user-page .auth-card > .tiny { margin-top: 30px; }
  .user-page .notice { margin-bottom: 0; }
}
@media (max-width: 900px) {
  .user-page .shell { height: auto; min-height: 100dvh; padding-block: 24px; }
  .user-page .auth-card { flex: none; max-height: none; overflow: visible; }
}
@media (max-width: 560px) {
  .user-page .shell::before { width: 54px; height: 54px; left: 2%; top: 5%; }
  .user-page .shell::after { width: 42px; height: 42px; right: 2%; bottom: 5%; }
  .user-page .auth-card { box-shadow: 0 10px 32px #b9716b21, 0 4px 0 #efa9bd; }
}

.notice {
  margin: 21px 0 19px;
  padding: 14px;
  border-radius: 14px;
  background: #f1f5ff;
  color: #4a5771;
  font-size: 13px;
  line-height: 1.75;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #edf0f5;
  margin-bottom: 18px;
}

.tab {
  padding: 11px 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #748099;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.tab + .tab { margin-left: 15px; }
.tab.active { color: #3959c0; border-bottom-color: #5573db; font-weight: 600; }

label {
  display: block;
  margin: 14px 0 7px;
  color: #394761;
  font-size: 13px;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  border: 1px solid #dfe4ed;
  border-radius: 11px;
  padding: 12px 13px;
  background: #fff;
  color: #1c2940;
  font: inherit;
  font-size: 14px;
  outline: none;
}

input:focus, textarea:focus { border-color: #7990e6; box-shadow: 0 0 0 3px #5573db18; }
.primary, .send-button { border: 0; border-radius: 11px; background: #506bd0; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.primary { padding: 12px 16px; }
.full { width: 100%; margin-top: 19px; }
.primary:hover, .send-button:hover { background: #405cc1; }
.primary:disabled, .send-button:disabled { opacity: .55; cursor: wait; }
.tiny { margin: 19px 0 0; color: #8a95a8; font-size: 12px; line-height: 1.7; }
.error { min-height: 16px; color: #b63c4e; font-size: 13px; line-height: 1.55; }
.hidden { display: none !important; }
.filing-footer { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; padding: 3px 8px max(3px, env(safe-area-inset-bottom)); background: rgb(246 248 252 / 92%); text-align: center; font-size: 11px; line-height: 1.35; }
.filing-footer a { color: #65718a; text-decoration: underline; text-underline-offset: 2px; }

.chat-card, .admin-card {
  width: 100%;
  height: min(860px, calc(100dvh - 48px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
}

.user-page .chat-view {
  width: 100%;
  height: min(860px, calc(100dvh - 76px - env(safe-area-inset-bottom)));
  max-height: calc(100dvh - 76px - env(safe-area-inset-bottom));
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-page .chat-view > .chat-card { flex: 1 1 auto; width: 100%; height: auto; max-height: none; min-height: 0; }
.user-page .chat-purpose-band {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid rgb(255 255 255 / 78%);
  border-radius: 13px;
  background: linear-gradient(110deg, rgb(255 229 218 / 88%), rgb(255 241 207 / 88%) 52%, rgb(235 229 247 / 88%));
  box-shadow: 0 3px 12px #9c74651a;
  text-align: left;
}
.user-page .chat-purpose-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.user-page .chat-purpose-band .mammoth-purpose { margin: 0; color: #806879; font-size: 11px; line-height: 1.4; font-weight: 400; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar .eyebrow { margin: 0 0 4px; }
.topbar h1 { font-size: 21px; }
.text-button { flex: none; border: 0; background: none; color: #687793; font: inherit; font-size: 13px; cursor: pointer; }
.privacy-note { margin: 14px 0 8px; padding: 10px 12px; border-radius: 11px; background: #f1f5ff; color: #586682; font-size: 12px; line-height: 1.55; }

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 15px 2px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.bubble {
  max-width: 82%;
  padding: 12px 15px;
  border-radius: 17px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.75;
}

.bubble.assistant { align-self: flex-start; background: #f1f3f9; border-bottom-left-radius: 5px; color: #26334b; }
.bubble.user { align-self: flex-end; background: #506bd0; border-bottom-right-radius: 5px; color: #fff; }
.bubble-label { display: block; margin-bottom: 4px; font-size: 11px; opacity: .72; }
.user-page .bubble-label { display: flex; align-items: baseline; gap: 7px; }
.user-page .bubble-time { color: #73809a; font-size: 10px; font-weight: 400; font-variant-numeric: tabular-nums; }
.user-page .bubble.user .bubble-time { color: rgb(255 255 255 / 78%); }
.composer { position: relative; display: flex; align-items: flex-end; gap: 10px; padding: 10px; border: 1px solid #e2e6ee; border-radius: 16px; background: #fff; }
.composer textarea { min-width: 0; resize: none; border: 0; padding: 5px; background: transparent; box-shadow: none; max-height: 145px; line-height: 1.6; }
.composer textarea:focus { box-shadow: none; }
.send-button { flex: none; padding: 10px 14px; }
.composer-hint { padding: 8px 3px 0; color: #99a2b2; font-size: 11px; }
.status { min-height: 18px; padding: 0 3px; color: #7e8aa0; font-size: 12px; }
.status.error { color: #b63c4e; }

.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; padding: 9px; border: 0; border-radius: 8px; background: transparent; color: #65718a; cursor: pointer; }
.password-toggle:hover { background: #eef2ff; }
.password-toggle:focus-visible { outline: 2px solid #506bd0; outline-offset: -2px; }
.password-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.password-toggle .eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: block; }
#password-match-error:empty { display: none; }
.admin-shell { width: min(100%, 1100px); }
.admin-layout { display: grid; grid-template-columns: minmax(190px, 260px) minmax(0, 1fr); gap: 18px; flex: 1; min-height: 0; padding-top: 12px; }
.student-list { overflow: auto; border-right: 1px solid #edf0f5; padding-right: 12px; }
.student-button { width: 100%; padding: 12px; border: 0; border-radius: 12px; background: transparent; color: #36435b; text-align: left; font: inherit; cursor: pointer; }
.student-button:hover, .student-button.active { background: #eef2ff; }
.student-button strong, .student-button span { display: block; }
.student-button strong { font-size: 14px; }
.student-button span { margin-top: 5px; color: #8691a4; font-size: 11px; }
.transcript { min-width: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px; }
.transcript .bubble { max-width: 95%; }
.message-meta { margin-top: 7px; font-size: 10px; opacity: .65; }
.back-link { display: inline-block; margin-top: 12px; color: #506bd0; font-size: 13px; text-decoration: none; }

@media (max-width: 700px) {
  :root { --page-gutter: 18px; }
  .chat-card, .admin-card { padding: 20px; }
  .admin-layout { grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr); gap: 12px; }
}

@media (max-width: 560px) {
  :root { --page-gutter: 0px; }
  .shell { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .auth-card { width: 100%; max-height: 100%; align-self: center; padding: 24px 20px; border-radius: 20px; }
  .chat-card, .admin-card { height: 100%; padding: 17px 14px; border-radius: 19px; }
  .bubble { max-width: 92%; }
  .admin-layout { grid-template-columns: minmax(104px, 0.8fr) minmax(0, 2fr); gap: 9px; }
  .student-list { padding-right: 5px; }
  .student-button { padding: 10px 8px; }
  .topbar h1 { font-size: 19px; }
  .privacy-note { font-size: 11px; }
  .composer { gap: 6px; padding: 8px; }
  .send-button { padding: 10px 11px; }
}

@media (max-height: 620px) and (max-width: 560px) {
  .shell { align-items: flex-start; }
  .auth-card { margin-block: auto; }
  .chat-card, .admin-card { border-radius: 14px; }
}


.prompt-editor{flex:none;padding:13px 15px;border:1px solid #e7ebf3;border-radius:14px;background:#fbfcff}.prompt-editor textarea,.profile-editor textarea{resize:vertical;min-height:88px;line-height:1.6}.editor-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:9px}.editor-actions .muted{font-size:12px}.editor-actions .primary{padding:9px 12px;font-size:12px}.base-prompt-details{margin-top:10px;color:#65718a;font-size:12px}.base-prompt-details summary{cursor:pointer}.base-prompt-details pre{max-height:150px;overflow:auto;white-space:pre-wrap;font:inherit;line-height:1.6}.admin-card{height:min(920px,calc(100dvh - 48px))}.admin-layout{flex:1;min-height:0}.student-admin{display:flex;flex-direction:column;min-height:0;overflow:hidden}.profile-editor{flex:none;max-height:58%;overflow-y:auto;padding:10px 12px 13px;border:1px solid #edf0f5;border-radius:13px;background:#fff}.profile-editor h2{margin:2px 0 5px;font-size:16px}.profile-editor h3{margin:12px 0 6px;font-size:12px;color:#586682}.profile-hint{margin:0 0 6px;font-size:11px}.profile-evidence{max-height:115px;overflow-y:auto}.profile-evidence blockquote{margin:5px 0;padding:6px 9px;border-left:2px solid #d8e0f5;background:#f8f9fc;color:#69758b;font-size:11px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.student-admin .transcript{flex:1;min-height:110px;margin-top:9px}.prompt-editor>label{margin-top:0}@media(max-width:560px){.admin-layout{grid-template-columns:94px minmax(0,1fr)}.admin-card{height:calc(100dvh - 24px)}.prompt-editor{padding:10px}.editor-actions{align-items:flex-start;flex-direction:column}.editor-actions .primary{align-self:flex-end}.profile-editor{max-height:62%;padding:8px}.profile-editor textarea{min-height:80px}}
.profile-summary-preview{margin:0 0 8px;font-size:12px;white-space:pre-wrap;max-height:105px;overflow:auto}.profile-actions{align-items:flex-start}.profile-buttons{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.secondary-button{border:1px solid #dfe4ed;border-radius:10px;padding:8px 11px;background:#fff;color:#506084;font:inherit;font-size:12px;cursor:pointer}.secondary-button:hover{background:#f2f5fc}.profile-dialog{width:min(620px,calc(100vw - 28px));max-height:min(90dvh,860px);overflow-y:auto;padding:22px;border:1px solid #e4e9f3;border-radius:20px;box-shadow:0 24px 80px #18223830;color:#182238}.profile-dialog::backdrop{background:#18223880;backdrop-filter:blur(2px)}.profile-dialog form{display:block}.profile-dialog h2{margin:0;font-size:19px}.profile-dialog .eyebrow{margin:0 0 4px}.profile-dialog textarea{resize:vertical;min-height:90px;line-height:1.65}.profile-dialog .dialog-hint{font-size:12px;line-height:1.6}.profile-dialog .editor-actions{margin-top:14px}.profile-dialog .primary{padding:10px 14px}@media(max-width:560px){.profile-buttons{width:100%;justify-content:flex-end}.profile-dialog{padding:17px}.profile-dialog .editor-actions{align-items:flex-start}.profile-dialog .editor-actions .primary{align-self:flex-end}}
.header-actions{display:flex;align-items:center;gap:12px}.header-actions .secondary-button{padding:7px 10px}.global-prompt-dialog{width:min(880px,calc(100vw - 28px));max-height:92dvh;overflow-y:auto;padding:22px;border:1px solid #e4e9f3;border-radius:20px;box-shadow:0 24px 80px #18223830;color:#182238}.global-prompt-dialog::backdrop{background:#18223880;backdrop-filter:blur(2px)}.global-prompt-dialog form{display:block}.global-prompt-dialog h2{margin:0;font-size:20px}.global-prompt-dialog .eyebrow{margin:0 0 4px}.global-prompt-dialog .dialog-hint{margin:8px 0 12px;font-size:12px}.markdown-toolbar{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}.markdown-toolbar button{padding:6px 9px;border:1px solid #dfe4ed;border-radius:8px;background:#fff;color:#566681;font:inherit;font-size:12px;cursor:pointer}.markdown-toolbar button:hover{background:#f2f5fc}.markdown-source{min-height:48vh;max-height:62vh;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.65;white-space:pre;tab-size:2}.markdown-preview{min-height:48vh;max-height:62vh;overflow:auto;padding:16px;border:1px solid #dfe4ed;border-radius:11px;background:#fff;color:#27334b;font-size:14px;line-height:1.7;overflow-wrap:anywhere}.markdown-preview h1,.markdown-preview h2,.markdown-preview h3,.markdown-preview h4,.markdown-preview h5,.markdown-preview h6{margin:16px 0 8px;line-height:1.35}.markdown-preview h1{font-size:23px}.markdown-preview h2{font-size:20px}.markdown-preview h3{font-size:17px}.markdown-preview p{margin:7px 0}.markdown-preview ul{padding-left:23px}.markdown-preview blockquote{margin:8px 0;padding:4px 12px;border-left:3px solid #9aa9cc;color:#65718a}.markdown-preview pre{overflow:auto;padding:12px;border-radius:9px;background:#f3f5f9;white-space:pre-wrap}.markdown-preview code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.global-prompt-dialog .base-prompt-details{margin-top:10px}.global-prompt-dialog .editor-actions{margin-top:14px}.global-prompt-dialog .editor-actions .primary{padding:10px 14px}@media(max-width:560px){.global-prompt-dialog{padding:16px}.global-prompt-dialog .editor-actions{align-items:flex-end}.global-prompt-dialog .markdown-source,.global-prompt-dialog .markdown-preview{min-height:52vh}.header-actions{gap:7px}}
.bubble.human{align-self:flex-start;background:#eff7f1;border:1px solid #d9eadc;color:#243c2a}.bubble.human .bubble-label{color:#397148}.bubble.observer{align-self:flex-start;background:#f1f7ff;border:1px solid #dce8fb;color:#334a6f}.bubble.observer .bubble-label{color:#486cae}.human-reply-form select{width:100%;padding:9px 11px;border:1px solid #dfe4ed;border-radius:10px;background:#fff;color:#465574;font:inherit;font-size:12px}.human-followup-card{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0;padding:9px 10px;border:1px solid #f1d1b8;border-radius:11px;background:#fff8f2}.human-followup-card p{margin:0;color:#8f4d2c;font-size:12px;line-height:1.5}.human-followup-card .secondary-button{flex:none}.student-button .followup-badge{display:block;margin-top:7px;padding:5px 7px;border-radius:8px;background:#fff1e8;color:#a64e27;font-size:10px;line-height:1.4}.round-summaries{max-height:220px;overflow:auto}.round-summaries>p{margin:5px 0;font-size:11px}.round-review{margin:5px 0;padding:7px 9px;border:1px solid #e7ebf3;border-radius:9px;background:#fbfcff;font-size:11px}.round-review summary{cursor:pointer;color:#53617c;font-weight:600}.round-review p{margin:6px 0;line-height:1.5;white-space:pre-wrap}.human-reply-form select{width:100%;padding:9px 11px;border:1px solid #dfe4ed;border-radius:10px;background:#fff;color:#465574;font:inherit;font-size:12px}.profile-editor .agent-note-history{max-height:120px}
.human-reply-form{flex:none;position:relative;z-index:2;padding:10px 0 0;border-top:1px solid #edf0f5;background:#fff}
.human-reply-form>label{margin:0 0 6px}
.human-reply-form>label:not(:first-child){margin-top:8px}
.human-reply-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}
.human-reply-composer textarea{min-height:48px;max-height:132px;resize:vertical;line-height:1.5}
.human-reply-composer .primary{min-height:44px;padding:10px 13px;white-space:nowrap}
#human-reply-status{display:block;min-height:18px;margin-top:5px;font-size:11px}
.student-admin>.transcript{flex:1 1 0;min-height:70px}
@media(max-width:560px){.human-reply-form{padding-top:8px}.human-reply-composer{grid-template-columns:minmax(0,1fr) auto;gap:6px}.human-reply-composer textarea{min-height:44px;padding:9px}.human-reply-composer .primary{padding:9px 10px;font-size:12px}}
.admin-card{height:min(920px,calc(100dvh - 88px))}
.profile-editor{max-height:42%}
.student-admin>.transcript{min-height:48px}
.student-admin{min-width:0}
.global-prompt-dialog #global-prompt-status{overflow-wrap:anywhere}
#global-prompt-dialog { width: min(1200px, calc(100vw - 32px)); height: 90dvh; overflow: hidden; }
#global-prompt-form { height: 100%; min-height: 0; display: flex; flex-direction: column; }
#global-prompt-form > .topbar, #global-prompt-form > .dialog-hint, #global-prompt-form > .editor-actions { flex: none; }
.prompt-workspace { display: grid; grid-template-columns: minmax(230px, 32%) minmax(0, 1fr); gap: 20px; flex: 1; min-height: 0; }
.prompt-workspace > .summary-collection { margin: 0; max-height: none; min-height: 0; overflow: auto; overflow-wrap: anywhere; }
.prompt-draft-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; }
#global-prompt-dialog .prompt-draft-pane > .markdown-source, #global-prompt-dialog .prompt-draft-pane > .markdown-preview { flex: 1; min-height: 160px; max-height: none; resize: none; }
.prompt-draft-pane > .base-prompt-details { flex: none; }
.prompt-draft-pane.show-markdown-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; column-gap: 12px; }
.prompt-draft-pane.show-markdown-preview > .markdown-toolbar { grid-column: 1 / -1; }
.prompt-draft-pane.show-markdown-preview > label { grid-column: 1 / -1; }
.prompt-draft-pane.show-markdown-preview > .markdown-source { grid-column: 1; grid-row: 3; width: 100%; box-sizing: border-box; }
.prompt-draft-pane.show-markdown-preview > .markdown-preview { grid-column: 2; grid-row: 3; min-width: 0; }
.prompt-draft-pane.show-markdown-preview > .base-prompt-details { grid-column: 1 / -1; }
.markdown-preview .inserted-summary-highlight { background: #fff0ad; box-shadow: -5px 0 0 #f5b847; border-radius: 3px; }
@media (max-width: 900px) { .prompt-draft-pane.show-markdown-preview { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(180px, 1fr) minmax(180px, 1fr) auto; } .prompt-draft-pane.show-markdown-preview > .markdown-source { grid-column: 1; grid-row: 3; } .prompt-draft-pane.show-markdown-preview > .markdown-preview { grid-column: 1; grid-row: 4; } }
.global-prompt-dialog.editor-fullscreen { width: 100vw !important; height: 100dvh !important; max-width: none; max-height: none; margin: 0; inset: 0; border-radius: 0; padding: 24px; box-sizing: border-box; }
@media(max-width:700px) {
  .prompt-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(100px, 28%) minmax(0, 1fr); gap: 12px; }
  .global-prompt-dialog.editor-fullscreen { padding: 14px; }
  #global-prompt-form > .topbar { flex-wrap: wrap; }
  #global-prompt-form > .editor-actions { flex-wrap: wrap; }
}
.header-actions{flex-wrap:wrap;justify-content:flex-end}
@media(max-width:560px){.chat-card{height:calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)))}.admin-card{height:auto;min-height:calc(100dvh - 24px);overflow:visible}.admin-card>.topbar{flex-wrap:wrap}.admin-card .admin-layout{display:flex;flex-direction:column}.admin-card .student-list{max-height:160px;border-right:0;border-bottom:1px solid #edf0f5}.admin-card .profile-editor{max-height:300px}.admin-card .student-admin>.transcript{flex:auto;min-height:160px;max-height:45dvh}}
@media(max-width:560px){.profile-editor{max-height:40%}}
.agent-log-panel{flex:none;margin:0 0 8px;border:1px solid #e6eaf2;border-radius:12px;background:#fbfcff}
.agent-log-panel details>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;color:#43516c;font-size:12px;font-weight:600;cursor:pointer;list-style:none}
.agent-log-panel details>summary::-webkit-details-marker{display:none}
.agent-log-panel details>summary::after{content:'展开';margin-left:auto;color:#7d8aa3;font-weight:400}
.agent-log-panel details[open]>summary::after{content:'收起'}
.agent-log-count{color:#8290a8;font-size:11px;font-weight:400}
.agent-log-list{max-height:190px;overflow-y:auto;padding:0 10px 10px}
.agent-log-entry{margin-top:7px;padding:9px 10px;border:1px solid #e7ebf2;border-radius:10px;background:#fff}
.agent-log-entry.human_note{border-left:3px solid #7890df}
.agent-log-entry.guidance,.agent-log-entry.human_followup{border-left:3px solid #86a9d3}
.agent-log-entry.round_review{border-left:3px solid #79aa8a}
.agent-log-entry-header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:#495875;font-size:11px}
.agent-log-entry-header time{flex:none;color:#99a3b3;font-size:10px;font-weight:400}
.agent-log-entry p,.agent-log-empty{margin:6px 0 0;color:#58657d;font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.agent-log-empty{padding:4px 3px 8px}
@media(max-width:560px){.agent-log-panel{margin-bottom:6px}.agent-log-list{max-height:150px}.agent-log-entry-header{align-items:flex-start;flex-direction:column;gap:2px}}
.agent-d-panel{flex:none;margin:8px 0 4px;padding:11px 13px;border:1px solid #e3e8f2;border-radius:13px;background:#fbfcff;max-height:230px;overflow:hidden}
.agent-d-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.agent-d-panel h2{margin:0;color:#35425c;font-size:14px}
.agent-d-panel header p{margin:4px 0 0;font-size:11px}
.agent-d-panel header button{flex:none;padding:8px 11px;font-size:11px}
.agent-d-reports{max-height:165px;overflow:auto;margin-top:7px}
.agent-d-report{padding:9px 10px;border:1px solid #e6eaf2;border-radius:10px;background:#fff;margin-top:7px}
.agent-d-report-title{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.agent-d-report-title strong{font-size:12px;color:#3d4a64}
.agent-d-report-title time{font-size:10px;color:#95a0b2}
.agent-d-report>p{margin:5px 0;color:#58657c;font-size:11px;line-height:1.5;white-space:pre-wrap}
.agent-d-item{margin-top:7px;padding:8px 9px;border-radius:9px;background:#f8f9fc}
.agent-d-item-header{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:600;color:#475571}
.agent-d-priority{padding:3px 6px;border-radius:6px;font-size:10px}
.agent-d-priority.high{background:#fff0ed;color:#ac493b}.agent-d-priority.medium{background:#fff6e6;color:#8c641e}.agent-d-priority.low{background:#edf5ef;color:#4b7955}
.agent-d-item p{margin:5px 0;font-size:11px;line-height:1.5;color:#5e6a80;white-space:pre-wrap}
.agent-d-item details{margin-top:5px;color:#65728a;font-size:11px}.agent-d-item details summary{cursor:pointer}
.agent-d-empty{padding:5px;color:#75829a;font-size:11px}
@media(max-width:560px){.agent-d-panel{max-height:210px;padding:9px}.agent-d-panel>header{align-items:flex-start}.agent-d-panel header p{max-width:250px}.agent-d-panel header button{padding:7px 8px}.agent-d-reports{max-height:145px}}
.admin-agent-logs{margin-top:12px;padding:10px 12px;border:1px solid #e3e8f2;border-radius:10px;background:#fbfcff}.admin-agent-logs>summary{cursor:pointer;font-size:13px;font-weight:600;color:#475571}.admin-agent-logs[open]>summary{margin-bottom:8px}

/* Desktop management: brief on the left, users and conversation on the right. */
@media (min-width: 901px) {
  .admin-shell { width: min(100%, 1600px); }
  #admin-view.admin-card {
    display: grid;
    grid-template-columns: minmax(0, var(--brief-width, 34%)) 12px minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    height: calc(100dvh - 48px);
    max-height: none;
    column-gap: 4px;
  }
  #admin-view > .topbar, #admin-view > .privacy-note { grid-column: 1 / -1; }
  #admin-view > .agent-d-panel {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    margin: 12px 0 0;
  }
  #admin-view .agent-d-reports { flex: 1; min-height: 0; max-height: none; }
  #admin-view > .admin-resizer {
    grid-column: 2;
    grid-row: 3;
    align-self: stretch;
    margin-top: 12px;
    border-radius: 9px;
    cursor: col-resize;
    touch-action: none;
    background: #e7ebf5;
  }
  #admin-view > .admin-resizer:hover, #admin-view > .admin-resizer:focus-visible { background: #7285d5; outline: none; }
  #admin-view > .admin-layout {
    grid-column: 3;
    grid-row: 3;
    grid-template-columns: minmax(145px, 22%) minmax(0, 1fr);
    gap: 12px;
    padding-top: 12px;
    min-width: 0;
    overflow: hidden;
  }
  #admin-view .student-admin { min-width: 0; }
}
@media (max-width: 900px) {
  #admin-view > .admin-resizer { display: none; }
}
.manager-toolbar { flex: none; padding: 12px; border-bottom: 1px solid #dde3ef; }
.manager-toolbar > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.manager-toolbar button { padding: 9px 12px; min-height: 40px; border-radius: 11px; font: inherit; font-size: 13px; line-height: 1.4; cursor: pointer; }
.manager-toolbar button[aria-pressed="true"] { background: #eef2ff; border-color: #aebdf0; color: #405cc1; font-weight: 600; }
.manager-toolbar button:focus-visible, .manager-reply-dialog header button:focus-visible { outline: 2px solid #506bd0; outline-offset: 2px; }
.manager-toolbar button:disabled { cursor: not-allowed; }
.manager-browser > #profile-editor, .manager-browser > #transcript { flex: 1; min-height: 0; max-height: none; overflow: auto; }
.manager-browser > [hidden] { display: none !important; }
.manager-browser > #transcript .bubble { font-size: 12px; line-height: 1.6; }
.student-button { position: relative; padding-right: 36px; }
.student-button .unread-badge { position: absolute; top: 6px; right: 6px; min-width: 22px; padding: 2px 5px; border-radius: 14px; background: #c7354b; color: white; font-size: 12px; text-align: center; }
dialog.manager-fullscreen { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; }
.manager-fullscreen > .manager-browser { display: flex; flex-direction: column; height: 100%; min-width: 0; overflow: hidden; }
dialog.manager-reply-dialog { width: min(620px, calc(100vw - 24px)); max-height: 90dvh; padding: 16px; overflow: auto; }
.manager-reply-dialog .human-reply-form textarea { min-height: 100px; max-height: 35dvh; }
@media (max-width: 900px) {
  #admin-view .manager-browser { height: 75dvh; min-height: 360px; }
}

/* Reserve room for filing links, including two rows on narrow screens. */
.shell { padding-bottom: max(44px, calc(32px + env(safe-area-inset-bottom))); }
.chat-card, .admin-card { max-height: calc(100dvh - 76px - env(safe-area-inset-bottom)); }
.filing-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; padding: 4px 8px max(4px, env(safe-area-inset-bottom)); }
.filing-footer a { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; white-space: nowrap; }
.filing-footer img { display: block; flex: none; object-fit: contain; }
@media (max-width: 560px) {
  .shell { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .chat-card, .admin-card { max-height: calc(100dvh - 80px - env(safe-area-inset-bottom)); }
}

.user-page .mammoth-purpose { flex: none; margin: 10px 0 14px; color: rgb(91 72 88 / 68%); font-size: 12px; font-weight: 400; line-height: 1.7; }
.user-page .chat-card > .topbar { flex: none; }
.user-page .chat-card .account-actions { width: auto; justify-content: flex-start; }
.user-page .chat-purpose-band .account-exit-actions { flex-wrap: nowrap; margin-left: auto; justify-content: flex-end; gap: 2px 6px; }
.user-page .chat-purpose-band .account-exit-actions .text-button { padding: 3px 5px; font-size: 10px; }
.user-page #logout-button, .user-page #delete-account-button { font-size: 10px; }
.user-page .chat-purpose-band .current-topic-box { max-width: 100%; padding: 4px 7px; gap: 3px 6px; }
.user-page .chat-purpose-band .current-topic { font-size: 10px; }
.user-page .chat-purpose-band .current-topic-box #change-topic { padding: 3px 7px; font-size: 10px; }
.user-page .chat-card .current-topic-box { padding: 5px 8px; gap: 4px 7px; }
.user-page .chat-card .current-topic { font-size: 11px; }
.user-page .chat-card .messages { padding-top: 8px; }
.user-page .messages .bubble > div:not(.bubble-label) > :first-child { margin-top: 0; }
.user-page .messages .bubble > div:not(.bubble-label) > :last-child { margin-bottom: 0; }
.user-page .messages .bubble p { margin: 0 0 .7em; }
.user-page .messages .bubble h1, .user-page .messages .bubble h2, .user-page .messages .bubble h3, .user-page .messages .bubble h4 { margin: .6em 0 .35em; font-size: 1.05em; line-height: 1.4; }
.user-page .messages .bubble ul, .user-page .messages .bubble ol { margin: .25em 0 .7em; padding-left: 1.5em; }
.user-page .messages .bubble blockquote { margin: .4em 0; padding-left: .8em; border-left: 3px solid #c8cddd; color: #596781; }
.user-page .messages .bubble pre { overflow-x: auto; padding: 9px; border-radius: 8px; background: #e7eaf2; white-space: pre; }
.user-page .messages .bubble code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }

.account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
#delete-account-button { color: #a14e60; font-size: 12px; }
.user-page .auth-brand img { width: 72px; height: 72px; object-fit: cover; border-radius: 16px; flex: none; }

.delete-account-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 0; border-radius: 20px; color: #343044; background: #fff; box-shadow: 0 20px 70px #0003; }
.delete-account-dialog::backdrop { background: rgb(24 34 56 / 45%); }
.delete-account-dialog h2 { margin: 0 0 16px; font-size: 20px; }
.delete-account-dialog p { font-size: 14px; line-height: 1.7; }
.delete-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.delete-account-actions button { min-height: 44px; padding: 10px 8px; border: 0; border-radius: 10px; color: white; font: inherit; font-size: 14px; cursor: pointer; }
.delete-account-confirm { background: #bd3344; }
.delete-account-confirm:hover { background: #a32535; }
.delete-account-cancel { background: #237a46; }
.delete-account-cancel:hover { background: #196437; }
.delete-account-actions button:focus-visible { outline: 3px solid #66759a; outline-offset: 3px; }
.user-page .mammoth-purpose .purpose-contrast { color: #44313e; font-weight: 700; }
.user-page .mammoth-purpose .purpose-together { color: #896377; background: rgb(224 185 203 / 16%); border-radius: 4px; padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.composer-hint { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: start; column-gap: 14px; row-gap: 4px; white-space: pre-line; }
#send-key-hint { grid-column: 1; grid-row: 1; }
#toggle-send-key { padding: 2px 8px; border: 1px solid #dfd5df; border-radius: 6px; background: transparent; color: #806579; font: inherit; cursor: pointer; }
#toggle-send-key { grid-column: 2; grid-row: 1; }
#toggle-send-key:hover { background: #f7edf3; }
#toggle-send-key:focus-visible { outline: 2px solid #aa698a; outline-offset: 2px; }
.topic-notification { position: absolute; z-index: 5; right: 8px; bottom: calc(100% + 8px); left: 8px; padding: 9px 12px; border: 1px solid #e7b9cd; border-radius: 12px; background: rgb(255 250 252 / 97%); box-shadow: 0 5px 18px #4f35401c; color: #794560; font-size: 12px; line-height: 1.55; text-align: center; opacity: 0; transform: translateY(5px); transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.topic-notification[hidden] { display: none; }
.topic-notification.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .topic-notification { transition: none; } }

.topic-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 0; border-radius: 20px; background: #fff; color: #44313e; }
.topic-dialog::backdrop { background: rgb(24 34 56 / 40%); }
#topic-tip { font-size: 12px; line-height: 1.7; color: #896377; }
.topic-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.topic-options button { min-height: 52px; padding: 10px; border: 1px solid #e4cbd9; border-radius: 12px; background: #fff5f9; color: #71445d; font: inherit; cursor: pointer; }
.topic-options button:hover, .topic-options button[aria-pressed="true"] { background: #f5dce8; border-color: #bb7398; }
.topic-options button:focus-visible { outline: 2px solid #aa698a; outline-offset: 2px; }
#topic-error { color: #a32535; font-size: 13px; }
#prompt-kind, #prompt-version { width: 100%; padding: 10px; border: 1px solid #dfe4ed; border-radius: 8px; font: inherit; }
.user-page .chat-card > .topbar { flex-wrap: nowrap; }
@media (max-width: 560px) {
  .shell { --page-gutter: 8px; padding-top: max(8px, env(safe-area-inset-top)); }
  .chat-card { padding: 10px; border-radius: 17px; }
  .user-page .chat-purpose-band .current-topic-box { max-width: min(100%, 330px); }
  .user-page .chat-purpose-band .current-topic { overflow-wrap: anywhere; }
  .user-page .chat-purpose-row { gap: 4px; }
  .user-page .chat-purpose-band .account-exit-actions { gap: 1px; }
  .user-page .chat-purpose-band .account-exit-actions .text-button { padding: 3px 4px; font-size: 10px; }
  .user-page .chat-view {
    height: calc(100dvh - max(8px, env(safe-area-inset-top)) - 60px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 68px - env(safe-area-inset-bottom));
    gap: 5px;
  }
  .user-page .chat-purpose-band { gap: 4px; padding: 5px 8px; border-radius: 10px; }
  .user-page .chat-purpose-band .mammoth-purpose { font-size: 10px; line-height: 1.3; }
}

.prompt-selectors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; flex: none; margin-bottom: 10px; }
.prompt-selectors label { margin: 0; font-size: 12px; }
.prompt-selectors label[for="prompt-kind"] { grid-column: 1; grid-row: 1; }
.prompt-selectors #prompt-kind { grid-column: 1; grid-row: 2; }
.prompt-selectors label[for="prompt-version"] { grid-column: 2; grid-row: 1; }
.prompt-selectors #prompt-version { grid-column: 2; grid-row: 2; }
.prompt-draft-pane.show-markdown-preview { grid-template-rows: auto auto auto minmax(160px, 1fr) auto; }
.prompt-draft-pane.show-markdown-preview > .prompt-selectors { grid-column: 1 / -1; grid-row: 1; }
.prompt-draft-pane.show-markdown-preview > .markdown-toolbar { grid-row: 2; }
.prompt-draft-pane.show-markdown-preview > label { grid-row: 3; }
.prompt-draft-pane.show-markdown-preview > .markdown-source, .prompt-draft-pane.show-markdown-preview > .markdown-preview { grid-row: 4; }
.prompt-draft-pane.show-markdown-preview > .base-prompt-details { grid-row: 5; }
@media (max-width: 900px) {
  .prompt-draft-pane.show-markdown-preview { grid-template-rows: auto auto auto minmax(180px, 1fr) minmax(180px, 1fr) auto; }
  .prompt-draft-pane.show-markdown-preview > .markdown-preview { grid-row: 5; }
  .prompt-draft-pane.show-markdown-preview > .base-prompt-details { grid-row: 6; }
}

.current-topic { align-self: center; color: #896377; font-size: 12px; line-height: 1.5; }
.current-topic-box { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 12px; border: 1px solid #e7b9cd; border-radius: 12px; background: #fbe7f0; }
.current-topic-box .current-topic { color: #794560; font-weight: 600; }
.current-topic-box #change-topic { padding: 4px 8px; border: 1px solid #dfafc5; border-radius: 7px; background: rgb(255 255 255 / 75%); color: #914c70; font-size: 12px; }
.current-topic-box #change-topic:hover { background: #fff; }
.user-page .chat-card .account-actions { align-items: center; }

.user-page #auth-view .mammoth-purpose { margin: 22px 0 14px; font-size: clamp(20px, 2.1vw, 26px); line-height: 1.75; font-weight: 500; color: #5b4858; letter-spacing: .01em; }
.user-page #auth-view .auth-invitation { margin: 14px 0 0; font-size: 13px; font-weight: 400; color: #957b89; }
.user-page #auth-view .auth-disclosure { grid-column: 1 / -1; margin: 24px 0 0; padding: 12px 0 0; border-top: 1px solid #eee4e8; border-radius: 0; background: transparent; color: #817680; font-size: 11px; line-height: 1.75; }
.user-page #auth-view .auth-disclosure strong { font-weight: 500; }
.user-page #auth-view > .tiny { margin-top: 10px; }

/* A quiet, slowly breathing backdrop for the login invitation. */
.user-page #auth-view .purpose-scene { position: relative; isolation: isolate; margin-top: 18px; padding: 20px 10px; border-radius: 18px; background: radial-gradient(ellipse at 20% 20%, #ecdde442, transparent 65%), radial-gradient(ellipse at 90% 85%, #dedce84a, transparent 65%); }
.user-page #auth-view .purpose-scene .mammoth-purpose { position: relative; z-index: 1; margin: 0; font-size: 17px; line-height: 1.95; font-weight: 400; letter-spacing: 0; }
.purpose-line { display: block; }
.purpose-stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.purpose-stars i { position: absolute; font-style: normal; font-size: 13px; color: #b49baa; opacity: .2; animation: purpose-twinkle 5.8s ease-in-out infinite alternate; }
.purpose-stars i:nth-child(1) { left: 5%; top: 4%; }
.purpose-stars i:nth-child(2) { right: 12%; top: 2%; color: #b3adbe; animation-delay: -2s; font-size: 17px; }
.purpose-stars i:nth-child(3) { right: 1%; top: 43%; color: #c1af92; animation-delay: -4s; }
.purpose-stars i:nth-child(4) { left: 17%; bottom: 0; color: #a8b6b4; animation-delay: -1s; }
.purpose-stars i:nth-child(5) { right: 18%; bottom: 1%; animation-delay: -3s; font-size: 11px; }
.purpose-stars i:nth-child(6) { left: 0; top: 49%; color: #b9afc4; animation-delay: -5s; font-size: 10px; }
@keyframes purpose-twinkle { from { opacity: .12; transform: scale(.85); } to { opacity: .5; transform: scale(1.08); } }
@media (max-width: 560px) {
  .user-page #auth-view .purpose-scene { padding: 18px 4px; }
  .user-page #auth-view .purpose-scene .mammoth-purpose { font-size: 15px; line-height: 2; }
}
@media (prefers-reduced-motion: reduce) { .purpose-stars i { animation: none; opacity: .3; } }

.user-page .messages .bubble.assistant { line-height: 1.55; }
.user-page .chat-card .messages .bubble { font-size: 14px; }
.topic-dialog { width: min(620px, calc(100vw - 32px)); }
.topic-options button { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 8px; padding: 16px; }
.topic-options button strong { font-size: 17px; font-weight: 650; line-height: 1.5; }
.topic-options button span { font-size: 12px; font-weight: 400; line-height: 1.7; color: #8b7180; }
@media (max-width: 560px) { .topic-options { grid-template-columns: 1fr; gap: 10px; } .topic-options button { padding: 12px 14px; gap: 4px; } }

@media (max-width: 560px) {
  .user-page .chat-card { padding: 8px 9px; border-radius: 15px; }
  .user-page .chat-card .messages { gap: 10px; padding: 6px 1px; }
  .user-page .chat-card .messages .bubble { padding: 9px 11px; font-size: 13px; line-height: 1.55; }
  .user-page .chat-card .composer { gap: 6px; padding: 6px; }
  .user-page .chat-card .composer textarea { min-height: 40px; max-height: 112px; padding: 3px 4px; font-size: 13px; line-height: 1.45; }
  .user-page .chat-card .composer .send-button { padding: 8px 10px; }
  .user-page .chat-card .composer-hint { padding-top: 5px; }
}
