:root {
  --cyan: #14c2c9;
  --text: #303236;
  --muted: #66696d;
  --line: #e9e9e9;
  --appbar-h: clamp(54px, 13.72vw, 72px);
  --tabbar-h: clamp(72px, 18.14vw, 104px);
  --safe-bottom: clamp(26px, 6.05vw, 38px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

button,
a {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.phone {
  position: relative;
  width: 100%;
  min-width: 320px;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #fff;
}

.appbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--appbar-h);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.appbar h1 {
  margin: 0;
  color: #666;
  font-size: clamp(22px, 5.58vw, 36px);
  line-height: 1;
  font-weight: 400;
}

.scan-button {
  position: absolute;
  right: clamp(18px, 5.12vw, 42px);
  top: 50%;
  width: clamp(32px, 7.91vw, 52px);
  height: clamp(32px, 7.91vw, 52px);
  transform: translateY(-50%);
}

.scan-button::before,
.scan-button::after,
.scan-button span::before,
.scan-button span::after {
  content: "";
  position: absolute;
  width: 30%;
  height: 30%;
  border-color: #606266;
  border-style: solid;
}

.scan-button::before {
  left: 0;
  top: 0;
  border-width: 2px 0 0 2px;
  border-radius: 2px 0 0 0;
}

.scan-button::after {
  right: 0;
  top: 0;
  border-width: 2px 2px 0 0;
  border-radius: 0 2px 0 0;
}

.scan-button span::before {
  left: 0;
  bottom: 0;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 2px;
}

.scan-button span::after {
  right: 0;
  bottom: 0;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 2px 0;
}

.content {
  height: calc(100dvh - var(--appbar-h) - var(--tabbar-h) - var(--safe-bottom));
  overflow-y: auto;
  padding: 0 clamp(14px, 3.72vw, 34px) clamp(30px, 8.37vw, 56px);
  scrollbar-width: none;
}

.content[hidden] {
  display: none;
}

.content::-webkit-scrollbar {
  display: none;
}

.section-title {
  margin: clamp(16px, 3.95vw, 32px) 0 clamp(22px, 6.28vw, 42px);
  color: #25272a;
  font-size: clamp(22px, 5.12vw, 34px);
  line-height: 1.55;
  font-weight: 600;
}

.degree-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(10px, 5.35vw, 48px);
  row-gap: clamp(24px, 6.74vw, 44px);
  padding: 0 clamp(2px, 2.79vw, 28px);
}

.degree-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  height: clamp(88px, 22.09vw, 138px);
  color: #303236;
  text-align: center;
}

.degree-item img {
  display: block;
  width: clamp(54px, 14.65vw, 92px);
  height: clamp(54px, 14.65vw, 92px);
  object-fit: contain;
}

.degree-item span {
  display: block;
  margin-top: clamp(6px, 1.63vw, 12px);
  font-size: clamp(15px, 4.19vw, 27px);
  line-height: 1.35;
  white-space: nowrap;
}

.exam-banner {
  display: block;
  width: 100%;
  height: clamp(76px, 18.84vw, 128px);
  margin-top: clamp(22px, 6.05vw, 42px);
  overflow: hidden;
  border-radius: clamp(5px, 1.16vw, 8px);
  background: #e7f7ff;
}

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

.service-title {
  margin-top: clamp(16px, 3.95vw, 32px);
  margin-bottom: clamp(20px, 5.35vw, 38px);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(11px, 3.02vw, 26px) clamp(9px, 2.56vw, 24px);
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  height: clamp(104px, 24.42vw, 160px);
  padding-top: clamp(13px, 3.26vw, 24px);
  border-radius: clamp(5px, 1.16vw, 9px);
  background: #eefbff;
  color: #303236;
  text-align: center;
}

.service-card img {
  display: block;
  width: clamp(58px, 15.12vw, 94px);
  height: clamp(58px, 15.12vw, 94px);
  object-fit: contain;
}

