:root {
  --orange: #ff5a1f;
  --orange-pressed: #e94d16;
  --orange-light: #fff4ef;
  --orange-softer: #fff8f5;
  --orange-border: #f6b28f;
  --text: #222222;
  --regular: #555555;
  --muted: #999999;
  --disabled: #c7c7c7;
  --page: #f7f7f8;
  --card: #ffffff;
  --border: #eeeeee;
  --divider: #f2f2f2;
  --success: #1fc48d;
  --success-light: #ecfdf5;
  --error: #f05252;
  --error-light: #fff1f2;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #eef0f3;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgb(255 90 31 / 45%);
  outline-offset: 2px;
}

.demo-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone {
  position: relative;
  width: min(390px, 100vw);
  height: min(844px, calc(100vh - 48px));
  min-height: 680px;
  overflow: hidden;
  background: var(--page);
  border: 1px solid #dddddf;
  border-radius: 28px;
  box-shadow: 0 24px 72px rgb(25 30 38 / 18%);
}

#app,
.screen {
  width: 100%;
  height: 100%;
}

.screen {
  position: relative;
  overflow: hidden;
  background: var(--page);
}

.page-screen {
  display: flex;
  flex-direction: column;
}

.page-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.page-scroll::-webkit-scrollbar,
.home-scroll::-webkit-scrollbar {
  display: none;
}

.status-bar {
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 22px 0;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
}

.status-bar strong {
  font-size: 14px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}

.status-icons b {
  padding: 1px 4px;
  border-radius: 4px;
  background: #34c759;
  color: #ffffff;
  font-size: 10px;
}

.nav-bar {
  flex: 0 0 52px;
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--divider);
}

.nav-bar h1 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}

.nav-icon,
.nav-action {
  height: 44px;
  background: transparent;
}

.nav-action {
  padding: 0 12px 0 0;
  text-align: right;
  font-size: 14px;
  white-space: nowrap;
}

.nav-spacer {
  display: block;
}

.back-icon {
  position: relative;
}

.back-icon::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 14px;
  width: 13px;
  height: 13px;
  border-left: 2px solid #222222;
  border-bottom: 2px solid #222222;
  transform: rotate(45deg);
}

/* Demo scenario landing */
.scenario-screen {
  background: #f7f7f8;
}

.scenario-screen .status-bar {
  background: var(--orange);
  color: #ffffff;
}

.scenario-hero {
  position: relative;
  flex: 0 0 168px;
  overflow: hidden;
  padding: 25px 22px 30px;
  background: var(--orange);
  color: #ffffff;
}

.scenario-hero::after {
  content: "";
  position: absolute;
  right: -62px;
  top: -88px;
  width: 190px;
  height: 190px;
  border: 34px solid rgb(255 255 255 / 10%);
  border-radius: 50%;
}

.scenario-brand {
  position: relative;
  z-index: 1;
  color: rgb(255 255 255 / 78%);
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
}

.scenario-hero h1 {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 38px;
}

.scenario-hero p {
  position: relative;
  z-index: 1;
  margin: 7px 0 0;
  color: rgb(255 255 255 / 84%);
  font-size: 12px;
  line-height: 19px;
}

.scenario-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 22px 18px 16px;
}

.scenario-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scenario-section-heading span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 600;
}

.scenario-section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.scenario-list {
  display: grid;
  gap: 13px;
  margin-top: 13px;
}

.scenario-entry {
  width: 100%;
  min-height: 170px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  gap: 14px 13px;
  padding: 17px;
  border: 1px solid #eaebed;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 8px 28px rgb(31 45 61 / 5%);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.scenario-entry:active {
  border-color: #f4aa89;
  box-shadow: 0 5px 16px rgb(31 45 61 / 7%);
  transform: translateY(1px);
}

.scenario-entry-icon {
  display: block;
  grid-row: 1;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.scenario-entry-unpaid .scenario-entry-icon {
  display: grid;
  place-items: center;
  background: var(--orange-light);
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
}

.scenario-entry-paid .scenario-entry-icon {
  background: transparent;
}

.scenario-entry-copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.scenario-entry-copy small,
.scenario-entry-copy strong,
.scenario-entry-copy p {
  display: block;
}

.scenario-entry-copy small {
  width: fit-content;
  margin-bottom: 5px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #f3f4f5;
  color: #737b84;
  font-size: 9px;
  line-height: 14px;
}

.scenario-entry-copy strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.scenario-entry-copy p {
  margin: 4px 0 0;
  color: #747c85;
  font-size: 11px;
  line-height: 17px;
}

.scenario-entry-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  color: #92989f;
  font-size: 10px;
  line-height: 16px;
}

.scenario-entry-action {
  grid-column: 1 / -1;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  margin-top: -2px;
  padding: 0 13px;
  border: 1px solid #e6e8ea;
  border-radius: 8px;
  color: #4f5862;
  font-size: 12px;
  font-weight: 500;
}

.scenario-entry-action.primary {
  border-color: #ffd5c5;
  background: var(--orange-light);
  color: var(--orange-pressed);
}

.scenario-entry-action i {
  color: #a9aeb3;
  font-size: 15px;
  font-style: normal;
}

