:root {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #16345c;
  background: #edf8fc;
  font-synthesis: none;
  --navy: #16345c;
  --orange: #ee8c31;
  --line: #e5dfd0;
  --paper: #fffcf2;
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
  opacity: 0.35;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
p {
  margin: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #edaa4e;
  outline-offset: 3px;
}
img {
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  background: white;
  padding: 10px;
  z-index: 50;
}
.skip:focus {
  top: 10px;
}
.student-shell {
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr) 84px;
  height: 100dvh;
  width: 100%;
  max-width: 1600px;
  margin: auto;
  background:
    linear-gradient(#effaff88, #fffdf1bb),
    url("/assets/v3/ui/stage-bg.png") center/cover no-repeat;
  position: relative;
  isolation: isolate;
}
.student-shell.is-login {
  grid-template-rows: 70px minmax(0, 1fr);
}
.student-shell.is-chat {
  grid-template-rows: 65px minmax(0, 1fr);
}
.student-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 8px 35px;
  z-index: 2;
}
.logo {
  height: 55px;
  width: 160px;
  display: flex;
  align-items: center;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.header-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  font-weight: 500;
  color: #648194;
}
.service-state {
  font-size: 11px;
  color: #8d8b7b;
}
.header-avatar {
  width: 41px;
  height: 41px;
  border-radius: 50%;
  padding: 0;
  background: #fff9e6;
  box-shadow: 0 0 0 2px #f0d4ac;
  overflow: hidden;
}
.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}
.student-main {
  min-height: 0;
  overflow: hidden;
  padding: 10px 35px 15px;
  position: relative;
}
.bottom-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #fffaf0e8;
  box-shadow: 0 -1px 0 #efe4cf;
  border-radius: 40px 40px 0 0;
  padding: 5px max(30px, 12%) calc(8px + env(safe-area-inset-bottom));
  gap: 30px;
  z-index: 3;
}
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 84px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 800;
  padding: 2px 20px;
  position: relative;
}
.bottom-nav button .ui-icon {
  width: 43px;
  height: 43px;
}
.bottom-nav button.active {
  background: radial-gradient(ellipse, #fbdca3b0, transparent 75%);
  color: #c66b24;
}
.ui-icon {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.art-button {
  background-image: url("/assets/v3/ui/button-primary.png");
  background-size: 125% 250%;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 1px 0 #ba5f27;
  min-height: 49px;
  padding: 8px 32px;
  border-radius: 30px;
  min-width: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.art-button:hover {
  filter: brightness(1.04);
}
.art-button.secondary {
  background-image: url("/assets/v3/ui/button-secondary.png");
  color: #335273;
  text-shadow: none;
}
.image-button {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  padding: 0;
}
.image-button .ui-icon {
  width: 43px;
  height: 43px;
}
.page-title {
  text-align: center;
  flex-shrink: 0;
}
.page-title h1 {
  font-size: 29px;
  letter-spacing: 2px;
  line-height: 1.35;
  font-weight: 900;
}
.page-title p {
  font-size: 13px;
  color: #71839a;
  margin-top: 8px;
  line-height: 1.7;
}
.collection-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 0;
  max-width: 1250px;
  margin: auto;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-shrink: 0;
  height: 43px;
  font-size: 15px;
  font-weight: 600;
}
.pager button {
  padding: 0;
  width: 41px;
  height: 41px;
}
.pager .ui-icon {
  width: 100%;
  height: 100%;
}
.pager button:disabled {
  opacity: 0.3;
}
.figure {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
/* 登录 */
.login-layout {
  height: 100%;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  max-width: 1200px;
  margin: auto;
  gap: 30px;
  align-items: center;
  min-height: 0;
}
.login-art {
  height: 100%;
  min-height: 0;
  position: relative;
}
.login-art-image {
  position: absolute;
  inset: 0;
  background: url("/assets/login-scene.png") center 70% / cover no-repeat;
  mask-image: radial-gradient(
    ellipse at center,
    #000 30%,
    #000d 50%,
    transparent 76%
  );
  border-radius: 35px;
}
.login-content {
  width: 100%;
  max-width: 470px;
  background: #fffdf5ed;
  border: 1px solid #ecdfc8;
  box-shadow: 0 10px 45px #608aa40b;
  border-radius: 30px;
  padding: 36px 34px;
  text-align: center;
}
.login-content h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 30px;
}
.login-field {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #cfc6b3;
  background: #fffcf5;
  border-radius: 17px;
  min-height: 58px;
  padding: 9px 15px;
  margin-bottom: 17px;
}
.login-field .ui-icon {
  width: 27px;
  height: 27px;
}
.login-field input {
  border: 0;
  background: none;
  width: 100%;
  min-width: 0;
  outline: none;
  font-size: 17px;
  color: var(--navy);
}
.login-field input::placeholder {
  color: #7e8191;
}
.login-field > button {
  padding: 0;
  display: grid;
  place-items: center;
}
.login-hint {
  color: #80818c;
  font-size: 13px;
  margin: 15px 0 20px;
}
.login-content .art-button {
  width: 100%;
  margin-top: 3px;
  font-size: 21px;
}
.staff-link {
  font-size: 11px;
  color: #95a2aa;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.form-error {
  color: #bf5340;
  min-height: 20px;
  font-size: 12px;
  line-height: 1.5;
}
.login-content .form-error {
  margin: 0 0 5px;
}
/* 探索 */
.explore-screen {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  max-width: 1350px;
  margin: auto;
}
.greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 10px 7px;
}
.greeting > div {
  display: flex;
  align-items: center;
  gap: 13px;
}
.greeting .avatar-img {
  width: 49px;
  height: 49px;
  border: 2px solid #fff5df;
  box-shadow: 0 0 0 1px #f2d3a0;
}
.greeting h1 {
  font-size: 22px;
  font-weight: 800;
}
.grade-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #d7c8ae;
  border-radius: 20px;
  padding: 5px 13px;
  background: #fffdf5c9;
}
.grade-pill select {
  border: 0;
  background: none;
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
  max-width: 160px;
  outline: none;
}
.grade-pill .ui-icon {
  width: 19px;
  height: 19px;
}
.mentor-arena {
  position: relative;
  min-height: 0;
  background: url("/assets/v3/ui/stage-bg.png") center 60% / cover no-repeat;
  border-radius: 35px;
  isolation: isolate;
  touch-action: pan-y;
  overflow: hidden;
}
.mentor-arena:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#fffcf030, transparent 40%, #fffaf018);
  z-index: -1;
  pointer-events: none;
}
.main-mentor {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 15px;
  height: 95%;
  width: 60%;
  object-fit: contain;
  z-index: 2;
  transform-origin: 50% 90%;
  filter: drop-shadow(0 5px 2px #58745218);
}
.main-mentor.breathing {
  animation: mentor-breathe 4s ease-in-out infinite;
}
.mentor-side {
  position: absolute;
  width: 24%;
  height: 60%;
  bottom: 12%;
  opacity: 0.72;
  z-index: 1;
}
.mentor-side.left {
  left: 1%;
}
.mentor-side.right {
  right: 1%;
}
.mentor-side .figure {
  height: 100%;
  width: 100%;
}
.mentor-arrow {
  position: absolute;
  top: 48%;
  z-index: 3;
  width: 53px;
  height: 53px;
  padding: 0;
}
.mentor-arrow.left {
  left: 25px;
}
.mentor-arrow.right {
  right: 25px;
}
.mentor-arrow .ui-icon {
  width: 100%;
  height: 100%;
}
.mentor-dots {
  display: flex;
  gap: 8px;
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: #fff9e7bb;
  padding: 7px 14px;
  border-radius: 30px;
}
.mentor-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddceb6;
  padding: 0;
}
.mentor-dots button.active {
  background: #e38a28;
}
.mentor-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  background: #fffaf0da;
  border-radius: 25px;
  padding: 14px 30px;
  margin: 7px auto 0;
  min-width: 600px;
  max-width: 90%;
  box-shadow: 0 2px 10px #93775208;
}
.mentor-caption > div {
  display: flex;
  align-items: center;
  gap: 23px;
}
.mentor-caption h2 {
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 3px;
}
.mentor-caption p {
  font-size: 17px;
}
.mentor-caption .art-button {
  min-width: 220px;
}
/* 课程与学习 */
.course-collection {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.course-card {
  background: #fffdf3e8;
  border: 2px solid #fff;
  border-radius: 29px;
  overflow: hidden;
  box-shadow: 0 3px 8px #7591a315;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.course-art {
  height: 50%;
  min-height: 0;
  background: #e8f0df url("/assets/v3/ui/stage-bg.png") center/cover;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.course-art .figure {
  width: 90%;
  height: 100%;
  object-fit: contain;
}
.course-art.moon-course {
  background-image: url("/assets/chat-scene.png");
  background-position: center;
  position: relative;
}
.course-art.moon-course .figure {
  visibility: hidden;
}
.course-copy {
  padding: 19px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  flex: 1;
  min-height: 0;
}
.course-copy > span {
  font-size: 11px;
  color: #9a907b;
}
.course-copy h2 {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.45;
}
.course-copy p {
  font-size: 13px;
  color: #697d91;
  line-height: 1.7;
}
.course-copy .art-button {
  margin-top: auto;
  font-size: 17px;
  min-width: 180px;
}
.lesson-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  max-width: 950px;
  margin: auto;
}
.lesson-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.lesson-heading h1 {
  font-size: 23px;
}
.lesson-heading > span {
  font-size: 14px;
  color: #89968e;
}
.lesson-reading {
  display: flex;
  gap: 25px;
  align-items: center;
  background: #fffdf2c9;
  border-radius: 24px;
  padding: 14px 25px;
  flex: 1;
  min-height: 0;
  max-height: 280px;
}
.lesson-reading .figure {
  height: 100%;
  max-height: 210px;
  width: 190px;
  flex-shrink: 0;
}
.lesson-reading p {
  font-size: 18px;
  line-height: 2;
}
.lesson-question {
  background: #fffdf6e3;
  border: 1px solid #eee3d0;
  border-radius: 24px;
  padding: 20px 25px;
  flex-shrink: 0;
}
.lesson-question h2 {
  font-size: 19px;
  margin-bottom: 17px;
}
.answer-options {
  display: flex;
  gap: 15px;
}
.answer-options > button {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f4f5e7;
  border: 1px solid #e1ddc8;
  min-height: 59px;
  border-radius: 15px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}