.service-card span {
  display: block;
  margin-top: clamp(7px, 1.86vw, 14px);
  font-size: clamp(14px, 3.95vw, 25px);
  line-height: 1.3;
  white-space: nowrap;
}

.mint-card {
  background: #e8fff9;
}

.warm-card {
  background: #fffdf8;
}

.mine-view {
  padding: 0;
  background: #efefef;
}

.mine-profile {
  display: flex;
  align-items: center;
  min-height: clamp(150px, 31.4vw, 226px);
  padding: clamp(24px, 6.05vw, 44px) clamp(17px, 4.19vw, 32px);
  border-bottom: clamp(11px, 2.79vw, 19px) solid #efefef;
  background: #fff;
}

.mine-avatar {
  flex: 0 0 auto;
  width: clamp(92px, 22.33vw, 150px);
  height: clamp(92px, 22.33vw, 150px);
  border-radius: 50%;
  background: #eefbfc;
}

.mine-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #88c4c7;
}

.mine-profile-main {
  min-width: 0;
  margin-left: clamp(22px, 5.58vw, 42px);
}

.mine-name-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.mine-name-row strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #4a4c50;
  font-size: clamp(34px, 8.84vw, 56px);
  line-height: 1.1;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: clamp(32px, 7.91vw, 48px);
  margin-left: clamp(10px, 2.56vw, 18px);
  padding: 0 clamp(9px, 2.33vw, 16px);
  background: #f0fbf9;
  color: #1fbfc3;
  font-size: clamp(20px, 5.12vw, 32px);
  line-height: 1;
  white-space: nowrap;
}

.verified-badge svg {
  width: clamp(19px, 4.88vw, 30px);
  height: clamp(19px, 4.88vw, 30px);
  margin-right: clamp(6px, 1.63vw, 11px);
  fill: currentColor;
}

.mine-phone {
  display: block;
  margin-top: clamp(12px, 3.02vw, 21px);
  color: #56595d;
  font-size: clamp(24px, 6.05vw, 38px);
  line-height: 1.2;
  text-align: left;
}

.mine-menu {
  background: #fff;
}

.mine-row {
  display: grid;
  grid-template-columns: clamp(58px, 14.42vw, 94px) minmax(0, 1fr) clamp(28px, 7.44vw, 48px);
  align-items: center;
  width: 100%;
  min-height: clamp(88px, 21.16vw, 132px);
  padding: 0 clamp(25px, 6.28vw, 44px) 0 clamp(17px, 4.19vw, 32px);
  border-bottom: 1px solid #dedede;
  background: #fff;
  color: #2e3033;
  text-align: left;
}

.mine-row span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(29px, 7.21vw, 44px);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mine-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 10.93vw, 68px);
  height: clamp(44px, 10.93vw, 68px);
  border-radius: 50%;
  color: #fff;
  font-size: clamp(27px, 6.98vw, 43px);
  line-height: 1;
  font-weight: 500;
}

.mine-row-icon svg {
  width: 68%;
  height: 68%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blue-icon {
  background: #1c8bf0;
}

.green-icon {
  background: #44c98f;
}

.orange-icon {
  background: #fb6b15;
}

.mine-chevron {
  justify-self: end;
  width: clamp(25px, 6.51vw, 40px);
  height: clamp(25px, 6.51vw, 40px);
  fill: none;
  stroke: #6b6f73;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logout-button {
  display: block;
  width: 100%;
  min-height: clamp(86px, 21.86vw, 136px);
  margin-top: clamp(11px, 2.79vw, 19px);
  background: #fff;
  color: #111;
  font-size: clamp(28px, 6.98vw, 43px);
  line-height: 1.2;
  text-align: center;
}

.news-view {
  padding-top: 0;
  padding-bottom: clamp(24px, 6.51vw, 48px);
}

.news-list {
  padding: 0;
}

.news-item {
  display: block;
  padding: clamp(16px, 3.5vw, 24px) 0 clamp(17px, 3.6vw, 25px);
  border-bottom: 1px solid #e3e8ee;
}

.news-title {
  margin: 0;
  color: #111827;
  font-size: clamp(21px, 5.12vw, 28px);
  line-height: 1.42;
  font-weight: 400;
}

.news-date {
  margin-top: clamp(10px, 1.9vw, 14px);
  color: #758195;
  font-size: clamp(16px, 3.95vw, 22px);
  line-height: 1.2;
}

.news-state {
  padding: 28px 0;
  color: #758195;
  font-size: 16px;
  text-align: center;
}

.degree-item:active,
.service-card:active,
.exam-banner:active,
.mine-phone:active,
.mine-row:active,
.logout-button:active,
.tab:active,
.scan-button:active {
  opacity: 0.72;
}

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: var(--tabbar-h);
  border-top: 1px solid #d9d9d9;
  background: rgba(255, 255, 255, 0.98);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: #676a6e;
}