.scenario-entry-action.primary i {
  color: var(--orange);
}

.scenario-footnote {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 20px calc(14px + env(safe-area-inset-bottom));
  color: #b0b0b3;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.close-icon {
  position: relative;
}

.close-icon::before,
.close-icon::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 21px;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #222222;
}

.close-icon::before {
  transform: rotate(45deg);
}

.close-icon::after {
  transform: rotate(-45deg);
}

.primary-button,
.outline-button {
  min-height: 44px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}

.primary-button {
  background: var(--orange);
  color: #ffffff;
}

.fixed-action .quota-limit-button {
  background: var(--disabled);
  box-shadow: none;
  cursor: not-allowed;
}

.primary-button:active {
  background: var(--orange-pressed);
}

.outline-button {
  border: 1px solid var(--orange);
  background: #ffffff;
  color: var(--orange);
}

/* High-fidelity question-bank home */
.home-screen {
  background: #ffffff;
}

.home-scroll {
  height: 100%;
  overflow-y: auto;
  padding-bottom: 72px;
  scrollbar-width: none;
}

.home-art {
  position: relative;
  width: 100%;
}

.home-art img {
  display: block;
  width: 100%;
  height: auto;
}

.home-hotspot {
  position: absolute;
  left: 75%;
  top: 37.6%;
  width: 25%;
  height: 6.2%;
  border-radius: 8px;
  background: transparent;
}

.home-hotspot:focus-visible {
  outline: 3px solid rgb(255 90 31 / 40%);
  outline-offset: -3px;
}

.app-tabs {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--divider);
  background: rgb(255 255 255 / 97%);
}

.app-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  color: #9b9b9b;
}

.app-tabs span {
  height: 24px;
  font-size: 24px;
  line-height: 22px;
}

.app-tabs strong {
  font-size: 11px;
  font-weight: 400;
}

.app-tabs .active {
  color: var(--orange);
}

/* VIP entitlement empty state */
.vip-locked-screen {
  background: #f7f7f8;
}

.vip-locked-scroll {
  padding: 58px 16px 32px;
}

.vip-empty-state {
  max-width: 310px;
  margin: 0 auto;
  text-align: center;
}

.vip-lock-illustration {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: #fff0e9;
}

.vip-lock-body {
  position: absolute;
  left: 29px;
  top: 43px;
  width: 38px;
  height: 31px;
  border-radius: 7px;
  background: var(--orange);
  box-shadow: 0 7px 16px rgb(255 90 31 / 18%);
}

.vip-lock-body::before {
  content: "";
  position: absolute;
  left: 9px;
  top: -20px;
  width: 20px;
  height: 24px;
  border: 4px solid var(--orange);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.vip-lock-body::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 11px;
  width: 4px;
  height: 9px;
  border-radius: 3px;
  background: #ffffff;
}

.vip-lock-crown {
  position: absolute;
  z-index: 2;
  right: 2px;
  top: 7px;
  min-width: 35px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #2f2a28;
  color: #f5c96f;
  font-size: 10px;
  font-weight: 600;
  line-height: 20px;
}

.vip-empty-state h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}

.vip-empty-state p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 21px;
}

.vip-product-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 46px;
  padding: 14px;
  border: 1px solid #f1e8e3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgb(31 24 21 / 5%);
}

.vip-product-badge,
.vip-sheet-mark {
  flex: 0 0 44px;
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.vip-product-copy {
  min-width: 0;
  flex: 1;
}

.vip-product-copy strong,
.vip-product-copy span,
.vip-product-copy small {
  display: block;
}

.vip-product-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
}

.vip-product-copy span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--regular);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vip-product-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
}

.vip-product-link {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 11px;
  border-radius: 16px;
  background: var(--orange-light);
  color: var(--orange);
  font-size: 12px;
}

.vip-product-overlay {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.vip-product-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgb(23 23 25 / 48%);
}

.vip-product-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #ffffff;
  box-shadow: 0 -16px 36px rgb(0 0 0 / 10%);
}

.vip-sheet-handle {
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 20px;
  border-radius: 2px;
  background: #dedee1;
}

.vip-sheet-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vip-sheet-title-row h2,
.vip-sheet-title-row p {
  margin: 0;
}