.answer-options > button.chosen {
  border-color: #eda83c;
  background: #fff0cc;
  box-shadow: inset 0 0 0 1px #eda83c;
}
.answer-feedback {
  font-size: 12px;
  color: #cf7541;
  min-height: 20px;
  margin-top: 10px;
}
.lesson-actions {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}
.lesson-actions .art-button {
  min-width: 230px;
}
/* 勋章 */
.medal-summary {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 14px;
  color: #7c8290;
  margin-top: 12px;
}
.medal-summary b {
  color: #d88331;
  font-size: 19px;
}
.medal-filter {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: #8b8b81;
  flex-shrink: 0;
}
.medal-filter select {
  border: 1px solid #ded4bd;
  background: #fffaf0;
  border-radius: 20px;
  padding: 7px 17px;
  color: var(--navy);
  font-size: 13px;
}
.medal-collection {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  flex: 1;
  min-height: 0;
  gap: 12px;
  max-width: 950px;
  width: 100%;
  margin: auto;
}
.medal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  min-height: 0;
  min-width: 0;
}
.medal-art {
  display: block;
  position: relative;
  min-height: 0;
  flex: 1;
  max-height: 135px;
  max-width: 140px;
  aspect-ratio: 1;
}
.medal-art > img:first-child {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.medal-card b {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.medal-card.locked .medal-art > img:first-child {
  filter: grayscale(0.85);
  opacity: 0.65;
}
.medal-lock {
  position: absolute;
  right: 1px;
  bottom: 0;
  width: 27px;
  height: 27px;
  filter: none !important;
  opacity: 1 !important;
}
.medal-card.earned .medal-art {
  filter: drop-shadow(0 3px 5px #edb53f24);
}
.medal-detail {
  text-align: center;
  padding: 7px 10px 20px;
}
.medal-detail > img {
  width: 180px;
  height: 180px;
  display: block;
  margin: auto;
}
.medal-detail h2 {
  font-size: 24px;
  margin: 10px 0;
}
.medal-detail > span {
  font-size: 12px;
  color: #a18b60;
}
.medal-detail p {
  font-size: 14px;
  margin-top: 14px;
  color: #7d8691;
  line-height: 1.9;
}
/* 排名 */
.ranking-screen {
  max-width: 950px;
}
.rank-toggle {
  display: flex;
  border: 1px solid #dfcfb3;
  background: #fff8e8;
  align-self: center;
  padding: 3px;
  border-radius: 25px;
  flex-shrink: 0;
}
.rank-toggle button {
  font-size: 14px;
  padding: 9px 29px;
  border-radius: 25px;
  font-weight: 600;
}
.rank-toggle .active {
  background: #ee963f;
  color: #fff;
}
.rank-table {
  background: #fffdf5e8;
  border: 1px solid #e6dac4;
  border-radius: 23px;
  padding: 5px 22px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rank-head,
.rank-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 100px 100px;
  align-items: center;
  gap: 10px;
}
.rank-head {
  font-size: 12px;
  color: #a0a194;
  min-height: 35px;
  flex-shrink: 0;
}
.rank-head > span:not(:nth-child(2)) {
  text-align: center;
}
.rank-row {
  flex: 1;
  min-height: 0;
  max-height: 85px;
  border-top: 1px solid #eae6db;
  padding: 6px 0;
  font-size: 16px;
}
.rank-row > div {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 0;
}
.rank-row > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-row .avatar-img {
  height: 46px;
  width: 46px;
  flex-shrink: 0;
  background: #fff4dd;
}
.rank-row small {
  font-size: 10px;
  color: #e6973d;
  margin-left: 8px;
}
.rank-row > span,
.rank-row > b {
  text-align: center;
}
.rank-row > b:last-child {
  color: #de8b30;
}
.rank-position {
  font-size: 18px;
  color: #8d9ba8;
}
.rank-position.rank-1 {
  color: #e6a52e;
  font-size: 24px;
}
.rank-position.rank-2 {
  color: #8ba8b9;
  font-size: 23px;
}
.rank-position.rank-3 {
  color: #b58969;
  font-size: 22px;
}
.my-rank {
  background: #fff5dca6;
  border-radius: 10px;
}
.rank-explanation {
  text-align: center;
  font-size: 11px;
  color: #8492a0;
  line-height: 1.6;
  flex-shrink: 0;
}
.empty-ranking {
  text-align: center;
  color: #95a2ac;
  padding: 25px;
}
/* 个人中心 */
.profile-screen {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 850px;
  margin: auto;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 23px;
  padding: 10px 25px;
  background: #fffdf4b8;
  border-radius: 25px;
  min-height: 0;
  flex: 1;
  max-height: 150px;
}
.profile-identity .avatar-img {
  width: 105px;
  height: 105px;
  flex-shrink: 0;
  border: 3px solid #f7d39d;
  box-shadow: 0 0 0 4px white;
}
.profile-identity h2 {
  font-size: 26px;
  font-weight: 800;
}
.profile-identity p {
  font-size: 14px;
  color: #697f93;
  margin-top: 10px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.profile-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #fffbecdd;
  border: 1px solid #eee0c2;
  border-radius: 21px;
  min-height: 75px;
  padding: 10px;
  flex-shrink: 0;
}
.profile-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  font-size: 12px;
}
.profile-stats span + span {
  border-left: 1px solid #e9d9b8;
}
.profile-stats b {
  font-size: 27px;
  color: #e48c2e;
  line-height: 1.2;
}
.profile-settings {
  background: #fffcf5e6;
  border: 1px solid #e4e0d5;
  border-radius: 22px;
  padding: 0 18px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.profile-settings > button {
  display: flex;
  gap: 13px;
  align-items: center;
  flex: 1;
  min-height: 35px;
  padding: 5px 0;
  border-bottom: 1px solid #e2e1dc;
}
.profile-settings > button:last-child {
  border: 0;
}
.profile-settings .ui-icon {
  width: 28px;
  height: 28px;
}
.profile-settings b {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.profile-settings > button > span {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7f8c98;
  font-size: 13px;
  max-width: 52%;
}
.profile-settings .row-chevron {
  width: 22px;
  height: 22px;
}
.profile-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-shrink: 0;
}
.profile-actions .art-button {
  min-width: 220px;
}
.logout-button {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #8d98a0;
}
.logout-button .ui-icon {
  width: 22px;
  height: 22px;
}
/* 对话：底部仅语音、键盘 */
.screen-chat {
  padding-bottom: 20px;
}
.chat-screen {
  height: 100%;
  max-width: 950px;
  margin: auto;
  display: grid;
  grid-template-rows: 90px minmax(0, 1fr) 73px;
  min-height: 0;
  gap: 15px;
}
.chat-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 10px;
}
.chat-top h1 {
  font-size: 24px;
  font-weight: 800;
}
.chat-top small {
  display: block;
  font-size: 11px;
  color: #91a0a9;
  margin-top: 8px;
}
.chat-head-figure {
  height: 95px;
  width: 100px;
  margin-left: auto;
  max-height: 110%;
}
.chat-messages {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  background: #fffef9c9;
  border: 1px solid #ede7dc;
  border-radius: 25px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: #e4dbc5 transparent;
}
.chat-bubble {
  display: block;
  max-width: 85%;
  align-self: flex-start;
  border-radius: 3px 20px 20px 20px;
  padding: 14px 19px;
  background: #f0f2e9;
  color: #25425e;
  font-size: 16px;
  line-height: 1.9;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 0;
}
.chat-bubble.user {
  align-self: flex-end;
  background: #e3f1fa;
  border-radius: 20px 3px 20px 20px;
}
.chat-bubble.typing {
  color: #a1acac;
  animation: pulse 1.5s infinite;
}
.chat-bubble.chat-error {
  color: #b2684c;
  background: #fff1df;
}
.chat-only-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 4px 0;
  min-height: 0;
}
.voice-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: url("/assets/v3/ui/button-primary.png") center/125% 250% no-repeat;
  border-radius: 30px;
  min-height: 56px;
  width: min(80%, 480px);
  color: white;
  font-size: 18px;
  font-weight: 700;
}
.voice-button .ui-icon {
  width: 34px;
  height: 34px;
}
.voice-button.recording {
  filter: hue-rotate(-14deg);
  animation: pulse 1s infinite;
}
.keyboard-button {
  width: 61px;
  height: 56px;
  border-radius: 18px;
  background: #fffbef;
  border: 1px solid #e1d7c1;
  display: grid;
  place-items: center;
}
.keyboard-button .ui-icon {
  width: 47px;
  height: 43px;
}
/* 弹窗 */
.sheet-dialog {
  color: var(--navy);
  border: 1px solid #e5d6bb;
  border-radius: 26px;
  background: #fffdf3;
  padding: 35px;
  max-width: calc(100vw - 26px);
  width: 490px;
  max-height: calc(100dvh - 30px);
  box-shadow: 0 20px 80px #3d5a7340;
  overflow: hidden;
}
.sheet-dialog::backdrop {
  background: #456a8055;
  backdrop-filter: blur(4px);
}
.sheet-dialog h2 {
  text-align: center;
  font-size: 23px;
  margin-bottom: 24px;
}
.sheet-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 33px;
  height: 33px;
  padding: 0;
  z-index: 3;
}
.sheet-close .ui-icon {
  height: 100%;
  width: 100%;
}
.avatar-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 11px;
}
.avatar-options button {
  padding: 3px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
}
.avatar-options button.selected {
  border-color: #f5a138;
  background: #ffedc5;
}
.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sheet-form label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  color: #667f94;
}
.sheet-form input,
.sheet-form textarea {
  border: 1px solid #d7d5c8;
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 15px;
  width: 100%;
  color: var(--navy);
  background: #fffef8;
  resize: none;
}
.sheet-form .art-button {
  align-self: center;
  min-width: 230px;
}
.grade-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sheet-dialog:has(.avatar-options) {
  width: 580px;
}
.sheet-dialog:has(.medal-detail) {
  width: 390px;
}
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: #244d63ef;
  color: #fff;
  padding: 13px 23px;
  border-radius: 16px;
  max-width: 90vw;
  width: max-content;
  z-index: 100;
  font-size: 13px;
  line-height: 1.7;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes mentor-breathe {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateX(-50%) translateY(-4px) rotate(1deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.6;
  }
}
@media (min-width: 1600px) {
  .student-shell {
    border-left: 1px solid #dcebf0;
    border-right: 1px solid #dcebf0;
  }
  .student-main {
    padding-left: 60px;
    padding-right: 60px;
  }
  .course-copy h2 {
    font-size: 29px;
  }
  .course-copy p {
    font-size: 16px;
  }
  .medal-art {
    max-height: 180px;
    max-width: 180px;
  }
  .medal-card b {
    font-size: 17px;
  }
  .profile-screen {
    max-width: 950px;
  }
  .profile-settings b {
    font-size: 18px;
  }
  .profile-settings > button > span {
    font-size: 15px;
  }
}
@media (max-width: 1000px) and (min-width: 701px) {
  .student-shell {
    grid-template-rows: 64px minmax(0, 1fr) 82px;
  }
  .student-shell.is-login {
    grid-template-rows: 64px minmax(0, 1fr);
  }
  .student-header {
    padding: 6px 24px;
  }
  .student-main {
    padding: 10px 24px 16px;
  }
  .course-collection {
    gap: 16px;
  }
  .course-copy {
    padding: 15px 12px;
    gap: 8px;
  }
  .course-copy h2 {
    font-size: 21px;
  }
  .course-copy p {
    font-size: 12px;
  }
  .course-copy .art-button {
    font-size: 15px;
    min-width: 160px;
  }
  .login-layout {
    gap: 15px;
  }
  .login-content {
    padding: 27px 23px;
  }
  .login-content h1 {
    font-size: 23px;
  }
  .login-field {
    min-height: 54px;
  }
  .mentor-caption {
    min-width: 570px;
    gap: 25px;
    padding: 13px 20px;
  }
  .mentor-caption p {
    font-size: 14px;
  }
  .mentor-caption h2 {
    font-size: 29px;
  }
  .bottom-nav {
    padding-left: 7%;
    padding-right: 7%;
    gap: 10px;
  }
  .greeting h1 {
    font-size: 20px;
  }
  .medal-art {
    max-height: 145px;
    max-width: 145px;
  }
  .lesson-reading p {
    font-size: 16px;
  }
  .answer-options {
    gap: 10px;
  }
  .answer-options > button {
    font-size: 14px;
  }
}
@media (max-width: 799px) {
  .course-collection {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
  .course-card {
    flex-direction: row;
  }
  .course-art {
    height: 100%;
    width: 40%;
    flex-shrink: 0;
  }
  .course-copy {
    align-items: flex-start;
    text-align: left;
    justify-content: center;
    padding: 15px 20px;
    gap: 8px;
  }
  .course-copy h2 {
    font-size: 21px;
  }
  .course-copy p {
    font-size: 13px;
  }
  .course-copy .art-button {
    margin-top: 5px;
  }
  .medal-collection {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 600px;
  }
  .rank-row {
    max-height: 100px;
  }
}
@media (max-width: 700px) {
  .student-shell {
    grid-template-rows: 55px minmax(0, 1fr) calc(
        73px + env(safe-area-inset-bottom)
      );
  }
  .student-shell.is-login {
    grid-template-rows: 55px minmax(0, 1fr);
  }
  .student-shell.is-chat {
    grid-template-rows: 51px minmax(0, 1fr);
  }
  .student-header {
    padding: 4px 18px;
  }
  .logo {
    width: 125px;
    height: 44px;
  }
  .header-meta {
    font-size: 10px;
    gap: 12px;
  }
  .header-avatar {
    width: 31px;
    height: 31px;
  }
  .service-state {
    font-size: 9px;
  }
  .student-main {
    padding: 7px 16px 12px;
  }
  .bottom-nav {
    gap: 0;
    padding: 4px 10px calc(5px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .bottom-nav button {
    padding: 3px 8px;
    min-width: 0;
    flex: 1;
    font-size: 12px;
    gap: 1px;
  }
  .bottom-nav button .ui-icon {
    width: 36px;
    height: 36px;
  }
  .art-button {
    min-height: 43px;
    min-width: 140px;
    font-size: 16px;
    padding: 6px 22px;
  }
  .page-title h1 {
    font-size: 24px;
    letter-spacing: 1px;
  }
  .page-title p {
    font-size: 11px;
    margin-top: 7px;
  }
  .collection-screen {
    gap: 12px;
  }
  .pager {
    height: 35px;
    font-size: 13px;
    gap: 18px;
  }
  .pager button {
    width: 34px;
    height: 34px;
  }
  .login-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: center;
    max-width: 430px;
  }
  .login-art {
    width: 100%;
    flex: 1;
    min-height: 120px;
    max-height: 39%;
    align-self: stretch;
  }
  .login-art-image {
    inset: -10px -15px -10px;
    background-position: center 72%;
    mask-image: radial-gradient(
      ellipse at center,
      #000 34%,
      #000d 52%,
      transparent 75%
    );
  }
  .login-content {
    padding: 21px 22px 17px;
    border-radius: 24px;
    max-width: none;
    margin-bottom: 5px;
    flex-shrink: 0;
  }
  .login-content h1 {
    font-size: 22px;
    margin-bottom: 21px;
  }
  .login-field {
    min-height: 48px;
    border-radius: 14px;
    padding: 8px 12px;
    margin-bottom: 14px;
    gap: 10px;
  }
  .login-field input {
    font-size: 15px;
  }
  .login-field .ui-icon {
    height: 24px;
    width: 24px;
  }
  .login-content .art-button {
    min-height: 46px;
    font-size: 19px;
  }
  .login-hint {
    font-size: 11px;
    margin: 11px 0 13px;
  }
  .staff-link {
    font-size: 9px;
  }
  .form-error {
    font-size: 11px;
    min-height: 17px;
  }
  .greeting {
    padding: 2px 0 5px;
    gap: 10px;
  }
  .greeting > div {
    gap: 9px;
  }
  .greeting .avatar-img {
    width: 37px;
    height: 37px;
  }
  .greeting h1 {
    font-size: 16px;
  }
  .grade-pill {
    padding: 5px 6px;
    border-radius: 16px;
  }
  .grade-pill select {
    font-size: 10px;
    padding: 0;
    max-width: 101px;
  }
  .grade-pill .ui-icon {
    width: 15px;
    height: 15px;
  }
  .mentor-arena {
    border-radius: 22px;
    background-position: center 60%;
    margin: 2px -6px 0;
  }
  .main-mentor {
    height: 94%;
    width: 89%;
    bottom: 13px;
  }
  .mentor-side {
    width: 37%;
    height: 48%;
    bottom: 15%;
    opacity: 0.55;
  }
  .mentor-side.left {
    left: -20%;
  }
  .mentor-side.right {
    right: -20%;
  }
  .mentor-arrow {
    width: 41px;
    height: 41px;
    top: 48%;
  }
  .mentor-arrow.left {
    left: 0;
  }
  .mentor-arrow.right {
    right: 0;
  }
  .mentor-dots {
    bottom: 4px;
    gap: 7px;
    padding: 6px 10px;
  }
  .mentor-dots button {
    width: 7px;
    height: 7px;
  }
  .mentor-caption {
    flex-direction: column;
    gap: 10px;
    padding: 8px 13px 8px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    margin-top: 0;
    background: #fffaf0a6;
    border-radius: 23px;
  }
  .mentor-caption > div {
    flex-direction: column;
    gap: 4px;
  }
  .mentor-caption h2 {
    font-size: 29px;
    letter-spacing: 3px;
  }
  .mentor-caption p {
    font-size: 15px;
    line-height: 1.4;
  }
  .mentor-caption .art-button {
    min-width: 230px;
    min-height: 42px;
    font-size: 17px;
  }
  .course-collection {
    gap: 12px;
  }
  .course-card {
    border-radius: 23px;
  }
  .course-art {
    width: 40%;
  }
  .course-copy {
    padding: 12px 13px;
    gap: 6px;
  }
  .course-copy > span {
    font-size: 9px;
  }
  .course-copy h2 {
    font-size: 19px;
    line-height: 1.35;
  }
  .course-copy p {
    font-size: 11px;
    line-height: 1.65;
  }
  .course-copy .art-button {
    margin-top: 3px;
    min-width: 130px;
    min-height: 35px;
    font-size: 14px;
    padding: 4px 13px;
  }
  .lesson-screen {
    gap: 12px;
  }
  .lesson-heading {
    gap: 10px;
  }
  .lesson-heading h1 {
    font-size: 17px;
    flex: 1;
    text-align: center;
  }
  .lesson-heading > span {
    font-size: 11px;
    white-space: nowrap;
  }
  .lesson-heading .image-button {
    width: 34px;
    height: 34px;
  }
  .lesson-heading .ui-icon {
    width: 32px;
    height: 32px;
  }
  .lesson-reading {
    padding: 13px 15px;
    gap: 9px;
    border-radius: 20px;
    min-height: 110px;
    max-height: 230px;
  }
  .lesson-reading .figure {
    width: 84px;
    max-height: 145px;
  }
  .lesson-reading p {
    font-size: 13px;
    line-height: 1.9;
  }
  .lesson-question {
    padding: 15px;
    border-radius: 20px;
  }
  .lesson-question h2 {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
  }
  .answer-options {
    flex-direction: column;
    gap: 9px;
  }
  .answer-options > button {
    font-size: 13px;
    min-height: 41px;
    padding: 8px 11px;
    border-radius: 11px;
    line-height: 1.5;
  }
  .answer-feedback {
    font-size: 10px;
    margin-top: 7px;
    min-height: 17px;
  }
  .lesson-actions .art-button {
    min-width: 200px;
    min-height: 39px;
    font-size: 15px;
  }
  .medal-summary {
    font-size: 11px;
    gap: 22px;
    margin-top: 9px;
  }
  .medal-summary b {
    font-size: 17px;
  }
  .medal-filter {
    font-size: 10px;
    gap: 10px;
  }
  .medal-filter select {
    font-size: 11px;
    padding: 5px 13px;
  }
  .medal-collection {
    gap: 6px 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .medal-art {
    max-height: 125px;
    max-width: 115px;
    min-height: 0;
  }
  .medal-card {
    gap: 3px;
  }
  .medal-card b {
    font-size: 11px;
    line-height: 1.8;
  }
  .medal-lock {
    width: 22px;
    height: 22px;
  }
  .ranking-screen {
    gap: 12px;
  }
  .rank-toggle button {
    font-size: 12px;
    padding: 7px 24px;
  }
  .rank-table {
    padding: 4px 12px;
    border-radius: 20px;
  }
  .rank-head,
  .rank-row {
    grid-template-columns: 35px minmax(0, 1fr) 43px 46px;
    gap: 7px;
  }
  .rank-head {
    font-size: 10px;
    min-height: 33px;
  }
  .rank-row {
    font-size: 13px;
    max-height: 86px;
    padding: 5px 0;
  }
  .rank-row > div {
    gap: 8px;
  }
  .rank-row .avatar-img {
    width: 35px;
    height: 35px;
  }
  .rank-row small {
    font-size: 9px;
    margin-left: 5px;
  }
  .rank-position {
    font-size: 16px;
  }
  .rank-position.rank-1 {
    font-size: 21px;
  }
  .rank-explanation {
    font-size: 8px;
    line-height: 1.7;
  }
  .profile-screen {
    gap: 11px;
  }
  .profile-identity {
    padding: 9px 15px;
    gap: 15px;
    border-radius: 21px;
    max-height: 125px;
    min-height: 86px;
    flex: 1;
  }
  .profile-identity .avatar-img {
    width: 76px;
    height: 76px;
    border-width: 2px;
  }
  .profile-identity h2 {
    font-size: 22px;
  }
  .profile-identity p {
    font-size: 11px;
    margin-top: 7px;
    line-height: 1.7;
  }
  .profile-stats {
    min-height: 65px;
    border-radius: 18px;
    padding: 8px;
  }
  .profile-stats span {
    font-size: 11px;
  }
  .profile-stats b {
    font-size: 24px;
  }
  .profile-settings {
    border-radius: 20px;
    padding: 0 14px;
    flex: 2;
    min-height: 160px;
  }
  .profile-settings > button {
    gap: 8px;
    min-height: 30px;
  }
  .profile-settings .ui-icon {
    width: 23px;
    height: 23px;
  }
  .profile-settings b {
    font-size: 13px;
  }
  .profile-settings > button > span {
    font-size: 10px;
    max-width: 44%;
  }
  .profile-settings .row-chevron {
    width: 18px;
    height: 18px;
  }
  .profile-actions {
    gap: 10px;
    position: relative;
    flex-direction: column;
    padding-bottom: 0;
  }
  .profile-actions .art-button {
    min-width: 210px;
    min-height: 40px;
    font-size: 16px;
  }
  .logout-button {
    font-size: 9px;
    gap: 4px;
    min-height: 20px;
  }
  .logout-button .ui-icon {
    width: 17px;
    height: 17px;
  }
  .chat-screen {
    grid-template-rows: 73px minmax(0, 1fr) 64px;
    gap: 10px;
  }
  .chat-top {
    padding: 0;
    gap: 10px;
  }
  .chat-top .image-button {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .chat-top .ui-icon {
    width: 33px;
    height: 33px;
  }
  .chat-top h1 {
    font-size: 18px;
  }
  .chat-top small {
    font-size: 9px;
    margin-top: 6px;
  }
  .chat-head-figure {
    height: 78px;
    width: 77px;
  }
  .chat-messages {
    padding: 15px 12px;
    gap: 15px;
    border-radius: 21px;
  }
  .chat-bubble {
    font-size: 14px;
    line-height: 1.85;
    padding: 11px 14px;
    max-width: 90%;
    border-radius: 3px 17px 17px 17px;
  }
  .chat-bubble.user {
    border-radius: 17px 3px 17px 17px;
  }
  .chat-only-controls {
    gap: 13px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .voice-button {
    width: calc(100% - 73px);
    min-height: 48px;
    font-size: 16px;
    gap: 10px;
  }
  .voice-button .ui-icon {
    width: 30px;
    height: 30px;
  }
  .keyboard-button {
    width: 53px;
    height: 48px;
    border-radius: 15px;
  }
  .keyboard-button .ui-icon {
    width: 39px;
    height: 35px;
  }
  .sheet-dialog {
    padding: 30px 23px 25px;
    border-radius: 23px;
    width: 430px;
  }
  .sheet-dialog h2 {
    font-size: 21px;
    margin-bottom: 21px;
  }
  .sheet-dialog:has(.avatar-options) {
    width: 430px;
    padding: 30px 16px 23px;
  }
  .avatar-options {
    gap: 8px;
  }
  .avatar-options button {
    padding: 2px;
  }
  .sheet-form {
    gap: 15px;
  }
  .sheet-form input,
  .sheet-form textarea {
    font-size: 14px;
    padding: 11px 13px;
  }
  .sheet-form label {
    font-size: 12px;
  }
  .sheet-form .art-button {
    min-width: 200px;
    font-size: 16px;
  }
  .medal-detail > img {
    width: 150px;
    height: 150px;
  }
  .medal-detail h2 {
    font-size: 22px;
  }
  .medal-detail p {
    font-size: 13px;
  }
  #toast {
    bottom: 95px;
    font-size: 12px;
    padding: 11px 17px;
  }
}
@media (max-height: 700px) {
  .student-shell {
    grid-template-rows: 49px minmax(0, 1fr) 64px;
  }
  .student-shell.is-login {
    grid-template-rows: 49px minmax(0, 1fr);
  }
  .student-shell.is-chat {
    grid-template-rows: 46px minmax(0, 1fr);
  }
  .student-header {
    padding-top: 3px;
    padding-bottom: 3px;
  }
  .logo {
    height: 40px;
  }
  .bottom-nav {
    padding-top: 2px;
    padding-bottom: 4px;
  }
  .bottom-nav button .ui-icon {
    width: 30px;
    height: 30px;
  }
  .bottom-nav button {
    font-size: 11px;
  }
  .student-main {
    padding-top: 5px;
    padding-bottom: 8px;
  }
  .greeting {
    padding-bottom: 3px;
  }
  .greeting .avatar-img {
    width: 33px;
    height: 33px;
  }
  .greeting h1 {
    font-size: 15px;
  }
  .mentor-caption {
    gap: 5px;
    padding: 5px 8px;
  }
  .mentor-caption h2 {
    font-size: 24px;
  }
  .mentor-caption p {
    font-size: 13px;
  }
  .mentor-caption .art-button {
    min-height: 35px;
    font-size: 15px;
  }
  .page-title h1 {
    font-size: 21px;
  }
  .collection-screen {
    gap: 9px;
  }
  .page-title p {
    margin-top: 4px;
    font-size: 10px;
  }
  .medal-summary {
    margin-top: 5px;
  }
  .medal-filter select {
    padding: 4px 10px;
  }
  .pager {
    height: 31px;
  }
  .pager button {
    width: 29px;
    height: 29px;
  }
  .medal-art {
    max-height: 90px;
    max-width: 92px;
  }
  .medal-card b {
    font-size: 10px;
  }
  .profile-screen {
    gap: 8px;
  }
  .profile-identity {
    min-height: 68px;
    max-height: 90px;
    padding: 6px 12px;
  }
  .profile-identity .avatar-img {
    width: 60px;
    height: 60px;
  }
  .profile-identity h2 {
    font-size: 20px;
  }
  .profile-identity p {
    font-size: 10px;
    margin-top: 4px;
  }
  .profile-stats {
    min-height: 54px;
  }
  .profile-stats b {
    font-size: 21px;
  }
  .profile-stats span {
    font-size: 10px;
  }
  .profile-settings {
    min-height: 145px;
  }
  .profile-settings b {
    font-size: 12px;
  }
  .profile-settings .ui-icon {
    width: 21px;
    height: 21px;
  }
  .profile-settings > button > span {
    font-size: 9px;
  }
  .profile-actions {
    gap: 1px;
  }
  .profile-actions .art-button {
    min-height: 35px;
    font-size: 14px;
  }
  .login-content {
    padding: 17px 20px 12px;
  }
  .login-content h1 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  .login-field {
    min-height: 43px;
    margin-bottom: 11px;
  }
  .login-content .art-button {
    min-height: 40px;
    font-size: 17px;
  }
  .login-hint {
    margin: 7px 0 10px;
    font-size: 10px;
  }
  .login-art {
    max-height: 31%;
    min-height: 80px;
  }
  .login-content .form-error {
    min-height: 16px;
    font-size: 10px;
  }
  .chat-screen {
    grid-template-rows: 61px minmax(0, 1fr) 59px;
    gap: 8px;
  }
  .chat-head-figure {
    height: 66px;
  }
  .chat-top h1 {
    font-size: 17px;
  }
  .chat-top small {
    font-size: 8px;
  }
  .course-copy h2 {
    font-size: 17px;
  }
  .course-copy p {
    font-size: 10px;
  }
  .course-copy {
    gap: 5px;
    padding: 10px 12px;
  }
  .course-copy .art-button {
    min-height: 31px;
    font-size: 13px;
  }
  .course-copy > span {
    font-size: 8px;
  }
  .lesson-screen {
    gap: 8px;
  }
  .lesson-heading h1 {
    font-size: 16px;
  }
  .lesson-reading {
    padding: 8px 12px;
    min-height: 85px;
  }
  .lesson-reading p {
    font-size: 12px;
    line-height: 1.8;
  }
  .lesson-reading .figure {
    width: 67px;
    max-height: 95px;
  }
  .lesson-question {
    padding: 12px;
  }
  .lesson-question h2 {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .answer-options {
    gap: 7px;
  }
  .answer-options > button {
    min-height: 35px;
    padding: 6px 9px;
    font-size: 12px;
  }
  .answer-feedback {
    font-size: 9px;
    min-height: 15px;
    margin-top: 5px;
  }
  .lesson-actions .art-button {
    min-height: 33px;
    font-size: 14px;
  }
  .sheet-dialog {
    padding-top: 27px;
    padding-bottom: 20px;
  }
  .sheet-dialog h2 {
    font-size: 19px;
    margin-bottom: 17px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .student-shell {
    grid-template-rows: 42px minmax(0, 1fr) 57px;
  }
  .student-header {
    padding: 2px 20px;
  }
  .logo {
    height: 36px;
    width: 110px;
  }
  .bottom-nav {
    padding: 2px 16%;
    border-radius: 20px 20px 0 0;
  }
  .bottom-nav button .ui-icon {
    width: 26px;
    height: 26px;
  }
  .bottom-nav button {
    font-size: 9px;
    padding: 2px;
  }
  .student-main {
    padding: 3px 20px 6px;
  }
  .greeting {
    position: absolute;
    left: 30px;
    right: 30px;
    top: 0;
    z-index: 3;
  }
  .explore-screen {
    display: flex;
    flex-direction: column;
  }
  .mentor-arena {
    flex: 1;
    border-radius: 15px;
    margin: 0;
  }
  .mentor-side {
    height: 60%;
    bottom: 7%;
    width: 20%;
  }
  .mentor-side.left {
    left: 12%;
  }
  .mentor-side.right {
    right: 12%;
  }
  .main-mentor {
    width: 50%;
    height: 98%;
    bottom: 2px;
  }
  .mentor-caption {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 480px;
    flex-direction: row;
    gap: 25px;
    padding: 4px 15px;
    z-index: 3;
  }
  .mentor-caption > div {
    flex-direction: row;
    gap: 12px;
  }
  .mentor-caption h2 {
    font-size: 21px;
  }
  .mentor-caption p {
    font-size: 11px;
  }
  .mentor-caption .art-button {
    min-width: 170px;
    min-height: 30px;
    font-size: 13px;
  }
  .mentor-dots {
    bottom: 42px;
  }
  .mentor-arrow {
    width: 35px;
    height: 35px;
  }
  .greeting .avatar-img {
    width: 25px;
    height: 25px;
  }
  .greeting h1 {
    font-size: 12px;
  }
  .grade-pill select {
    font-size: 9px;
  }
  .page-title h1 {
    font-size: 18px;
  }
  .page-title p {
    display: none;
  }
  .course-collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 15px;
  }
  .course-copy p {
    display: none;
  }
  .course-copy h2 {
    font-size: 16px;
  }
  .collection-screen {
    gap: 6px;
  }
  .pager {
    height: 25px;
    font-size: 10px;
  }
  .pager button {
    width: 24px;
    height: 24px;
  }
  .medal-collection {
    grid-template-columns: repeat(3, 1fr);
    max-width: 650px;
    gap: 2px 15px;
  }
  .medal-card {
    flex-direction: row;
    gap: 6px;
    justify-content: start;
  }
  .medal-art {
    height: 55px;
    max-height: 55px;
    flex: 0 0 55px;
  }
  .medal-card b {
    font-size: 10px;
  }
  .medal-summary {
    font-size: 10px;
    margin-top: 2px;
  }
  .medal-summary b {
    font-size: 13px;
  }
  .medal-filter {
    position: absolute;
    right: 25px;
    top: 3px;
    font-size: 0;
  }
  .medal-filter select {
    font-size: 10px;
    padding: 3px;
  }
  .profile-screen {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    grid-template-rows: 24px 1fr 52px;
    gap: 8px 20px;
    max-width: 850px;
  }
  .profile-screen .page-title {
    grid-column: 1/-1;
  }
  .profile-identity {
    grid-column: 1;
    grid-row: 2;
    max-height: none;
    min-height: 0;
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 8px;
  }
  .profile-identity .avatar-img {
    width: 65px;
    height: 65px;
  }
  .profile-identity h2 {
    font-size: 18px;
  }
  .profile-identity p {
    font-size: 9px;
  }
  .profile-stats {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
    height: 52px;
  }
  .profile-stats b {
    font-size: 18px;
  }
  .profile-settings {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    padding: 0 12px;
  }
  .profile-settings > button {
    min-height: 0;
  }
  .profile-settings b {
    font-size: 11px;
  }
  .profile-settings .ui-icon {
    width: 19px;
    height: 19px;
  }
  .profile-actions {
    grid-column: 2;
    grid-row: 3;
    flex-direction: row;
    gap: 5px;
  }
  .profile-actions .art-button {
    min-width: 160px;
    min-height: 31px;
    font-size: 12px;
  }
  .logout-button {
    font-size: 8px;
  }
  .login-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 800px;
    height: 100%;
    gap: 10px;
  }
  .login-art {
    height: 100%;
    max-height: none;
    min-height: 0;
  }
  .login-content {
    padding: 15px 20px;
    max-height: 100%;
    align-self: center;
    margin: 0;
  }
  .login-content h1 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  .login-field {
    min-height: 34px;
    padding: 5px 10px;
    margin-bottom: 9px;
  }
  .login-field input {
    font-size: 12px;
  }
  .login-field .ui-icon {
    width: 20px;
    height: 20px;
  }
  .login-content .art-button {
    min-height: 31px;
    font-size: 14px;
  }
  .login-hint {
    font-size: 9px;
    margin: 4px 0;
  }
  .staff-link {
    font-size: 8px;
  }
  .login-content .form-error {
    min-height: 13px;
    font-size: 9px;
  }
  .chat-screen {
    grid-template-rows: 48px minmax(0, 1fr) 51px;
    gap: 5px;
  }
  .chat-top h1 {
    font-size: 16px;
  }
  .chat-head-figure {
    height: 50px;
  }
  .chat-top small {
    font-size: 8px;
    margin-top: 2px;
  }
  .chat-messages {
    padding: 10px 20px;
    gap: 10px;
  }
  .chat-bubble {
    font-size: 12px;
    padding: 7px 12px;
  }
  .voice-button {
    max-width: 400px;
    min-height: 40px;
    font-size: 14px;
  }
  .keyboard-button {
    width: 45px;
    height: 40px;
  }
  .keyboard-button .ui-icon {
    height: 32px;
    width: 32px;
  }
  .lesson-screen {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    grid-template-rows: 35px 1fr 38px;
    gap: 7px 14px;
  }
  .lesson-heading {
    grid-column: 1/-1;
  }
  .lesson-reading {
    grid-column: 1;
    grid-row: 2/4;
    min-height: 0;
    max-height: none;
    gap: 7px;
    padding: 7px;
  }
  .lesson-reading .figure {
    width: 75px;
    max-height: 130px;
  }
  .lesson-reading p {
    font-size: 11px;
    line-height: 1.8;
  }
  .lesson-question {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    padding: 10px;
  }
  .lesson-question h2 {
    font-size: 12px;
    margin-bottom: 7px;
  }
  .answer-options {
    gap: 5px;
  }
  .answer-options > button {
    font-size: 10px;
    padding: 5px 8px;
    min-height: 27px;
  }
  .answer-feedback {
    font-size: 8px;
    min-height: 12px;
    margin-top: 3px;
  }
  .lesson-actions {
    grid-column: 2;
    grid-row: 3;
  }
  .lesson-actions .art-button {
    font-size: 12px;
    min-height: 29px;
  }
  .rank-table {
    padding: 2px 15px;
  }
  .rank-row {
    font-size: 11px;
  }
  .rank-row .avatar-img {
    height: 24px;
    width: 24px;
  }
  .rank-head {
    font-size: 9px;
    min-height: 20px;
  }
  .rank-toggle {
    position: absolute;
    right: 25px;
    top: 2px;
  }
  .rank-toggle button {
    font-size: 9px;
    padding: 4px 13px;
  }
  .rank-explanation {
    font-size: 8px;
  }
  .sheet-dialog:has(.avatar-options) {
    width: 620px;
  }
  .avatar-options {
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
  }
  .sheet-dialog {
    max-height: calc(100dvh - 15px);
    padding: 23px 25px 17px;
  }
  .sheet-dialog h2 {
    font-size: 17px;
    margin-bottom: 10px;
  }
  .sheet-form {
    gap: 8px;
  }
  .sheet-form input,
  .sheet-form textarea {
    padding: 8px 11px;
    font-size: 12px;
  }
  .sheet-form label {
    font-size: 10px;
    gap: 4px;
  }
  .sheet-form .art-button {
    min-height: 31px;
    font-size: 13px;
  }
  .sheet-form textarea {
    max-height: 90px;
  }
  .medal-detail > img {
    width: 95px;
    height: 95px;
  }
  .medal-detail h2 {
    margin: 5px 0;
    font-size: 19px;
  }
  .medal-detail p {
    margin-top: 7px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.logo {
  position: relative;
  overflow: hidden;
}
.logo img {
  position: absolute;
  width: 160%;
  height: 170%;
  left: -30%;
  top: -35%;
  max-width: none;
}
.greeting > div {
  min-width: 0;
  flex: 1;
}
.greeting h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grade-pill {
  flex-shrink: 0;
}
.profile-identity > div {
  min-width: 0;
}
.profile-identity h2 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.profile-identity p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
@media (max-width: 700px) {
  .bottom-nav button .ui-icon {
    width: 43px;
    height: 43px;
  }
}
@media (max-height: 700px) {
  .bottom-nav button .ui-icon {
    width: 33px;
    height: 33px;
  }
}
/* v4：半身对话、录音反馈、收藏与单头像 */
.header-avatar {
  width: 55px;
  height: 55px;
  border: 3px solid #fff7e8;
  box-shadow:
    0 0 0 1px #e7c593,
    0 4px 12px #94774c16;
}
.student-header {
  padding-top: 4px;
  padding-bottom: 4px;
}
.logo {
  width: 180px;
  height: 59px;
  overflow: visible;
}
.logo img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: 100%;
}
.greeting {
  min-height: 44px;
}
.profile-avatar-edit {
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
}
.profile-avatar-edit .avatar-img {
  width: 100%;
  height: 100%;
}
.profile-avatar-edit {
  width: 105px;
  height: 105px;
}
.login-art-image {
  background-image: url("/assets/v3/ui/login-art-v4.png");
  background-size: contain;
  background-position: center;
  mask-image: none;
  inset: 0;
}
.login-art {
  min-height: 0;
}
.chat-screen {
  grid-template-rows: 46px minmax(90px, 0.8fr) minmax(0, 2fr);
  gap: 0;
  max-width: 1050px;
}
.chat-top {
  justify-content: flex-start;
  gap: 15px;
  padding: 0 8px;
}
.chat-top h1 {
  font-size: 21px;
}
.chat-top small {
  font-size: 10px;
  margin-top: 4px;
}
.chat-portrait {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.bust-crop {
  position: relative;
  width: 290px;
  height: 100%;
  max-height: 230px;
  overflow: hidden;
  mask-image: linear-gradient(#000 82%, transparent);
}
.bust-crop .figure {
  width: 335px;
  height: 335px;
  max-width: none;
  max-height: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -24px;
}
.chat-portrait > span {
  position: absolute;
  right: 15%;
  bottom: 22px;
  color: #8e9d9f;
  font-size: 11px;
  letter-spacing: 1px;
}
.chat-window {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 80px;
  min-height: 0;
  background: linear-gradient(145deg, #ffffffed, #fffaf0ed);
  border: 1px solid #eadac0;
  border-radius: 30px;
  box-shadow:
    0 12px 45px #54819a0d,
    inset 0 0 0 4px #fffef5;
  overflow: hidden;
}
.chat-window:before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f0cb92, transparent);
  pointer-events: none;
}
.chat-window .chat-messages {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 25px 27px;
  gap: 18px;
}
.chat-window .chat-only-controls {
  padding: 8px 20px 13px;
  background: #fffdf5;
  border-top: 1px solid #eee7d7;
}
.chat-window .chat-bubble {
  box-shadow: 0 3px 10px #2b565409;
  border: 1px solid #e8ece1;
  background: #f1f6ec;
}
.chat-window .chat-bubble.user {
  background: #e5f3fc;
  border-color: #d9eaf4;
}
.answer-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 88%;
  align-self: flex-start;
}
.answer-row > .chat-bubble {
  max-width: 100%;
}
.favorite-chat {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 11px;
  color: #a99267;
  padding: 2px 6px;
  margin-left: 5px;
  flex-shrink: 0;
}
.favorite-chat .ui-icon {
  height: 20px;
  width: 20px;
  opacity: 0.75;
}
.favorite-chat.saved {
  color: #d18a24;
  opacity: 1;
}
.favorite-chat.saved .ui-icon {
  opacity: 1;
}
.voice-button {
  position: relative;
}
.recording-indicator {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 4;
  background: #fffdf6f5;
  border: 1px solid #f1d6aa;
  border-radius: 23px;
  box-shadow: 0 15px 50px #97744120;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 24px 40px;
  pointer-events: none;
}
.recording-indicator[hidden] {
  display: none;
}
.recording-indicator b {
  font-size: 15px;
  color: #c78539;
  margin: 10px 0 6px;
}
.recording-indicator small {
  font-size: 11px;
  color: #a2a28e;
}
.record-waves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
}
.record-waves i {
  display: block;
  width: 5px;
  height: 15px;
  background: linear-gradient(#f6bc63, #ea8d40);
  border-radius: 8px;
  animation: record-wave 0.75s ease-in-out infinite alternate;
}
.record-waves i:nth-child(2n) {
  animation-delay: -0.3s;
  height: 28px;
}
.record-waves i:nth-child(3n) {
  animation-delay: -0.5s;
  height: 36px;
}
.record-waves i:nth-child(4n) {
  animation-delay: -0.15s;
  height: 22px;
}
.is-recording .voice-button {
  box-shadow: 0 0 0 6px #f5b96225;
}
.favorites-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.favorites-heading h1 {
  font-size: 24px;
}
.favorites-heading > span {
  font-size: 12px;
  color: #8a9bad;
}
.favorites-list {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 13px;
}
.favorite-card {
  position: relative;
  min-height: 0;
  background: #fffdf5ec;
  border: 1px solid #eee0c8;
  border-radius: 20px;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.favorite-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #b98c4d;
}
.favorite-card small {
  font-size: 10px;
  color: #a4acac;
}
.favorite-card > button:not(.remove-favorite) {
  text-align: left;
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.favorite-card h2 {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.favorite-card p {
  font-size: 12px;
  color: #85919a;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.remove-favorite {
  font-size: 10px;
  color: #a79f8d;
  align-self: flex-end;
  padding: 0;
}
.favorites-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: #9aa6ad;
  line-height: 2.1;
  font-size: 17px;
}
.favorites-empty small {
  font-size: 12px;
}
.favorite-detail {
  overflow-y: auto;
  max-height: 65dvh;
  padding-right: 5px;
}
.favorite-detail h3 {
  font-size: 13px;
  color: #be8f4e;
  margin: 20px 0 9px;
}
.favorite-detail p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.9;
  color: #647d92;
}
@keyframes record-wave {
  from {
    transform: scaleY(0.35);
  }
  to {
    transform: scaleY(1.2);
  }
}
@media (max-width: 700px) {
  .header-avatar {
    width: 44px;
    height: 44px;
    border-width: 2px;
  }
  .logo {
    height: 46px;
    width: 150px;
  }
  .profile-avatar-edit {
    width: 76px;
    height: 76px;
  }
  .student-main.screen-chat {
    padding: 4px 12px 12px;
  }
  .chat-screen {
    grid-template-rows: 43px minmax(90px, 0.85fr) minmax(0, 2fr);
  }
  .chat-top h1 {
    font-size: 18px;
  }
  .chat-top small {
    font-size: 9px;
  }
  .bust-crop {
    width: 240px;
    max-height: 200px;
  }
  .bust-crop .figure {
    width: 290px;
    height: 290px;
    top: -20px;
  }
  .chat-portrait > span {
    right: 6px;
    bottom: 13px;
    font-size: 9px;
    max-width: 75px;
    line-height: 1.8;
  }
  .chat-window {
    grid-template-rows: minmax(0, 1fr) 66px;
    border-radius: 25px;
  }
  .chat-window .chat-messages {
    padding: 17px 12px;
    gap: 14px;
  }
  .chat-window .chat-only-controls {
    padding: 7px 12px 8px;
  }
  .favorite-chat {
    font-size: 10px;
  }
  .favorite-chat .ui-icon {
    height: 18px;
    width: 18px;
  }
  .recording-indicator {
    padding: 19px 30px;
  }
  .favorites-heading h1 {
    font-size: 19px;
  }
  .favorites-heading .image-button,
  .favorites-heading .ui-icon {
    width: 34px;
    height: 34px;
  }
  .favorite-card {
    padding: 13px 15px;
    gap: 6px;
    border-radius: 17px;
  }
  .favorite-card h2 {
    font-size: 14px;
  }
  .favorite-card p {
    font-size: 11px;
  }
  .greeting {
    min-height: 37px;
  }
  .profile-settings > button {
    min-height: 0;
    padding: 4px 0;
  }
  .profile-settings b {
    font-size: 12px;
  }
  .profile-settings > button > span {
    font-size: 10px;
    max-width: 39%;
  }
}
@media (max-height: 700px) {
  .header-avatar {
    width: 39px;
    height: 39px;
  }
  .logo {
    height: 39px;
    width: 135px;
  }
  .profile-avatar-edit {
    width: 60px;
    height: 60px;
  }
  .profile-settings {
    min-height: 155px;
  }
  .profile-settings > button {
    min-height: 0;
    padding: 3px 0;
  }
  .profile-settings .ui-icon {
    width: 19px;
    height: 19px;
  }
  .chat-screen {
    grid-template-rows: 36px minmax(65px, 0.7fr) minmax(0, 2fr);
  }
  .bust-crop .figure {
    width: 245px;
    height: 245px;
    top: -15px;
  }
  .chat-window {
    grid-template-rows: minmax(0, 1fr) 58px;
  }
  .chat-top h1 {
    font-size: 16px;
  }
  .chat-top small {
    font-size: 8px;
  }
  .login-art {
    max-height: 34%;
    min-height: 80px;
  }
  .favorites-heading h1 {
    font-size: 17px;
  }
  .favorite-card {
    padding: 9px 13px;
    gap: 4px;
  }
  .favorite-card h2 {
    font-size: 12px;
  }
  .favorite-card p {
    font-size: 10px;
    -webkit-line-clamp: 1;
  }
  .favorite-card > div {
    font-size: 11px;
  }
  .remove-favorite {
    font-size: 9px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .chat-screen {
    grid-template-rows: 34px minmax(0, 1fr);
    grid-template-columns: 30% minmax(0, 1fr);
    gap: 6px 12px;
  }
  .chat-top {
    grid-column: 1/-1;
  }
  .chat-portrait {
    grid-column: 1;
    grid-row: 2;
  }
  .chat-window {
    grid-column: 2;
    grid-row: 2;
    grid-template-rows: minmax(0, 1fr) 52px;
  }
  .bust-crop {
    width: 200px;
    height: 100%;
  }
  .bust-crop .figure {
    width: 270px;
    height: 270px;
    top: 0;
  }
  .chat-portrait > span {
    display: none;
  }
  .chat-window .chat-messages {
    padding: 12px 15px;
  }
  .chat-window .chat-bubble {
    font-size: 12px;
    padding: 8px 12px;
  }
  .profile-settings {
    min-height: 0;
  }
  .profile-avatar-edit {
    width: 60px;
    height: 60px;
  }
  .profile-settings > button {
    padding: 1px 0;
  }
  .profile-settings .ui-icon {
    height: 16px;
    width: 16px;
  }
  .profile-settings b {
    font-size: 10px;
  }
  .profile-settings > button > span {
    font-size: 8px;
  }
  .login-art {
    max-height: none;
  }
  .greeting {
    min-height: 0;
  }
  .favorite-card {
    padding: 7px 12px;
  }
  .favorites-list {
    gap: 6px;
  }
  .favorite-card p {
    display: none;
  }
  .favorite-card small {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .record-waves i {
    animation: none;
    transform: scaleY(0.8);
  }
}
/* v5：首页使用统一全屏场景，主按钮由 Canvas 绘制。 */
.student-shell.is-explore {
  max-width: none;
  background: #f4f8ed url("/assets/v3/ui/stage-bg.png") center 60% / cover
    no-repeat;
  border: 0;
}
.is-explore .student-header {
  background: linear-gradient(#eff9ff70, transparent);
}
.is-explore .student-main {
  background: none;
}
.is-explore .explore-screen {
  max-width: 1450px;
}
.is-explore .mentor-arena {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  isolation: auto;
  margin-left: 0;
  margin-right: 0;
}
.is-explore .mentor-arena:after {
  display: none;
}
.is-explore .bottom-nav {
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(transparent, #fff9e9e8 37%, #fff9ecf5);
}
.is-explore .mentor-caption {
  background: none;
  border-radius: 0;
  box-shadow: none;
  gap: 28px;
  padding: 6px 15px;
  margin-top: 0;
}
.mentor-caption > .mentor-nameplate {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  position: relative;
  text-align: center;
  padding: 10px 38px 12px;
  min-width: 270px;
  background: linear-gradient(130deg, #fffdf3df, #fff8deed 48%, #fffdf3d9);
  border: 1px solid #e3c78f;
  border-radius: 12px 28px 12px 28px;
  box-shadow:
    inset 0 0 0 3px #fffdf2b0,
    0 5px 18px #94734814;
  backdrop-filter: blur(7px);
}
.mentor-nameplate:before,
.mentor-nameplate:after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: #e9ba67;
  border: 2px solid #fff7dc;
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 0 1px #e1bf80;
}
.mentor-nameplate:before {
  left: 13px;
}
.mentor-nameplate:after {
  right: 13px;
}
.mentor-nameplate .nameplate-kicker {
  font-size: 10px;
  letter-spacing: 3px;
  color: #a18d65;
  line-height: 1.4;
}
.mentor-nameplate h2 {
  font-size: 30px;
  letter-spacing: 5px;
  color: #244562;
  text-shadow: 0 1px white;
  line-height: 1.25;
}
.mentor-nameplate p {
  font-size: 13px;
  color: #78877c;
  line-height: 1.5;
}
.art-button.crystal-button,
.voice-button.crystal-button {
  position: relative;
  isolation: isolate;
  background: none !important;
  border: 0;
  box-shadow: none;
  text-shadow: 0 1px 2px #a94f1f55;
  color: #fff;
  overflow: visible;
  filter: none;
  border-radius: 26px;
}
.crystal-surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.crystal-button:hover {
  filter: brightness(1.035);
}
.crystal-button:active {
  transform: translateY(1px);
}
.crystal-button:disabled {
  opacity: 0.5;
}
.art-button.crystal-button.secondary {
  color: #fff;
}
.is-explore .mentor-caption .art-button {
  min-height: 52px;
  min-width: 230px;
  font-size: 18px;
}
.is-explore .greeting h1 {
  text-shadow: 0 1px 4px #fff;
}
.is-explore .mentor-side {
  opacity: 0.62;
}
@media (max-width: 700px) {
  .student-shell.is-explore {
    background-position: 50% center;
  }
  .is-explore .student-main {
    padding-top: 7px;
  }
  .is-explore .mentor-caption {
    gap: 8px;
    padding: 4px 0 7px;
  }
  .mentor-caption > .mentor-nameplate {
    min-width: 235px;
    padding: 7px 30px 8px;
    gap: 2px;
    border-radius: 10px 23px 10px 23px;
  }
  .mentor-nameplate .nameplate-kicker {
    font-size: 9px;
    letter-spacing: 2px;
  }
  .mentor-nameplate h2 {
    font-size: 27px;
    letter-spacing: 4px;
  }
  .mentor-nameplate p {
    font-size: 12px;
  }
  .is-explore .mentor-caption .art-button {
    min-height: 47px;
    min-width: 235px;
    font-size: 17px;
  }
  .is-explore .mentor-dots {
    background: #fff9e9a6;
  }
  .is-explore .mentor-side {
    opacity: 0.45;
  }
  .is-explore .bottom-nav {
    background: linear-gradient(#fffbef72, #fff9ecf2 44%);
    padding-top: 5px;
  }
}
@media (max-height: 700px) {
  .is-explore .mentor-caption {
    gap: 5px;
    padding-bottom: 3px;
  }
  .mentor-caption > .mentor-nameplate {
    padding: 5px 30px 6px;
    min-width: 220px;
    gap: 1px;
  }
  .mentor-nameplate h2 {
    font-size: 23px;
  }
  .mentor-nameplate p {
    font-size: 11px;
  }
  .mentor-nameplate .nameplate-kicker {
    font-size: 8px;
  }
  .is-explore .mentor-caption .art-button {
    min-height: 39px;
    min-width: 220px;
    font-size: 15px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .is-explore .mentor-caption {
    gap: 18px;
    padding: 3px 12px;
    min-width: 490px;
    max-width: 90%;
    width: auto;
    bottom: 0;
  }
  .mentor-caption > .mentor-nameplate {
    min-width: 220px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 12px;
    text-align: left;
    padding: 6px 17px;
    border-radius: 10px 20px 10px 20px;
  }
  .mentor-nameplate .nameplate-kicker {
    grid-column: 2;
    grid-row: 1;
    font-size: 7px;
  }
  .mentor-nameplate h2 {
    grid-column: 1;
    grid-row: 1/3;
    align-self: center;
    font-size: 23px;
  }
  .mentor-nameplate p {
    grid-column: 2;
    grid-row: 2;
    font-size: 10px;
  }
  .mentor-nameplate:before,
  .mentor-nameplate:after {
    display: none;
  }
  .is-explore .mentor-caption .art-button {
    min-width: 180px;
    min-height: 37px;
    font-size: 14px;
  }
  .is-explore .mentor-dots {
    bottom: 55px;
  }
}
/* v6：每位先生独立全屏风景，PNG透明边距校准落脚点。 */
.student-shell.is-explore {
  background-image:
    var(--character-scene, url("/assets/v3/ui/stage-bg.png")),
    url("/assets/v3/ui/stage-bg.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
.is-explore .student-header {
  background: linear-gradient(#ffffff99, transparent);
}
.is-explore .greeting h1 {
  color: #234c61;
  text-shadow:
    0 1px 5px white,
    0 0 12px #fff;
}
.is-explore .mentor-side {
  height: 0;
  bottom: auto;
  z-index: 1;
}
.is-explore .mentor-side .figure {
  position: absolute;
  left: 50%;
  top: calc(-1 * var(--foot) * var(--figure-size));
  width: var(--figure-size);
  height: var(--figure-size);
  max-height: none;
  max-width: none;
  transform: translateX(-50%);
  object-fit: contain;
}
.is-explore .main-mentor {
  bottom: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  filter: none;
  z-index: 2;
  transform: translateX(-50%);
  transform-origin: 50% calc(var(--foot) * 100%);
}
.is-explore .main-mentor.breathing {
  animation: grounded-breath 4s ease-in-out infinite;
}
.character-contact {
  position: absolute;
  left: 50%;
  height: 12px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse,
    #4e483e42 0,
    #5d564926 34%,
    transparent 72%
  );
  filter: blur(2px);
  z-index: 1;
  pointer-events: none;
}
.is-explore .mentor-side:after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: calc(var(--figure-size) * 0.23);
  height: 8px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, #5e57442b, transparent 70%);
  z-index: -1;
}
.is-explore .mentor-dots {
  background: #fff9eccf;
  box-shadow: 0 1px 5px #6d624b08;
}
.is-explore .bottom-nav {
  background: linear-gradient(transparent, #fff7e8c9 46%, #fff9eae6);
}
@keyframes grounded-breath {
  0%,
  100% {
    transform: translateX(-50%) scaleY(1);
  }
  50% {
    transform: translateX(-50%) scaleY(1.009);
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-explore .main-mentor.breathing {
    animation: none;
  }
}
.lesson-reading {
  background-image:
    linear-gradient(#fffdf3dd, #fffdf3dd), var(--character-scene);
  background-size: cover;
  background-position: center;
}
.is-explore .mentor-side {
  opacity: 0.85;
}
/* v7：完整邻位人物与分层魔法转场 */
.is-explore .student-main {
  position: relative;
  z-index: 1;
}
.is-explore .student-header,
.is-explore .bottom-nav {
  position: relative;
  z-index: 6;
}
.scene-outgoing {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  pointer-events: none;
  will-change: transform, opacity, filter;
}
.magic-transition-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}
.is-explore .mentor-side {
  overflow: visible;
  opacity: 0.92;
}
.is-explore .mentor-side .figure {
  filter: drop-shadow(0 2px 2px #5e533710);
}
.is-explore .mentor-arena[aria-busy="true"] {
  cursor: progress;
}
.is-explore .mentor-arrow:disabled {
  opacity: 0.65;
  cursor: default;
}
.is-explore .mentor-dots button:disabled {
  opacity: 0.8;
}
.is-explore .mentor-caption {
  position: relative;
  z-index: 5;
}
@media (orientation: landscape) and (max-height: 500px) {
  .is-explore .mentor-caption {
    position: absolute;
  }
}
@media (prefers-reduced-motion: reduce) {
  .magic-transition-canvas {
    display: none;
  }
  .scene-outgoing {
    display: none;
  }
}