.tab svg {
  width: clamp(28px, 7.21vw, 44px);
  height: clamp(28px, 7.21vw, 44px);
  margin-bottom: clamp(5px, 1.63vw, 10px);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab[data-view="home"].active svg {
  fill: currentColor;
  stroke-width: 0;
}

.tab[data-view="mine"] svg {
  fill: currentColor;
  stroke-width: 0;
}

.tab span {
  font-size: clamp(15px, 3.95vw, 24px);
  line-height: 1.2;
}

.tab.active {
  color: var(--cyan);
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: clamp(6px, 1.63vw, 10px);
  width: clamp(136px, 35.12vw, 220px);
  height: clamp(4px, 1.16vw, 7px);
  transform: translateX(-50%);
  border-radius: 999px;
  background: #7c7c7c;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: clamp(112px, 29.07vw, 160px);
  max-width: calc(100% - 48px);
  transform: translate(-50%, 10px);
  padding: 9px 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 13px;
  line-height: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

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

.scan-mask {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
}

.scan-mask[hidden] {
  display: none;
}

.scan-panel {
  width: 100%;
  min-width: 320px;
  height: 100%;
  background: #111;
  color: #fff;
}

.scan-panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: var(--appbar-h);
  background: rgba(0, 0, 0, 0.88);
}

.scan-panel-header strong {
  font-size: clamp(20px, 5.12vw, 32px);
  font-weight: 400;
}

.scan-close {
  position: absolute;
  right: clamp(16px, 4.19vw, 30px);
  top: 50%;
  width: clamp(34px, 8.37vw, 54px);
  height: clamp(34px, 8.37vw, 54px);
  transform: translateY(-50%);
  color: #fff;
}

.scan-close svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.scan-frame {
  position: relative;
  width: min(76vw, 520px);
  aspect-ratio: 1;
  margin: clamp(72px, 18.6vw, 128px) auto clamp(22px, 5.58vw, 40px);
  overflow: hidden;
  background: #222;
}

#scan-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-corners::before,
.scan-corners::after,
.scan-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scan-corners {
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.scan-corners::before,
.scan-corners::after {
  content: "";
  border: clamp(4px, 1.16vw, 7px) solid #18c5c8;
}

.scan-corners::before {
  right: auto;
  bottom: auto;
  width: 23%;
  height: 23%;
  border-right: 0;
  border-bottom: 0;
}

.scan-corners::after {
  left: auto;
  top: auto;
  width: 23%;
  height: 23%;
  border-left: 0;
  border-top: 0;
}

.scan-status {
  width: min(78vw, 560px);
  min-height: 48px;
  margin: 0 auto clamp(20px, 5.12vw, 36px);
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 4.19vw, 24px);
  line-height: 1.5;
  text-align: center;
}

.scan-file-button {
  display: block;
  min-width: clamp(156px, 39.53vw, 240px);
  height: clamp(44px, 11.16vw, 64px);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  color: #fff;
  font-size: clamp(16px, 4.19vw, 24px);
}

@media (max-width: 374px) {
  .degree-grid {
    column-gap: 8px;
    padding: 0;
  }

  .degree-item span {
    font-size: 14px;
  }

  .service-card span {
    font-size: 13px;
  }
}