.vip-sheet-title-row h2 {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.vip-sheet-title-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.vip-benefit-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.vip-benefit-card {
  min-width: 0;
  padding: 13px 12px 12px;
  border: 1px solid #dedee2;
  border-radius: 8px;
  background: #ffffff;
}

.vip-benefit-card.vip-card {
  border: 2px solid var(--orange);
  padding: 12px 11px 11px;
  background: #fffaf7;
}

.vip-benefit-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.vip-benefit-card-title strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.vip-benefit-card-title span {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 8px;
  background: #f2f2f3;
  color: var(--muted);
  font-size: 9px;
  line-height: 15px;
}

.vip-card .vip-benefit-card-title strong {
  color: var(--orange);
}

.vip-card .vip-benefit-card-title span {
  background: #ffe4d9;
  color: var(--orange);
}

.vip-benefit-card ul {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.vip-benefit-card li {
  position: relative;
  padding-left: 16px;
  color: var(--regular);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.vip-benefit-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #b1b1b5;
  font-weight: 600;
}

.vip-card li::before {
  color: var(--orange);
}

.vip-purchase-button {
  width: 100%;
}

/* Order confirmation and cashier */
.payment-screen,
.cashier-screen {
  background: #f5f5f5;
}

.transaction-nav {
  flex-basis: 60px;
  border-bottom: 0;
}

.transaction-nav .back-icon {
  width: 44px;
  margin-left: 14px;
  border: 1px solid #f3f3f3;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 6%);
}

.transaction-nav .back-icon::before {
  left: 17px;
  top: 14px;
}

.payment-scroll {
  padding: 10px 10px 30px;
}

.payment-card,
.cashier-amount-card,
.cashier-method-card {
  border-radius: 8px;
  background: #ffffff;
}

.payment-card {
  padding: 14px 20px 20px;
}

.payment-order-card {
  margin-top: 10px;
}

.transaction-section-title {
  position: relative;
  margin: 0;
  padding-left: 12px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.transaction-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 4px;
  height: 18px;
  border-radius: 1px;
  background: var(--orange);
}

.payment-product-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
}

.payment-product-row span {
  min-width: 0;
  flex: 1;
}

.payment-product-row strong,
.payment-order-list dd {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.payment-order-list {
  margin: 0;
  padding-top: 12px;
}

.payment-order-list div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 14px;
}

.payment-order-list dt,
.payment-order-list dd {
  margin: 0;
}

.payment-order-list .payment-order-total {
  justify-content: flex-end;
  gap: 2px;
  padding-top: 10px;
}

.payment-order-list .payment-order-total dd {
  color: var(--orange);
  font-size: 17px;
}

.payment-agreement-bar {
  flex: 0 0 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 18px;
  background: #fff0e8;
  color: var(--regular);
  font-size: 12px;
  line-height: 18px;
  text-align: left;
}

.payment-agreement-bar em {
  color: var(--orange);
  font-style: normal;
}

.payment-agreement-check {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid #d5d5d8;
  border-radius: 50%;
  background: #ffffff;
  color: #ffffff;
  font-size: 13px;
}

.payment-agreement-bar.checked .payment-agreement-check {
  border-color: var(--orange);
  background: var(--orange);
}

.payment-footer {
  flex: 0 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #ffffff;
}

.payment-footer-price {
  min-width: 120px;
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--text);
}

.payment-footer-price span {
  font-size: 15px;
}

.payment-footer-price strong {
  color: var(--orange);
  font-size: 18px;
  font-weight: 500;
}

.payment-confirm-button {
  flex: 0 0 160px;
  height: 48px;
  border-radius: 24px;
}

.payment-confirm-button.disabled {
  background: #d2d2d4;
}

.cashier-scroll {
  padding: 10px 10px 108px;
}

.cashier-amount-card {
  min-height: 184px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 20px;
}

.cashier-amount {
  display: flex;
  align-items: baseline;
  color: var(--text);
}

.cashier-amount small {
  margin-right: 6px;
  font-size: 14px;
}

.cashier-amount strong {
  font-size: 34px;
  font-weight: 500;
  line-height: 44px;
}

.cashier-countdown {
  margin-top: 16px;
  padding: 6px 20px;
  border-radius: 18px;
  background: #f4f4f5;
  color: var(--regular);
  font-size: 13px;
  line-height: 20px;
}

.cashier-amount-card p {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.cashier-method-card {
  margin-top: 10px;
  padding: 14px 10px 0;
}

.cashier-method-card .transaction-section-title {
  margin: 0 10px 6px;
}

.cashier-method-row {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--divider);
  background: transparent;
  text-align: left;
}

.cashier-method-row:first-child {
  border-top: 0;
}

.cashier-method-row strong {
  min-width: 0;
  flex: 1;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.cashier-method-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
}

.cashier-method-icon.wechat {
  background: #24c53d;
}

.cashier-method-icon.alipay {
  background: #2f7df4;
}

.cashier-method-icon.coin {
  background: var(--orange);
}

.cashier-radio {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid #a9aaad;
  border-radius: 50%;
  color: #ffffff;
  font-size: 12px;
}

.cashier-radio.selected {
  border-color: var(--orange);
  background: var(--orange);
}

.cashier-recharge {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--orange);
  color: #ffffff;
  font-size: 12px;
}

.cashier-balance {
  flex: 0 0 auto;
  color: var(--orange);
  font-size: 12px;
}

.cashier-method-row.disabled strong {
  color: var(--regular);
}

.cashier-footer {
  flex: 0 0 auto;
  padding: 12px 38px calc(16px + env(safe-area-inset-bottom));
  background: #ffffff;
}

.cashier-pay-button {
  width: 100%;
  height: 48px;
  border-radius: 24px;
}

