/* codex-redesign-compact-20260617 */
:root {
  --study-bg: #eef4f8;
  --study-surface: #ffffff;
  --study-soft: #f6fafb;
  --study-text: #172026;
  --study-muted: #66777f;
  --study-line: #d8e4e8;
  --study-primary: #0b7f83;
  --study-primary-dark: #075f65;
  --study-accent: #f0a02e;
  --study-success: #16875a;
  --study-danger: #b42318;
  --study-shadow: 0 14px 32px rgba(14, 45, 54, 0.12);
  --study-shadow-soft: 0 8px 20px rgba(14, 45, 54, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--study-bg);
}

.student-app {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(11, 127, 131, 0.11), rgba(238, 244, 248, 0) 280px),
    var(--study-bg) !important;
  color: var(--study-text);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

.wx-phone {
  position: relative;
  width: min(100vw, 430px) !important;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: transparent !important;
}

.wx-main {
  min-height: calc(100vh - 64px);
  padding-bottom: 78px !important;
}

.wx-page {
  min-height: calc(100vh - 78px);
}

.hidden {
  display: none !important;
}

.wx-blue-head {
  position: relative;
  min-height: 154px !important;
  padding: 28px 20px 24px !important;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0b7f83 0%, #075f65 58%, #184e5d 100%) !important;
  border-radius: 0 0 22px 22px !important;
  box-shadow: 0 20px 36px rgba(7, 95, 101, 0.22);
}

.wx-blue-head::before {
  content: "";
  position: absolute;
  inset: auto -42px -62px auto;
  width: 168px;
  height: 168px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.wx-blue-head::after {
  content: "";
  position: absolute;
  inset: 24px auto auto -34px;
  width: 112px;
  height: 112px;
  border: 18px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
}

.home-head,
.mine-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.wx-title {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  max-width: calc(100% - 86px);
}

.wx-title strong {
  display: block;
  margin: 0;
  font-size: 24px !important;
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: 0;
}

.wx-title span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1;
}

.wx-mine-shortcut {
  position: relative;
  z-index: 2;
  margin-left: auto;
  min-width: 58px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.wx-capsule {
  position: absolute;
  top: 16px;
  right: 14px;
  display: none !important;
  color: transparent !important;
  font-size: 0 !important;
}

.home-action-grid {
  position: relative;
  z-index: 3;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: -42px 16px 20px !important;
}

.study-tile {
  display: grid;
  min-height: 104px !important;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 15px 8px 13px !important;
  border: 1px solid rgba(216, 226, 231, 0.84) !important;
  border-radius: 8px !important;
  background: var(--study-surface) !important;
  color: var(--study-text) !important;
  box-shadow: var(--study-shadow-soft) !important;
}

.study-tile strong {
  font-size: 15px !important;
  line-height: 1.2;
  font-weight: 900;
  text-align: center;
}

.play-icon,
.refresh-icon {
  position: relative;
  display: grid;
  width: 38px !important;
  height: 38px !important;
  place-items: center;
  border-radius: 8px !important;
  background: #e4f5f4 !important;
  color: var(--study-primary) !important;
  font-size: 0 !important;
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid currentColor;
}

.refresh-icon::before {
  content: "";
  width: 19px;
  height: 19px;
  border: 3px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-35deg);
}

.refresh-icon::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 8px;
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: rotate(35deg);
}

.study-tile.orange .refresh-icon,
.study-tile.orange .play-icon {
  background: #fff3dd !important;
  color: #b76c09 !important;
}

.study-tile.green .play-icon,
.study-tile.green .refresh-icon {
  background: #e6f6ee !important;
  color: var(--study-success) !important;
}

.bank-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 18px 12px !important;
  padding: 0 !important;
}

.bank-title-row h2 {
  margin: 0;
  color: var(--study-text) !important;
  font-size: 20px !important;
  line-height: 1.2;
  font-weight: 900;
}

.bank-title-row span {
  max-width: 52%;
  color: var(--study-muted) !important;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.bank-empty-card,
.mine-info-card,
.mine-menu,
.quiz-top-card,
.question-card,
.result-panel,
.modal-card {
  border: 1px solid var(--study-line) !important;
  border-radius: 8px !important;
  background: var(--study-surface) !important;
  box-shadow: var(--study-shadow-soft) !important;
}

.bank-empty-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  margin: 0 16px 18px !important;
  padding: 18px !important;
  color: var(--study-text);
}

.empty-icon {
  flex: 0 0 auto;
  width: 48px !important;
  height: 48px !important;
  border-radius: 8px !important;
  background: #e4f5f4 !important;
}