.app-toast {
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: 84px;
  max-width: calc(100% - 48px);
  padding: 10px 16px;
  border-radius: 8px;
  background: rgb(31 31 33 / 92%);
  color: #ffffff;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}

/* Configuration */
.config-screen {
  background: #f8f7fa;
}

.bank-tabs {
  flex: 0 0 46px;
  display: flex;
  gap: 30px;
  align-items: flex-end;
  padding: 0 16px;
  background: #ffffff;
}

.bank-tabs button {
  position: relative;
  height: 46px;
  padding: 0 0 11px;
  background: transparent;
  color: #aaaaaf;
  font-size: 15px;
  font-weight: 600;
}

.bank-tabs .active {
  color: var(--text);
}

.bank-tabs .active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--orange);
  transform: translateX(-50%);
}

.bank-tabs button.locked {
  padding-right: 22px;
}

.bank-tabs button.locked i {
  position: absolute;
  right: 0;
  top: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  background: #fff2e7;
  color: #c98024;
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
  line-height: 13px;
}

.config-scroll {
  padding: 12px 12px 88px;
}

.free-trial-banner {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 11px 10px;
  border: 1px solid #ffe0cd;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff8f2, #fffdfb);
}

.free-trial-banner.exhausted {
  border-color: #f0e2d8;
  background: #fffaf7;
}

.free-trial-mark {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.free-trial-copy {
  min-width: 0;
}

.free-trial-copy strong,
.free-trial-copy span {
  display: block;
}

.free-trial-copy strong {
  color: #333136;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.free-trial-copy span {
  overflow: hidden;
  color: #99969b;
  font-size: 10px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.free-trial-banner > button {
  padding: 5px 7px;
  border-radius: 4px;
  background: var(--orange);
  color: #ffffff;
  font-size: 10px;
  white-space: nowrap;
}

.filter-panel {
  padding: 4px 12px 8px;
  border-radius: 8px;
  background: #ffffff;
}

.filter-section {
  padding: 15px 0 2px;
}

.filter-section + .filter-section {
  margin-top: 4px;
}

.name-section label,
.filter-heading h2 {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.name-section label {
  display: block;
  margin-bottom: 10px;
}

.name-section input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #f8f7fa;
  color: var(--text);
  font-size: 14px;
}

.name-section input.default-name {
  color: #a9a9af;
}

.name-section input::placeholder {
  color: #c3c3c8;
}

.name-section p.error-text,
.field-error {
  color: var(--error);
}

.filter-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin-bottom: 9px;
}

.filter-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.filter-heading h2 small {
  color: #b0b0b4;
  font-size: 11px;
  font-weight: 400;
}

.filter-heading button,
.expand-button {
  background: transparent;
  color: #a6a6aa;
  font-size: 11px;
}

.filter-heading .filter-link {
  color: var(--orange);
  font-size: 12px;
}

.mode-help-button {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #bdbdc3;
  border-radius: 50%;
  background: #ffffff;
  color: #8d8d93;
  font-size: 12px;
  font-weight: 600;
}

.mode-help-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mode-help-bubble {
  position: absolute;
  z-index: 12;
  left: -40px;
  bottom: calc(100% + 10px);
  width: 258px;
  padding: 10px 13px;
  border-radius: 8px;
  background: rgb(32 32 35 / 94%);
  color: #dedee2;
  box-shadow: 0 10px 26px rgb(0 0 0 / 22%);
}

.mode-help-bubble::after {
  content: "";
  position: absolute;
  left: 41px;
  bottom: -8px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: rgb(32 32 35 / 94%) transparent transparent;
}

.mode-help-bubble p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.mode-help-bubble u {
  text-underline-offset: 3px;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.chapter-chips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-chips {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chip {
  position: relative;
  min-width: 0;
  height: 34px;
  padding: 0 5px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #f8f7fa;
  color: #44444a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip.selected {
  border-color: var(--orange-border);
  background: var(--orange-softer);
  color: var(--orange);
}

.chip.locked {
  padding-right: 18px;
  color: #aaa8ad;
  background: #f7f6f8;
}

.chip.locked i {
  position: absolute;
  right: 3px;
  top: 3px;
  color: #c58a45;
  font-size: 7px;
  font-style: normal;
  font-weight: 500;
  line-height: 10px;
}

.expand-button {
  display: block;
  margin: 9px auto 0;
  padding: 4px 12px;
}

.count-chips {
  align-items: center;
}

.field-error {
  margin: 7px 0 0;
  font-size: 11px;
}

.fixed-action {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--divider);
  background: #ffffff;
}

.fixed-action .primary-button {
  width: 100%;
}

/* Chapter and section selectors */
.selector-screen {
  background: #ffffff;
}

.selector-nav .nav-action {
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
}

.selector-list {
  padding: 2px 0 84px;
  background: #ffffff;
}

.selector-row {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 8px 20px;
  background: #ffffff;
  text-align: left;
}

.chapter-tree-block {
  background: #ffffff;
}

.chapter-selector-row {
  min-height: 56px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.chapter-selector-row.partial-selected .selector-check {
  border-color: #ff7064;
}

.chapter-check-hit {
  flex: 0 0 auto;
  width: 28px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
}

.selector-row-main {
  min-width: 0;
  flex: 1;
  display: block;
  background: transparent;
  text-align: left;
}

.selector-row-main strong,
.selector-row-main small {
  display: block;
}

.selector-row-main strong {
  overflow: hidden;
  color: #1f2024;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-row-main small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.chapter-selector-row.selected .selector-row-main small {
  color: var(--orange);
}

.selector-chevron {
  flex: 0 0 32px;
  width: 32px;
  height: 38px;
  color: #b8b8bc;
  text-align: right;
  background: transparent;
  font-size: 22px;
  line-height: 38px;
}

.chapter-tree-block.expanded .selector-chevron {
  color: var(--orange);
}

.chapter-tree-block.locked .selector-check {
  border-color: #e2e2e6;
  background: #fafafa;
}

.chapter-tree-block.locked .selector-row-main strong {
  color: #a3a3a8;
  font-weight: 500;
}

.chapter-tree-block.locked .selector-row-main small {
  margin-top: 1px;
  color: #c09a6d;
}

.chapter-tree-block.locked .selector-chevron i {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 3px;
  background: #fff2e7;
  color: #c78029;
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
  line-height: 13px;
  vertical-align: middle;
}

.section-tree-list {
  padding: 0 0 2px;
}

.section-selector-row {
  min-height: 48px;
  gap: 10px;
  padding-left: 22px;
  padding-right: 22px;
}

.section-tree-list .section-selector-row {
  padding-left: 58px;
}

.section-selector-row > strong {
  flex: 1;
  overflow: hidden;
  color: var(--regular);
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-selector-row.selected > strong {
  color: #2f3035;
  font-weight: 500;
}

.selector-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1.5px solid #e3e5ec;
  border-radius: 6px;
  background: #ffffff;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.selector-check.checked {
  border-color: #ff7064;
  background: linear-gradient(180deg, #ff877d 0%, #ff5a1f 100%);
}

.selector-check.partial::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #ff7064;
}

.selector-action {
  z-index: 10;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}

.selector-action .primary-button {
  min-height: 48px;
  border-radius: 10px;
}

/* Loading */
.loading-overlay {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(20 20 22 / 48%);
}

.loading-dialog {
  width: 100%;
  padding: 30px 22px 26px;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 18px 48px rgb(0 0 0 / 18%);
}

.paper-loader {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border: 3px solid #ffe1d4;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.paper-loader span {
  position: absolute;
  inset: 17px;
  border-radius: 5px;
  background: var(--orange);
  animation: counter-spin 1.1s linear infinite;
}

.paper-loader span::before,
.paper-loader span::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}

.paper-loader span::before { top: 10px; }
.paper-loader span::after { top: 17px; }

.loading-dialog h2 {
  margin: 0;
  font-size: 19px;
}

.loading-dialog p {
  margin: 12px 0 14px;
  color: #55555b;
  font-size: 14px;
  line-height: 1.7;
}

.loading-dialog p strong {
  color: var(--orange);
}

.loading-line {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #f0f0f2;
}

.loading-line span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: 5px;
  background: var(--orange);
  animation: loading-progress 2.2s ease forwards;
}

.loading-dialog small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes counter-spin { to { transform: rotate(-360deg); } }
@keyframes loading-progress { to { width: 100%; } }

/* History */
.history-screen,
.history-list {
  background: #ffffff;
}

.history-nav .nav-action {
  color: var(--text);
}

.history-close {
  width: 80px;
  height: 44px;
  padding-left: 18px;
  background: transparent;
  text-align: left;
  font-size: 20px;
  font-weight: 400;
}

.history-nav.editing .nav-action {
  color: var(--text);
}

.history-list {
  padding: 4px 18px 24px;
}

.history-list.editing {
  padding-bottom: 90px;
}

.history-row {
  width: 100%;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--divider);
  background: #ffffff;
  text-align: left;
}

.history-row.editing {
  gap: 11px;
}

.history-row.selected {
  background: var(--orange-softer);
}

.history-checkbox {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #cfcfd3;
  border-radius: 50%;
  background: #ffffff;
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
}

.history-row.selected .history-checkbox {
  border-color: var(--orange);
  background: var(--orange);
}

.history-main {
  min-width: 0;
  flex: 1;
}

.history-main > strong {
  display: block;
  margin-bottom: 13px;
  font-size: 17px;
  line-height: 1.3;
}

.history-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.history-tags {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-main i {
  padding: 3px 6px;
  border: 1px solid #ffb39a;
  border-radius: 4px;
  color: var(--orange);
  font-size: 11px;
  font-style: normal;
}

.history-main .history-mode-tag {
  border-color: #e4e4e7;
  background: #f7f7f8;
  color: #77777c;
}

.history-main time {
  display: block;
  color: #a3a3a8;
  font-size: 12px;
  line-height: 18px;
}

.history-progress {
  flex: 0 0 54px;
  text-align: right;
}

.history-progress b {
  color: #8f8f94;
  font-size: 14px;
  font-weight: 400;
}

.history-delete-bar {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--divider);
  background: #ffffff;
}

.history-select-all {
  flex: 0 0 auto;
  min-width: 86px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 4px;
  background: transparent;
  color: var(--regular);
  font-size: 14px;
}

.history-select-all span {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid #cfcfd3;
  border-radius: 50%;
  background: #ffffff;
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
}

.history-select-all strong {
  font-weight: 400;
}

.history-select-all.selected {
  color: var(--orange);
}