.empty-icon::before {
  content: "";
  display: block;
  width: 22px;
  height: 26px;
  margin: 11px auto;
  border: 3px solid var(--study-primary);
  border-radius: 5px;
  border-top-right-radius: 12px;
}

.bank-empty-card h3 {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 900;
}

.bank-empty-card p {
  margin: 0;
  color: var(--study-muted);
  font-size: 13px;
  line-height: 1.55;
}

.activate-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px) !important;
  min-height: 88px !important;
  margin: 0 16px 18px !important;
  padding: 16px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, var(--study-primary), var(--study-primary-dark)) !important;
  color: #fff !important;
  text-align: left;
  box-shadow: 0 16px 28px rgba(11, 127, 131, 0.26) !important;
}

.plus-box {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
}

.activate-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 900;
}

.activate-banner em {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
  line-height: 1.4;
}

.activate-banner b,
.mine-menu b,
.settings-row span {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: auto;
  font-size: 0 !important;
}

.activate-banner b::before,
.mine-menu b::before,
.settings-row span::before {
  content: "";
  position: absolute;
  inset: 4px 5px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.8;
}

#practiceChoices {
  display: grid;
  gap: 12px;
  margin: 0 16px 18px;
}

.practice-card,
.wx-bank-card,
.small-bank {
  position: relative;
  display: flex;
  width: 100%;
  align-items: stretch;
  gap: 14px;
  padding: 16px !important;
  overflow: hidden;
  border: 1px solid var(--study-line) !important;
  border-radius: 8px !important;
  background: var(--study-surface) !important;
  color: var(--study-text);
  box-shadow: var(--study-shadow-soft) !important;
  text-align: left;
}

.practice-card.selected {
  border-color: rgba(11, 127, 131, 0.5) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f1fbfa 100%) !important;
}

.practice-card.disabled {
  opacity: 0.56;
}

.bank-line-icon {
  flex: 0 0 auto;
  width: 5px !important;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--study-primary), var(--study-accent)) !important;
}

.bank-card-main {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.bank-card-main h2,
.practice-card h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: var(--study-text);
  font-size: 17px !important;
  line-height: 1.3;
  font-weight: 900;
}

.bank-card-main h2 em {
  padding: 3px 7px;
  border-radius: 999px;
  background: #e4f5f4;
  color: var(--study-primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.bank-card-main p,
.practice-card p {
  margin: 0 !important;
  color: var(--study-muted) !important;
  font-size: 13px;
  line-height: 1.55;
}

.profile-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 900;
}

.profile-row h1 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 900;
}

.profile-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.mine-info-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: -42px 16px 14px !important;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
  z-index: 3;
}

.mine-info-card div {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 14px;
  background: #fff;
}

.mine-info-card span {
  color: var(--study-muted);
  font-size: 12px;
}

.mine-info-card strong {
  color: var(--study-text);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
}

.mine-menu {
  margin: 0 16px 14px !important;
  padding: 4px 0 !important;
  overflow: hidden;
}

.mine-menu button,
.settings-row {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--study-line);
  background: #fff;
  color: var(--study-text);
  text-align: left;
}

.mine-menu button:last-child,
.settings-row:last-child {
  border-bottom: 0;
}

.mine-menu strong,
.settings-row strong {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 850;
}

.menu-icon {
  position: relative;
  flex: 0 0 auto;
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: #e4f5f4 !important;
  color: var(--study-primary);
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
}

.menu-icon.pie::before {
  inset: 8px;
  border: 3px solid currentColor;
  border-radius: 50%;
  border-right-color: transparent;
}

.menu-icon.headset::before {
  left: 8px;
  top: 8px;
  width: 14px;
  height: 12px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.menu-icon.history::before {
  inset: 8px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.menu-icon.gear::before {
  inset: 8px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.logout-panel-btn {
  width: calc(100% - 32px);
  min-height: 48px;
  margin: 0 16px 20px;
  border: 1px solid #f0c9c5;
  border-radius: 8px;
  background: #fff;
  color: var(--study-danger);
  font-size: 15px;
  font-weight: 900;
}

.quiz-top-card,
.result-panel {
  margin: 14px 16px !important;
  padding: 16px !important;
}

.quiz-top-card h2,
.result-panel h2 {
  margin: 0 0 7px;
  color: var(--study-text);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.quiz-top-card p,
.note {
  margin: 0;
  color: var(--study-muted);
  font-size: 13px;
  line-height: 1.5;
}

#quizForm {
  margin: 0 16px 14px;
}

.question-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 16px !important;
}

.question-head {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e4f5f4;
  color: var(--study-primary);
  font-size: 12px;
  font-weight: 900;
}

.question-content {
  color: var(--study-text);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 850;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  min-height: 50px;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--study-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--study-text);
  font-size: 15px;
  line-height: 1.55;
}

.option:has(input:checked) {
  border-color: var(--study-primary) !important;
  background: #e4f5f4 !important;
}

.option input {
  margin-top: 3px;
  accent-color: var(--study-primary);
}

.quiz-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  min-height: 46px;
  border: 0;
  border-radius: 8px !important;
  background: linear-gradient(135deg, var(--study-primary), var(--study-primary-dark)) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 900 !important;
  letter-spacing: 0;
}