.history-select-all.selected span {
  border-color: var(--orange);
  background: var(--orange);
}

.history-delete-button {
  flex: 0 0 116px;
  min-height: 38px;
  border-radius: 7px;
  background: var(--orange);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.history-delete-button:disabled {
  background: #dedee2;
  color: #a6a6aa;
  cursor: default;
}

.history-empty {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #b0b0b5;
}

.history-empty span {
  font-size: 38px;
}

.history-empty strong {
  font-size: 14px;
  font-weight: 400;
}

/* Practice */
.quiz-screen {
  background: #ffffff;
}

.practice-nav {
  flex: 0 0 54px;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  background: #ffffff;
}

.practice-paper-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finish-button,
.settings-button {
  height: 44px;
  padding-right: 16px;
  background: transparent;
  color: var(--orange);
  text-align: right;
  font-size: 14px;
}

.settings-button {
  padding-right: 18px;
  color: #222222;
  font-size: 22px;
  line-height: 44px;
}

.practice-progress {
  flex: 0 0 52px;
  background: #ffffff;
}

.practice-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 16px 10px;
}

.practice-progress strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-progress span {
  color: var(--regular);
  font-size: 13px;
}

.progress-track {
  height: 4px;
  background: #e9e9eb;
}

.progress-track i {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: 4px;
  background: var(--orange);
}

.quiz-scroll {
  --drag-x: 0px;
  overflow-x: hidden;
  padding-bottom: 78px;
  background: #ffffff;
  touch-action: pan-y;
}

.quiz-swipe-panel {
  min-height: 100%;
  transform: translate3d(var(--drag-x), 0, 0);
  transition:
    transform 260ms cubic-bezier(0.2, 0.82, 0.22, 1),
    opacity 260ms cubic-bezier(0.2, 0.82, 0.22, 1);
  will-change: transform, opacity;
}

.quiz-scroll.dragging .quiz-swipe-panel {
  transition: none;
}

.quiz-scroll.slide-out-left .quiz-swipe-panel {
  opacity: 0.24;
  transform: translate3d(-108%, 0, 0);
}

.quiz-scroll.slide-out-right .quiz-swipe-panel {
  opacity: 0.24;
  transform: translate3d(108%, 0, 0);
}