.btn.full {
  display: block;
  width: calc(100% - 32px);
  margin: 10px 16px;
}

.btn.ghost,
.btn.secondary {
  border: 1px solid var(--study-line) !important;
  background: #fff !important;
  color: var(--study-text) !important;
}

.btn.blue {
  background: linear-gradient(135deg, var(--study-primary), var(--study-primary-dark)) !important;
}

.analysis-box,
.instant-answer,
.record-empty {
  border-radius: 8px !important;
  background: var(--study-soft) !important;
  color: var(--study-text);
  border: 1px solid var(--study-line);
}

.result-score {
  margin: 10px 0;
  color: var(--study-primary);
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
}

#answerReview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-item {
  border: 1px solid var(--study-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 24, 28, 0.38);
}

.modal-card {
  width: min(430px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  padding: 22px !important;
}

.modal-card h2 {
  margin: 0 0 18px;
  color: var(--study-text);
  font-size: 20px;
  text-align: left;
  font-weight: 900;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--study-muted);
  font-size: 13px;
  font-weight: 800;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--study-line);
  border-radius: 8px;
  color: var(--study-text);
  font-size: 15px;
  outline: none;
}

.field input:focus {
  border-color: var(--study-primary);
  box-shadow: 0 0 0 3px rgba(11, 127, 131, 0.12);
}

.button-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.status {
  margin-top: 12px;
  color: var(--study-muted);
  font-size: 13px;
  line-height: 1.5;
}

.record-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.record-modal-head h2 {
  margin: 0;
}

.history-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--study-line);
  border-radius: 8px;
  background: #fff;
  color: var(--study-muted);
  font-size: 22px;
  line-height: 1;
}

.student-record-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.student-record-summary div {
  display: grid;
  gap: 4px;
  min-height: 66px;
  place-items: center;
  border: 1px solid var(--study-line);
  border-radius: 8px;
  background: var(--study-soft);
}

.student-record-summary strong {
  color: var(--study-primary);
  font-size: 18px;
  font-weight: 900;
}

.student-record-summary span {
  color: var(--study-muted);
  font-size: 12px;
}

.student-record-list {
  display: grid;
  gap: 8px;
}

.student-record-item {
  border: 1px solid var(--study-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.wx-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100vw, 430px) !important;
  height: 64px !important;
  transform: translateX(-50%);
  border-top: 1px solid rgba(216, 226, 231, 0.86) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(16px);
}

.wx-tabbar button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #7b8a91;
  font-size: 12px;
  font-weight: 900;
}

.wx-tabbar button.active {
  color: var(--study-primary) !important;
}

.tab-home,
.tab-mine {
  position: relative;
  width: 20px !important;
  height: 20px !important;
}

.tab-home::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 16px;
  height: 11px;
  background: currentColor;
  clip-path: polygon(0 45%, 50% 0, 100% 45%, 88% 45%, 88% 100%, 12% 100%, 12% 45%);
}

.tab-mine::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 10px 0 4px currentColor;
}

.student-app > main + text,
.student-app .wx-capsule,
.student-app .wx-capsule * {
  color: transparent !important;
  font-size: 0 !important;
}

@media (max-width: 360px) {
  .wx-blue-head {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .home-action-grid {
    gap: 8px !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  .study-tile {
    min-height: 96px !important;
    padding: 12px 6px !important;
  }

  .study-tile strong {
    font-size: 13px !important;
  }

  .bank-title-row,
  #practiceChoices,
  .bank-empty-card,
  .activate-banner,
  .mine-info-card,
  .mine-menu,
  .quiz-top-card,
  .result-panel,
  #quizForm {
    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  .btn.full {
    width: calc(100% - 24px);
    margin-left: 12px;
    margin-right: 12px;
  }
}