.quiz-scroll.slide-from-right .quiz-swipe-panel {
  animation: quiz-enter-from-right 280ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.quiz-scroll.slide-from-left .quiz-swipe-panel {
  animation: quiz-enter-from-left 280ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

@keyframes quiz-enter-from-right {
  from {
    opacity: 0.3;
    transform: translate3d(28%, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes quiz-enter-from-left {
  from {
    opacity: 0.3;
    transform: translate3d(-28%, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.question-block {
  padding: 20px 16px 24px;
}

.question-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 4px;
  background: var(--orange);
  color: #ffffff;
  font-size: 13px;
}

.question-block h1 {
  margin: 12px 0 18px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
}

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

.option {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.option > span {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  line-height: 1.45;
}

.option b {
  flex: 0 0 20px;
  font-size: 18px;
  font-weight: 500;
}

.option i {
  flex: 0 0 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 19px;
  font-style: normal;
  font-weight: 600;
}

.option.correct {
  border-color: var(--success);
  background: var(--success-light);
  color: var(--success);
}

.option.correct i {
  background: var(--success);
}

.option.wrong {
  border-color: var(--error);
  background: var(--error-light);
  color: var(--error);
}

.option.wrong i {
  background: var(--error);
}

.option.selected-neutral {
  border-color: var(--orange-border);
  background: var(--orange-softer);
  color: var(--orange);
}

.analysis-block {
  padding: 22px 16px 26px;
  border-top: 10px solid var(--page);
}

.answer-summary p {
  margin: 0 0 7px;
  font-size: 15px;
}

.answer-summary strong {
  margin-left: 5px;
  font-size: 17px;
}

.text-correct { color: var(--success); }
.text-wrong { color: var(--error); }

.data-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0 22px;
  padding: 15px 0;
  border-radius: 8px;
  background: #f3f3f4;
}

.data-card div {
  text-align: center;
}

.data-card div + div {
  border-left: 1px solid #d9d9dc;
}

.data-card strong,
.data-card span {
  display: block;
}

.data-card strong {
  font-size: 23px;
}

.data-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.analysis-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.analysis-title h2 {
  margin: 0;
  font-size: 17px;
}

.analysis-title button {
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.analysis-copy {
  margin: 11px 0 17px;
  color: #444449;
  font-size: 14px;
  line-height: 1.75;
}

.ai-button {
  width: 100%;
  min-height: 42px;
  border-radius: 7px;
  background: linear-gradient(105deg, #14b8d4 0%, #6d4aff 52%, #e444f2 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

.practice-toolbar {
  position: absolute;
  z-index: 7;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--divider);
  background: #ffffff;
}

.practice-toolbar.three-tools {
  grid-template-columns: repeat(3, 1fr);
}

.practice-toolbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  color: #25252b;
}

.practice-toolbar button.active,
.practice-toolbar .next-tool {
  color: var(--orange);
}

.tool-symbol {
  height: 25px;
  font-size: 25px;
  line-height: 23px;
}

.practice-toolbar strong {
  font-size: 11px;
  font-weight: 400;
}

.practice-toolbar .memorize-toggle {
  color: #8b8b91;
}

.practice-toolbar .memorize-toggle.active {
  color: var(--orange);
}

.eye-icon {
  position: relative;
  width: 25px;
  height: 16px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 50% / 62%;
}

.eye-icon i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

/* Practice confirmation dialogs */
.confirm-overlay {
  position: absolute;
  z-index: 45;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 32px;
  background: rgb(0 0 0 / 24%);
}

.confirm-dialog {
  width: 100%;
  max-width: 310px;
  overflow: hidden;
  border: 1px solid #d8d8dc;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgb(0 0 0 / 12%);
}

.confirm-dialog h2 {
  margin: 18px 16px 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.confirm-dialog p {
  min-height: 48px;
  margin: 0;
  padding: 0 20px 18px;
  color: #333338;
  text-align: center;
  font-size: 14px;
  line-height: 1.65;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #d8d8dc;
}

.confirm-actions button {
  min-height: 48px;
  background: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.confirm-actions button + button {
  border-left: 1px solid #d8d8dc;
}

.confirm-secondary {
  color: #9a9aa0;
}

.confirm-primary {
  color: var(--orange);
}

/* Answer card */
.sheet-overlay {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: rgb(20 20 22 / 48%);
}

.answer-sheet {
  width: 100%;
  max-height: 78%;
  overflow-y: auto;
  padding: 8px 18px calc(16px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #ffffff;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 7px;
  border-radius: 4px;
  background: #dddddf;
}

.answer-sheet header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
}

.answer-sheet header h2 {
  grid-column: 2;
  margin: 7px 0;
  text-align: center;
  font-size: 18px;
}

.answer-sheet header button {
  grid-column: 3;
  background: transparent;
  color: #88888d;
  font-size: 25px;
}

.sheet-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 8px 0 11px;
  color: var(--regular);
  font-size: 13px;
}

.sheet-stats strong {
  color: var(--orange);
}

.sheet-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 12px;
}

.sheet-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sheet-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #eeeeef;
}

.sheet-legend .legend-correct { background: var(--success); }
.sheet-legend .legend-wrong { background: var(--error); }
.sheet-legend .legend-done { background: var(--orange); }

.number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
  gap: 13px 18px;
  margin-bottom: 20px;
}

.number-grid button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f1f2;
  color: #77777c;
  font-size: 13px;
}

.number-grid button.correct {
  background: var(--success);
  color: #ffffff;
}

.number-grid button.wrong {
  background: var(--error);
  color: #ffffff;
}

.number-grid button.answered {
  background: var(--orange);
  color: #ffffff;
}

.number-grid button.current {
  box-shadow: 0 0 0 3px #ffd4c4;
}

.answer-sheet-footer {
  position: sticky;
  z-index: 2;
  bottom: calc(-16px - env(safe-area-inset-bottom));
  margin: 0 -18px calc(-16px - env(safe-area-inset-bottom));
  padding: 10px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--divider);
  background: #ffffff;
}

.answer-sheet-footer .primary-button {
  width: 100%;
}

/* Report */
.report-screen {
  background: #f4f4f5;
}

.report-scroll {
  padding-bottom: 104px;
}

.report-hero {
  position: relative;
  min-height: 306px;
  overflow: hidden;
  padding: 0 24px 116px;
  background:
    radial-gradient(circle at 93% 0%, rgb(255 255 255 / 15%) 0 106px, transparent 107px),
    radial-gradient(circle at -10% 95%, rgb(255 255 255 / 8%) 0 138px, transparent 139px),
    linear-gradient(155deg, #ff7638 0%, #ff6121 58%, #ff4f15 100%);
  color: #ffffff;
}

.report-hero .status-bar {
  height: 42px;
  padding: 13px 12px 0;
  background: transparent;
  color: #111111;
}

.report-nav {
  position: relative;
  z-index: 2;
  height: 54px;
  display: grid;
  grid-template-columns: 58px 1fr 96px;
  align-items: center;
  margin: 0 -8px;
}

.report-nav h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
  line-height: 30px;
  text-align: center;
}

.report-back-button {
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
}

.report-back-button::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 13px;
  width: 15px;
  height: 15px;
  border-left: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: rotate(45deg);
}

.redo-report-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
  font-weight: 400;
}

.redo-report-button span {
  font-size: 26px;
  line-height: 1;
}

.report-hero-copy {
  position: relative;
  z-index: 2;
  width: 72%;
  padding-top: 8px;
}

.report-hero-copy span {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 500;
}

.report-hero-copy h2 {
  margin: 0 0 14px;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.45;
}

.report-hero-copy p {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}

.report-hero-illustration {
  position: absolute;
  right: 26px;
  bottom: 62px;
  width: 104px;
  height: 96px;
}

.report-hero-illustration::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56px;
  height: 60px;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffb12f, #ff7b22);
}

.report-hero-illustration i {
  position: absolute;
  right: 22px;
  bottom: 0;
  width: 82px;
  height: 92px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(155deg, #fff7dd 0%, #ffd5a7 50%, #ff9f3b 100%);
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%, 0 28%);
}

.report-hero-illustration i::before,
.report-hero-illustration i::after {
  content: "";
  position: absolute;
  left: 36px;
  height: 8px;
  border-radius: 2px;
  background: rgb(255 255 255 / 86%);
}

.report-hero-illustration i::before {
  top: 30px;
  width: 56px;
}

.report-hero-illustration i::after {
  top: 50px;
  width: 43px;
}

.report-hero-illustration b {
  position: absolute;
  right: 10px;
  bottom: 20px;
  width: 12px;
  height: 58px;
  border-radius: 7px;
  background: rgb(255 255 255 / 64%);
  transform: rotate(42deg);
}

.report-hero-illustration b::before {
  content: "A";
  position: absolute;
  left: -43px;
  top: 12px;
  color: rgb(255 255 255 / 22%);
  font-size: 34px;
  font-weight: 500;
  transform: rotate(-42deg);
}

.report-card {
  margin: 12px;
  padding: 16px;
  border-radius: 8px;
  background: #ffffff;
}

.report-card.report-data-card {
  position: relative;
  margin: -86px 15px 14px;
  padding: 24px 16px 28px;
  border-radius: 8px;
}

.report-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.report-card header h2 {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  padding-left: 14px;
  color: #303036;
  font-size: 20px;
  font-weight: 500;
}

.report-card header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--orange);
}

.report-card header span {
  color: var(--orange);
  font-size: 12px;
}

.report-rings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 14px;
  padding: 8px 0 20px;
}

.report-ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.report-ring-item + .report-ring-item {
  border-left: 1px solid #e8e8ed;
}

.report-ring {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) var(--value), #f2f2f3 0);
}

.report-ring::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #ffffff;
}

.report-ring-content {
  position: absolute;
  z-index: 1;
  inset: 18px 8px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
}

.report-ring strong,
.report-ring span {
  display: block;
  max-width: 100%;
  white-space: nowrap;
}

.report-ring strong {
  color: var(--ring-color);
  font-size: 25px;
  font-weight: 500;
  line-height: 27px;
}

.report-ring strong small {
  margin-left: 1px;
  font-size: 13px;
  font-weight: 500;
}

.report-ring span {
  margin-top: 5px;
  color: var(--ring-color);
  font-size: 13px;
  line-height: 16px;
}

.report-ring-item p {
  margin: 12px 0 0;
  color: #999aa2;
  font-size: 12px;
  line-height: 18px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.result-stats div + div {
  border-left: 1px solid var(--divider);
}

.result-stats strong,
.result-stats span {
  display: block;
}

.result-stats strong {
  color: #111111;
  font-size: 23px;
  font-weight: 500;
  line-height: 29px;
}

.result-stats strong small {
  margin-left: 1px;
  font-size: 13px;
  font-weight: 500;
}

.result-stats span {
  margin-top: 2px;
  color: #a2a3ac;
  font-size: 13px;
}

.green strong { color: var(--success); }
.red strong { color: var(--error); }
.gray strong { color: #8f8f94; }

.result-strip {
  display: flex;
  height: 7px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 7px;
  background: #eeeeef;
}

.result-strip i.green { background: var(--success); }
.result-strip i.red { background: var(--error); }
.result-strip i.gray { background: #b8b8bc; }

.report-answer-card {
  margin-bottom: 18px;
}

.report-upgrade-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 13px 14px;
  border: 1px solid #ffe0cd;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff7f1, #ffffff);
}

.report-upgrade-banner div {
  min-width: 0;
}

.report-upgrade-banner strong,
.report-upgrade-banner span {
  display: block;
}

.report-upgrade-banner strong {
  color: #37343a;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.report-upgrade-banner span {
  overflow: hidden;
  color: #98969d;
  font-size: 10px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-upgrade-banner button {
  padding: 7px 10px;
  border: 1px solid var(--orange-border);
  border-radius: 5px;
  background: #fff8f4;
  color: var(--orange);
  font-size: 11px;
  white-space: nowrap;
}

.report-answer-card header {
  gap: 12px;
}

.report-card-legend {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  font-size: 11px;
}

.report-card header .report-card-legend span {
  color: var(--muted);
}

.report-number-grid {
  margin-bottom: 0;
}

.report-actions {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: .88fr 1.36fr;
  gap: 24px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--divider);
  background: #ffffff;
}

.report-actions button {
  min-height: 46px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
}

.report-actions .primary-button {
  border: 1.5px solid var(--orange);
  background: var(--orange);
  color: #ffffff;
}

.report-actions .outline-button {
  border: 1px solid #e4e4e8;
  background: #ffffff;
  color: #303036;
}

.report-actions .text-button {
  grid-column: 1 / -1;
  min-height: 24px;
  background: transparent;
  color: var(--orange);
  font-size: 12px;
}

.report-actions button:disabled {
  border-color: #eeeeee;
  background: #f4f4f5;
  color: #b8b8bc;
}

@media (max-width: 480px) {
  body {
    background: #ffffff;
  }

  .demo-stage {
    display: block;
    min-height: 100dvh;
    padding: 0;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .chip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chapter-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
