:root {
  color-scheme: light;
  --bg: #f4f7f2;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-2: rgba(245, 247, 241, 0.74);
  --line: rgba(161, 171, 160, 0.34);
  --text: #172126;
  --muted: #667078;
  --green: #0f5a4a;
  --green-2: #177662;
  --coral: #c44d3e;
  --gold: #b99422;
  --blue: #2f668f;
  --ok: #167451;
  --bad: #b64035;
  --shadow: 0 22px 60px rgba(25, 34, 39, 0.12);
  --mobile-bottom-bar-height: 132px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 247, 242, 0.7) 34%, rgba(232, 238, 229, 0.86)),
    linear-gradient(135deg, rgba(15, 90, 74, 0.1), rgba(185, 148, 34, 0.08) 52%, rgba(47, 102, 143, 0.08)),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.06) 35%, rgba(255, 255, 255, 0.34)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(244, 247, 242, 0));
}

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

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  border-top: 1px solid rgba(217, 212, 200, 0.9);
  background: rgba(246, 245, 239, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.sidebar,
.workspace {
  min-width: 0;
}

.sidebar {
  display: grid;
  align-self: start;
  gap: 14px;
}

.panel,
.question-card,
.result-card,
.search-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.workspace {
  display: grid;
  gap: 14px;
  align-content: start;
  align-items: start;
}

.mode-tabs {
  align-self: start;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
}

.tab-button,
.soft-button,
.solid-button,
.danger-button,
.ghost-button,
.chip,
.option-button,
.number-button {
  min-height: 40px;
  border-radius: 14px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.tab-button:active,
.soft-button:active,
.solid-button:active,
.danger-button:active,
.ghost-button:active,
.chip:active,
.option-button:active,
.number-button:active {
  transform: translateY(1px);
}

.tab-button {
  border: 1px solid rgba(154, 164, 153, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(245, 247, 241, 0.58)),
    rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 22px rgba(34, 43, 48, 0.08);
}

.tab-button.active {
  border-color: var(--green);
  background:
    linear-gradient(180deg, rgba(27, 127, 102, 0.96), rgba(15, 90, 74, 0.98)),
    var(--green);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 28px rgba(15, 90, 74, 0.22);
}

.solid-button {
  padding: 0 14px;
  background:
    linear-gradient(180deg, rgba(43, 135, 112, 0.96), rgba(15, 90, 74, 0.96)),
    var(--green);
  color: #fff;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 26px rgba(15, 90, 74, 0.18);
}

.soft-button {
  padding: 0 14px;
  border: 1px solid rgba(154, 164, 153, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(243, 245, 238, 0.62)),
    rgba(255, 255, 255, 0.6);
  color: var(--text);
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 20px rgba(34, 43, 48, 0.07);
}

.soft-button.active {
  border-color: var(--green);
  background: rgba(29, 79, 69, 0.1);
  color: var(--green);
}

.ghost-button {
  padding: 0 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--green);
  font-weight: 800;
}

.danger-button {
  padding: 0 14px;
  background: #fff1ed;
  color: var(--bad);
  font-weight: 800;
}

.solid-button:disabled,
.soft-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
}

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

.stat {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 10px;
}

.stat strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-input,
.note-box,
.number-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.search-input,
.number-input {
  height: 42px;
  padding: 0 12px;
}

.note-box {
  min-height: 74px;
  padding: 10px 12px;
  resize: vertical;
}

.search-input:focus,
.note-box:focus,
.number-input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(47, 115, 101, 0.15);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.chip.active {
  border-color: var(--green);
  background: rgba(29, 79, 69, 0.1);
  color: var(--green);
}

.chip.warn {
  border-color: rgba(217, 93, 57, 0.35);
  color: var(--coral);
}

.progress-list {
  display: grid;
  gap: 9px;
}

.coverage-list {
  margin-top: 12px;
}

.coverage-toolbar {
  margin-top: 12px;
}

.progress-row {
  display: grid;
  gap: 5px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.progress-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 99px;
  background: var(--surface-2);
}

.progress-bar span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.question-card {
  padding: 22px;
}

.question-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.badge.green {
  background: rgba(29, 79, 69, 0.1);
  color: var(--green);
}

.badge.coral {
  background: #fff1ed;
  color: var(--coral);
}

.badge.blue {
  background: rgba(47, 95, 143, 0.1);
  color: var(--blue);
}

.question-index {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.question-text {
  margin: 0;
  font-size: 22px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.option-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-height: 54px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.option-key {
  display: grid;
  width: 34px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 900;
}

.option-text {
  min-width: 0;
  padding-top: 4px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.option-button.selected {
  border-color: var(--green);
  background: rgba(29, 79, 69, 0.08);
}

.option-button.selected .option-key {
  background: var(--green);
  color: #fff;
}

.option-button.correct {
  border-color: rgba(30, 122, 85, 0.5);
  background: rgba(30, 122, 85, 0.1);
}

.option-button.correct .option-key {
  background: var(--ok);
  color: #fff;
}

.option-button.wrong {
  border-color: rgba(177, 63, 51, 0.45);
  background: rgba(177, 63, 51, 0.08);
}

.option-button.wrong .option-key {
  background: var(--bad);
  color: #fff;
}

.answer-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fff9e8;
  padding: 14px;
}

.answer-panel strong {
  color: var(--text);
}

.answer-panel p {
  margin: 0;
  color: #4f4b42;
  line-height: 1.55;
  white-space: pre-line;
}

.answer-panel-outside {
  margin-top: 10px;
  border: 1px solid rgba(216, 170, 53, 0.3);
  box-shadow: var(--shadow);
}

.answer-placeholder {
  visibility: hidden;
}

.answer-slot {
  min-height: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  padding: 28px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.verify-shell {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
}

.verify-card {
  display: grid;
  width: min(100%, 420px);
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.verify-brand h1 {
  white-space: normal;
}

.verify-form {
  display: grid;
  gap: 10px;
}

.verify-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.verify-input {
  height: 50px;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.verify-submit {
  min-height: 48px;
}

.verify-error {
  min-height: 20px;
  margin: 0;
  color: var(--bad);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.exam-header,
.search-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.exam-header h2,
.search-header h2 {
  margin: 0;
  font-size: 17px;
}

.exam-header p,
.search-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.number-button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.number-button.current {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.number-button.answered {
  border-color: rgba(47, 95, 143, 0.35);
  background: rgba(47, 95, 143, 0.1);
  color: var(--blue);
}

.number-button.correct {
  border-color: rgba(30, 122, 85, 0.45);
  background: rgba(30, 122, 85, 0.12);
  color: var(--ok);
}

.number-button.wrong {
  border-color: rgba(177, 63, 51, 0.45);
  background: rgba(177, 63, 51, 0.1);
  color: var(--bad);
}

.result-card,
.search-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.result-score {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.score-ring {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 999px;
  background:
    conic-gradient(var(--green) var(--value), var(--surface-2) 0),
    var(--surface-2);
  color: var(--green);
  font-size: 26px;
  font-weight: 900;
}

.search-results {
  display: grid;
  gap: 10px;
}

.search-card {
  cursor: pointer;
  box-shadow: none;
}

.search-card:hover {
  border-color: var(--green-2);
}

.search-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.search-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.file-input {
  display: none;
}

.footer-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .topbar {
    position: static;
    border-top: 1px solid rgba(217, 212, 200, 0.95);
    border-bottom: 0;
    transform: none;
  }

  .topbar-inner {
    gap: 9px;
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  body.topbar-hidden .topbar {
    transform: none;
  }

  .topbar-inner,
  .layout {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar-inner {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions > * {
    flex: 1 1 auto;
    min-width: 0;
  }

  .layout {
    grid-template-columns: 1fr;
    padding-top: 14px;
    padding-bottom: 24px;
  }

  .sidebar {
    order: 2;
  }

  .workspace {
    order: 1;
  }

  .question-card {
    display: flex;
    flex-direction: column;
    height: clamp(440px, calc(100svh - 380px), 560px);
    overflow: hidden;
  }

  .question-head {
    flex: 0 0 auto;
  }

  .question-text {
    flex: 0 0 130px;
    min-height: 0;
    overflow: auto;
    padding-right: 3px;
  }

  .options {
    flex: 0 0 210px;
    min-height: 0;
    overflow: auto;
    padding-right: 3px;
    align-content: start;
  }

  .question-card.revealed .question-text {
    flex-basis: 130px;
  }

  .question-card.revealed .options {
    flex-basis: 210px;
  }

  .answer-panel-outside {
    height: 96px;
    max-height: 96px;
    overflow: auto;
  }

  .workspace > .toolbar {
    position: static;
    min-height: auto;
    margin: 10px -2px 0;
    padding: 8px;
    border: 1px solid rgba(217, 212, 200, 0.95);
    border-radius: 8px;
    background: rgba(246, 245, 239, 0.96);
    box-shadow: 0 12px 32px rgba(31, 39, 45, 0.14);
    align-items: start;
    backdrop-filter: blur(12px);
  }

  .workspace > .toolbar.toolbar-after-answer {
    margin-top: 10px;
  }

  .workspace > .mode-tabs {
    margin-top: 2px;
  }

  .coverage-panel,
  .panel {
    scroll-margin-bottom: 24px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .brand h1 {
    font-size: 17px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

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

  .question-card {
    padding: 16px;
    height: clamp(430px, calc(100svh - 390px), 530px);
  }

  .question-text {
    font-size: 19px;
    flex-basis: 118px;
  }

  .options {
    flex-basis: 210px;
    gap: 8px;
  }

  .question-card.revealed .question-text {
    flex-basis: 118px;
  }

  .question-card.revealed .options {
    flex-basis: 210px;
  }

  .option-button {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 46px;
    align-items: center;
    padding: 8px 10px;
  }

  .option-key {
    height: 30px;
  }

  .option-text {
    padding-top: 0;
  }

  .toolbar,
  .toolbar-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .toolbar button {
    width: 100%;
  }

  .result-score {
    grid-template-columns: 1fr;
  }
}

/* Compact mobile study surface */
:root {
  --glass-bg: rgba(255, 255, 255, 0.66);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-line: rgba(255, 255, 255, 0.72);
  --glass-shadow: 0 18px 48px rgba(38, 48, 54, 0.16);
}

.panel,
.question-card,
.result-card,
.search-card,
.exam-header,
.search-header,
.exam-grid {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(247, 249, 244, 0.68)),
    var(--glass-bg-strong);
  border-color: rgba(170, 179, 169, 0.38);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.55);
  backdrop-filter: blur(22px) saturate(1.55);
}

.layout:not(.practice-layout) {
  grid-template-columns: minmax(0, 1fr);
}

.practice-screen {
  display: grid;
  gap: 10px;
}

.practice-study-area {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.practice-dock {
  display: grid;
  gap: 8px;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(244, 247, 241, 0.58)),
    rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 45px rgba(31, 39, 45, 0.16);
  padding: 8px;
  -webkit-backdrop-filter: blur(24px) saturate(1.7);
  backdrop-filter: blur(24px) saturate(1.7);
}

.practice-dock .practice-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  width: 100%;
}

.practice-dock .practice-toolbar button {
  width: 100%;
  min-height: 40px;
  border-radius: 14px;
  padding: 0 4px;
  font-size: 13px;
  white-space: nowrap;
}

.dock-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.dock-nav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: stretch;
}

.dock-tabs .tab-button {
  min-height: 34px;
  border-radius: 14px;
  padding: 0 2px;
  font-size: 11px;
  white-space: nowrap;
}

.dock-tabs .tab-button[data-mode="exam300"] {
  font-size: 10px;
}

.dock-menu-button {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(170, 179, 169, 0.42);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dock-menu-button span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.favorite-star {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(216, 170, 53, 0.45);
  border-radius: 999px;
  background: rgba(255, 251, 236, 0.84);
  color: #9c7a1d;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.favorite-star.active {
  background: rgba(216, 170, 53, 0.18);
  color: var(--gold);
}

.glass-menu-button {
  position: fixed;
  right: 14px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(237, 242, 236, 0.62)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 34px rgba(31, 39, 45, 0.22);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
}

.glass-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.glass-menu-button span + span {
  margin-top: 0;
}

.utility-backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(32, 38, 40, 0.2);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.utility-sheet {
  position: fixed;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 10px;
  z-index: 50;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-width: 720px;
  max-height: min(72svh, 620px);
  margin: 0 auto;
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 244, 237, 0.7)),
    rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 28px 70px rgba(23, 31, 36, 0.24);
  padding: 10px;
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  backdrop-filter: blur(28px) saturate(1.8);
}

.exam-hero,
.exam-review-header {
  border-radius: 24px;
  padding: 16px;
}

.exam-hero h2,
.exam-review-header h2 {
  font-size: 22px;
  letter-spacing: 0;
}

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

.exam-review-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(170, 179, 169, 0.34);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(247, 249, 244, 0.66)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 46px rgba(27, 36, 42, 0.12);
  padding: 14px;
  -webkit-backdrop-filter: blur(24px) saturate(1.55);
  backdrop-filter: blur(24px) saturate(1.55);
}

.exam-review-card.is-wrong {
  border-color: rgba(196, 77, 62, 0.26);
}

.exam-review-card.is-correct {
  border-color: rgba(22, 116, 81, 0.22);
}

.exam-review-top,
.review-answer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.exam-review-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.answer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(154, 164, 153, 0.34);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.answer-pill.correct {
  border-color: rgba(22, 116, 81, 0.28);
  background: rgba(22, 116, 81, 0.11);
  color: var(--ok);
}

.answer-pill.wrong {
  border-color: rgba(196, 77, 62, 0.28);
  background: rgba(196, 77, 62, 0.1);
  color: var(--bad);
}

.review-options {
  display: grid;
  gap: 7px;
}

.review-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 40px;
  border: 1px solid rgba(154, 164, 153, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  padding: 6px 9px;
}

.review-option.correct-answer {
  border-color: rgba(22, 116, 81, 0.35);
  background: rgba(22, 116, 81, 0.1);
}

.review-option.correct-answer .option-key,
.review-option.selected-correct .option-key {
  background: var(--ok);
  color: #fff;
}

.review-option.wrong-answer {
  border-color: rgba(196, 77, 62, 0.38);
  background: rgba(196, 77, 62, 0.1);
}

.review-option.wrong-answer .option-key {
  background: var(--bad);
  color: #fff;
}

.review-explanation {
  border-left: 3px solid rgba(185, 148, 34, 0.66);
  border-radius: 16px;
  background: rgba(255, 250, 232, 0.68);
  padding: 10px 12px;
}

.review-explanation strong {
  color: var(--text);
  font-size: 13px;
}

.review-explanation p {
  margin: 5px 0 0;
  color: #514d43;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}

.utility-grabber {
  justify-self: center;
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: rgba(105, 116, 123, 0.3);
  margin: 0 0 10px;
}

.utility-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.utility-nav .chip {
  justify-content: center;
  min-height: 34px;
  border-radius: 14px;
  padding: 0 4px;
}

.utility-body {
  min-height: 0;
  overflow: auto;
  padding-top: 10px;
}

.bank-panel {
  display: grid;
  gap: 14px;
}

.bank-panel .brand h1 {
  white-space: normal;
}

.bank-panel .top-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.practice-fit {
  overflow: hidden;
}

body.practice-fit .glass-menu-button {
  display: none;
}

body.practice-fit .layout.practice-layout {
  display: block;
  max-width: 720px;
  min-height: 100svh;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

body.practice-fit .practice-workspace,
body.practice-fit .practice-screen {
  min-height: calc(100svh - 20px - env(safe-area-inset-bottom));
}

body.practice-fit .practice-screen {
  grid-template-rows: minmax(0, 1fr) auto;
}

body.practice-fit .practice-study-area {
  grid-template-rows: auto 78px;
  align-content: space-between;
}

body.practice-fit .practice-study-area .question-card {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  height: auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 24px;
  padding: 13px;
}

body.practice-fit .question-head {
  flex: initial;
  gap: 6px;
  margin-bottom: 8px;
}

body.practice-fit .badges {
  gap: 5px;
}

body.practice-fit .badge {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

body.practice-fit .question-index {
  font-size: 12px;
}

body.practice-fit .practice-study-area .question-text {
  flex: initial;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
  font-size: 17px;
  line-height: 1.32;
}

body.practice-fit .practice-study-area .options {
  flex: initial;
  align-content: start;
  gap: 6px;
  min-height: 0;
  margin-top: 9px;
  overflow: visible;
  padding-right: 0;
}

body.practice-fit .practice-study-area .option-button {
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 40px;
  padding: 6px 9px;
  border-radius: 16px;
}

body.practice-fit .practice-study-area .option-key {
  width: 30px;
  height: 28px;
  border-radius: 10px;
}

body.practice-fit .practice-study-area .option-text {
  padding-top: 2px;
  font-size: 14px;
  line-height: 1.3;
}

body.practice-fit .density-medium .question-text {
  font-size: 15px;
  line-height: 1.28;
}

body.practice-fit .density-medium .option-button {
  min-height: 39px;
}

body.practice-fit .density-tight .question-text {
  font-size: 13px;
  line-height: 1.24;
}

body.practice-fit .density-tight .options {
  gap: 5px;
  margin-top: 7px;
}

body.practice-fit .density-tight .option-button {
  min-height: 34px;
  padding: 5px 8px;
}

body.practice-fit .density-ultra .question-text {
  font-size: 12px;
  line-height: 1.2;
}

body.practice-fit .density-ultra .options {
  gap: 4px;
  margin-top: 6px;
}

body.practice-fit .density-ultra .option-button {
  min-height: 30px;
  padding: 4px 7px;
}

body.practice-fit .density-ultra .option-key {
  width: 26px;
  height: 24px;
}

body.practice-fit .density-ultra .option-text {
  font-size: 12px;
  line-height: 1.2;
}

body.practice-fit .density-tight .option-key {
  width: 28px;
  height: 26px;
}

body.practice-fit .answer-panel-outside {
  height: 78px;
  max-height: 78px;
  min-height: 78px;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  padding: 9px 12px;
}

body.practice-fit .answer-panel {
  gap: 6px;
}

body.practice-fit .answer-panel strong {
  font-size: 14px;
}

body.practice-fit .answer-panel p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@supports (height: 100dvh) {
  body.practice-fit .layout.practice-layout {
    min-height: 100dvh;
  }

  body.practice-fit .practice-workspace,
  body.practice-fit .practice-screen {
    min-height: calc(100dvh - 20px - env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  body.practice-fit .layout.practice-layout {
    padding-right: 9px;
    padding-left: 9px;
  }

  body.practice-fit .practice-study-area {
    grid-template-rows: auto 70px;
    gap: 7px;
  }

  body.practice-fit .practice-study-area .question-card {
    padding: 12px;
  }

  body.practice-fit .practice-study-area .question-text {
    font-size: 16px;
  }

  body.practice-fit .density-medium .question-text {
    font-size: 14px;
  }

  body.practice-fit .density-tight .question-text {
    font-size: 13px;
  }

  body.practice-fit .density-ultra .question-text {
    font-size: 11px;
  }

  body.practice-fit .practice-study-area .option-button {
    min-height: 37px;
  }

  body.practice-fit .answer-panel-outside {
    height: 70px;
    min-height: 70px;
    max-height: 70px;
  }

  .practice-dock {
    gap: 6px;
    padding: 7px;
  }

  .practice-dock .practice-toolbar {
    gap: 4px;
  }

  .practice-dock .practice-toolbar button {
    min-height: 36px;
    font-size: 12px;
  }

  .dock-tabs {
    gap: 4px;
  }

  .dock-tabs .tab-button {
    min-height: 31px;
    font-size: 10px;
  }

  .dock-tabs .tab-button[data-mode="exam300"] {
    font-size: 9px;
  }
}

/* Liquid Glass polish */
:root {
  --bg: #f6f8f3;
  --surface: rgba(255, 255, 255, 0.64);
  --surface-2: rgba(249, 250, 246, 0.58);
  --line: rgba(126, 139, 132, 0.24);
  --text: #172026;
  --muted: #667179;
  --green: #0f5c4f;
  --green-2: #1a806d;
  --coral: #bf5144;
  --gold: #a9861e;
  --blue: #376d95;
  --shadow: 0 24px 70px rgba(26, 36, 42, 0.13);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-strong: rgba(255, 255, 255, 0.76);
  --glass-line: rgba(255, 255, 255, 0.72);
  --glass-hairline: rgba(97, 113, 118, 0.18);
  --glass-shadow: 0 26px 72px rgba(30, 40, 46, 0.16);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

html {
  height: 100%;
  background: #f6f8f3;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 246, 0.88) 26%, rgba(233, 241, 234, 0.94) 100%),
    linear-gradient(115deg, rgba(16, 92, 79, 0.1), rgba(245, 250, 248, 0) 42%),
    linear-gradient(245deg, rgba(55, 109, 149, 0.09), rgba(249, 247, 235, 0) 48%),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.08) 44%, rgba(255, 255, 255, 0.34)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0 1px, rgba(255, 255, 255, 0) 1px 12px);
  opacity: 0.72;
}

button,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 102, 143, 0.22);
  outline-offset: 2px;
}

.topbar,
.workspace > .toolbar,
.practice-dock,
.utility-sheet,
.panel,
.question-card,
.result-card,
.search-card,
.exam-header,
.search-header,
.exam-grid,
.verify-card,
.empty-state {
  border-color: var(--glass-hairline);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 246, 0.54)),
    var(--glass-bg);
  box-shadow: var(--glass-inner), var(--glass-shadow);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  backdrop-filter: blur(28px) saturate(1.7);
}

.topbar {
  border-top: 0;
  border-bottom: 1px solid var(--glass-hairline);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 249, 244, 0.58)),
    rgba(255, 255, 255, 0.62);
}

.brand-mark {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(26, 128, 109, 0.98), rgba(15, 92, 79, 0.98)),
    var(--green);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 12px 28px rgba(15, 92, 79, 0.2);
  font-weight: 760;
}

.brand h1,
.exam-header h2,
.search-header h2,
.section-title h2,
.section-title h3,
.result-card h2 {
  font-weight: 760;
  letter-spacing: 0;
}

.brand p,
.exam-header p,
.search-header p,
.footer-note,
.section-title span,
.progress-meta,
.stat span {
  color: rgba(96, 108, 116, 0.88);
  font-weight: 500;
}

.tab-button,
.soft-button,
.solid-button,
.danger-button,
.chip,
.number-button,
.dock-menu-button,
.favorite-star,
.verify-input,
.search-input,
.note-box {
  border-radius: 18px;
}

.tab-button,
.soft-button,
.chip,
.number-button,
.dock-menu-button {
  border: 1px solid rgba(112, 126, 121, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(243, 247, 240, 0.56)),
    rgba(255, 255, 255, 0.58);
  color: rgba(76, 87, 94, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 9px 22px rgba(30, 40, 46, 0.07);
  font-weight: 720;
}

.tab-button.active,
.chip.active,
.number-button.current {
  border-color: rgba(15, 92, 79, 0.34);
  background:
    linear-gradient(180deg, rgba(26, 128, 109, 0.98), rgba(15, 92, 79, 0.98)),
    var(--green);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 14px 32px rgba(15, 92, 79, 0.22);
}

.soft-button.active {
  border-color: rgba(15, 92, 79, 0.32);
  background: rgba(15, 92, 79, 0.1);
  color: var(--green);
}

.solid-button {
  border: 1px solid rgba(255, 255, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(90, 157, 141, 0.96), rgba(15, 92, 79, 0.98)),
    var(--green);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 16px 34px rgba(15, 92, 79, 0.22);
  font-weight: 760;
}

.solid-button:disabled,
.soft-button:disabled {
  filter: saturate(0.65);
  opacity: 0.72;
}

.solid-button:disabled {
  border-color: rgba(112, 126, 121, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(235, 242, 237, 0.56)),
    rgba(255, 255, 255, 0.56);
  color: rgba(80, 93, 100, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 8px 20px rgba(30, 40, 46, 0.06);
}

.soft-button:disabled {
  color: rgba(80, 93, 100, 0.52);
}

.danger-button {
  border: 1px solid rgba(191, 81, 68, 0.16);
  background: rgba(255, 242, 239, 0.78);
  color: var(--coral);
}

.panel,
.question-card,
.result-card,
.search-card,
.exam-header,
.search-header,
.exam-grid,
.empty-state {
  border-radius: 28px;
}

.stat {
  border-color: rgba(112, 126, 121, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(245, 249, 242, 0.46)),
    rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.stat strong,
.score-ring {
  font-weight: 780;
}

.search-input,
.note-box,
.number-input,
.verify-input {
  border: 1px solid rgba(112, 126, 121, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 246, 0.58)),
    rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.verify-shell {
  min-height: 100svh;
  padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.verify-card {
  width: min(100%, 430px);
  gap: 22px;
  border-radius: 34px;
  padding: 24px;
}

.verify-brand .brand-mark {
  flex-basis: 52px;
  width: 52px;
  height: 52px;
}

.verify-brand h1 {
  font-size: 21px;
  line-height: 1.24;
}

.verify-brand p {
  margin-top: 5px;
  font-size: 14px;
}

.verify-input {
  height: 52px;
  border-radius: 20px;
  font-size: 19px;
  font-weight: 720;
}

.verify-submit {
  min-height: 50px;
  border-radius: 20px;
}

.question-card {
  border-color: rgba(96, 111, 116, 0.18);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(250, 252, 248, 0.6) 48%, rgba(243, 248, 244, 0.48)),
    rgba(255, 255, 255, 0.66);
}

.question-head {
  margin-bottom: 12px;
}

.badge {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(238, 244, 240, 0.54)),
    rgba(255, 255, 255, 0.54);
  color: rgba(82, 95, 102, 0.9);
  font-weight: 720;
}

.badge.green {
  background: rgba(15, 92, 79, 0.1);
  color: var(--green);
}

.badge.blue {
  background: rgba(55, 109, 149, 0.1);
  color: var(--blue);
}

.badge.coral {
  background: rgba(191, 81, 68, 0.1);
  color: var(--coral);
}

.question-index {
  color: rgba(89, 101, 108, 0.82);
  font-weight: 650;
}

.question-text {
  font-weight: 730;
  letter-spacing: 0;
}

.option-button {
  border-color: rgba(112, 126, 121, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(249, 251, 247, 0.62)),
    rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 8px 22px rgba(34, 43, 48, 0.06);
}

.option-key {
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(247, 248, 244, 0.94), rgba(235, 240, 234, 0.8));
  color: rgba(88, 102, 110, 0.94);
  font-weight: 760;
}

.option-button.selected {
  border-color: rgba(15, 92, 79, 0.36);
  background: rgba(15, 92, 79, 0.08);
}

.option-button.selected .option-key {
  background:
    linear-gradient(180deg, rgba(26, 128, 109, 0.98), rgba(15, 92, 79, 0.98));
}

.option-button.correct {
  border-color: rgba(22, 116, 81, 0.38);
  background: rgba(22, 116, 81, 0.1);
}

.option-button.wrong {
  border-color: rgba(191, 81, 68, 0.36);
  background: rgba(191, 81, 68, 0.1);
}

.answer-panel {
  border-left: 0;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 251, 232, 0.86), rgba(255, 247, 211, 0.5)),
    rgba(255, 250, 228, 0.72);
  box-shadow:
    inset 4px 0 0 rgba(169, 134, 30, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 14px 32px rgba(169, 134, 30, 0.08);
}

.answer-panel strong {
  font-weight: 760;
}

.answer-panel p {
  color: rgba(78, 74, 65, 0.92);
}

.favorite-star {
  border-color: rgba(169, 134, 30, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 253, 239, 0.9), rgba(249, 239, 196, 0.4));
  color: rgba(154, 121, 25, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 18px rgba(169, 134, 30, 0.12);
}

.favorite-star.active {
  border-color: rgba(169, 134, 30, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 245, 198, 0.94), rgba(235, 204, 100, 0.64));
  color: #8b690f;
}

.practice-dock {
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(246, 249, 244, 0.58)),
    rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 22px 58px rgba(28, 37, 43, 0.18);
}

.practice-dock .practice-toolbar button,
.dock-tabs .tab-button,
.dock-menu-button {
  min-width: 0;
  font-weight: 720;
}

.dock-menu-button span {
  background: rgba(23, 32, 38, 0.9);
}

.utility-backdrop {
  background: rgba(27, 34, 39, 0.18);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  backdrop-filter: blur(8px) saturate(1.2);
}

.utility-sheet {
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 243, 0.68)),
    rgba(255, 255, 255, 0.72);
}

.utility-nav .chip {
  font-size: 12px;
}

.exam-review-card {
  border-color: rgba(96, 111, 116, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(250, 252, 248, 0.58)),
    rgba(255, 255, 255, 0.64);
}

.answer-pill,
.review-option,
.review-explanation {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(246, 249, 244, 0.52)),
    rgba(255, 255, 255, 0.54);
}

.review-explanation {
  border-left: 0;
  box-shadow: inset 4px 0 0 rgba(169, 134, 30, 0.58);
}

body.practice-fit .layout.practice-layout {
  max-width: 720px;
  min-height: 100svh;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

body.practice-fit .practice-screen {
  gap: 9px;
}

body.practice-fit .practice-study-area {
  grid-template-rows: minmax(0, 1fr) 74px;
  align-content: stretch;
  gap: 9px;
}

body.practice-fit .practice-study-area .question-card {
  align-self: start;
  height: auto !important;
  min-height: 0;
  padding: 12px;
  border-radius: 28px;
}

body.practice-fit .question-head {
  margin-bottom: 7px;
}

body.practice-fit .badge {
  min-height: 23px;
  padding: 0 8px;
  font-size: 10.5px;
}

body.practice-fit .favorite-star {
  width: 25px;
  height: 25px;
  font-size: 17px;
}

body.practice-fit .question-index {
  font-size: 11.5px;
}

body.practice-fit .practice-study-area .question-text {
  font-size: 16px;
  line-height: 1.28;
  font-weight: 720;
}

body.practice-fit .practice-study-area .options {
  gap: 6px;
  margin-top: 8px;
}

body.practice-fit .practice-study-area .option-button {
  grid-template-columns: 29px minmax(0, 1fr);
  min-height: 38px;
  border-radius: 17px;
  padding: 5px 8px;
}

body.practice-fit .practice-study-area .option-key {
  width: 29px;
  height: 27px;
}

body.practice-fit .practice-study-area .option-text {
  font-size: 13.5px;
  line-height: 1.25;
}

body.practice-fit .density-medium .question-text {
  font-size: 14.5px;
  line-height: 1.23;
}

body.practice-fit .density-medium .option-button {
  min-height: 36px;
}

body.practice-fit .density-tight .question-text {
  font-size: 12.6px;
  line-height: 1.18;
}

body.practice-fit .density-tight .option-button {
  min-height: 32px;
  padding: 4px 7px;
}

body.practice-fit .density-tight .option-text {
  font-size: 12.2px;
}

body.practice-fit .density-ultra .question-text {
  font-size: 11.2px;
  line-height: 1.15;
}

body.practice-fit .density-ultra .options {
  gap: 4px;
  margin-top: 5px;
}

body.practice-fit .density-ultra .option-button {
  min-height: 28px;
  padding: 3px 6px;
}

body.practice-fit .density-ultra .option-key {
  width: 25px;
  height: 23px;
  border-radius: 10px;
}

body.practice-fit .density-ultra .option-text {
  font-size: 11.1px;
  line-height: 1.16;
}

body.practice-fit .density-micro .question-text {
  font-size: 10px;
  line-height: 1.1;
}

body.practice-fit .density-micro .options {
  gap: 3px;
  margin-top: 4px;
}

body.practice-fit .density-micro .option-button {
  grid-template-columns: 23px minmax(0, 1fr);
  min-height: 25px;
  padding: 3px 6px;
  border-radius: 14px;
}

body.practice-fit .density-micro .option-key {
  width: 23px;
  height: 21px;
  border-radius: 9px;
  font-size: 11px;
}

body.practice-fit .density-micro .option-text {
  font-size: 10px;
  line-height: 1.08;
}

body.practice-fit .answer-panel-outside {
  height: 74px;
  min-height: 74px;
  max-height: 74px;
  border-radius: 22px;
  padding: 8px 12px 8px 14px;
}

body.practice-fit .answer-panel strong {
  font-size: 13.5px;
}

body.practice-fit .answer-panel p {
  font-size: 12.2px;
  line-height: 1.25;
}

body.practice-fit .practice-dock {
  gap: 6px;
  padding: 7px;
}

body.practice-fit .practice-dock .practice-toolbar {
  gap: 5px;
}

body.practice-fit .practice-dock .practice-toolbar button {
  min-height: 36px;
  border-radius: 17px;
  font-size: 12px;
}

body.practice-fit .dock-tabs {
  gap: 5px;
}

body.practice-fit .dock-tabs .tab-button,
body.practice-fit .dock-menu-button {
  min-height: 32px;
  border-radius: 16px;
}

body.practice-fit .dock-tabs .tab-button {
  font-size: 10px;
}

body.practice-fit .dock-tabs .tab-button[data-mode="exam300"] {
  font-size: 8.8px;
}

@supports (height: 100dvh) {
  .verify-shell {
    min-height: 100dvh;
  }

  body.practice-fit .layout.practice-layout {
    min-height: 100dvh;
  }
}

@media (max-width: 430px) {
  .verify-card {
    border-radius: 30px;
    padding: 20px;
  }

  .verify-brand h1 {
    font-size: 19px;
  }

  .panel,
  .question-card,
  .result-card,
  .search-card,
  .exam-header,
  .search-header,
  .exam-grid,
  .empty-state {
    border-radius: 26px;
  }

  body.practice-fit .layout.practice-layout {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 390px) {
  body.practice-fit .practice-study-area {
    grid-template-rows: minmax(0, 1fr) 68px;
    gap: 7px;
  }

  body.practice-fit .practice-study-area .question-card {
    padding: 10px;
  }

  body.practice-fit .practice-study-area .question-text {
    font-size: 15.2px;
    line-height: 1.24;
  }

  body.practice-fit .practice-study-area .option-button {
    min-height: 34px;
  }

  body.practice-fit .practice-study-area .option-text {
    font-size: 12.8px;
  }

  body.practice-fit .density-medium .question-text {
    font-size: 13.4px;
  }

  body.practice-fit .density-tight .question-text {
    font-size: 11.8px;
  }

  body.practice-fit .density-ultra .question-text {
    font-size: 10.4px;
  }

  body.practice-fit .density-micro .question-text {
    font-size: 9.3px;
  }

  body.practice-fit .answer-panel-outside {
    height: 68px;
    min-height: 68px;
    max-height: 68px;
  }

  body.practice-fit .practice-dock .practice-toolbar button {
    min-height: 34px;
    font-size: 11.4px;
  }

  body.practice-fit .dock-tabs .tab-button,
  body.practice-fit .dock-menu-button {
    min-height: 30px;
  }

  body.practice-fit .dock-tabs .tab-button {
    font-size: 9.3px;
  }

  body.practice-fit .dock-tabs .tab-button[data-mode="exam300"] {
    font-size: 8px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .workspace > .toolbar,
  .practice-dock,
  .utility-sheet,
  .panel,
  .question-card,
  .result-card,
  .search-card,
  .exam-header,
  .search-header,
  .exam-grid,
  .verify-card,
  .empty-state {
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Apple-style Liquid Glass pass */
:root {
  --bg: #f5f8fb;
  --surface: rgba(255, 255, 255, 0.46);
  --surface-2: rgba(247, 250, 255, 0.34);
  --line: rgba(255, 255, 255, 0.72);
  --text: #12191f;
  --muted: rgba(82, 94, 104, 0.76);
  --green: #007aff;
  --green-2: #00a6a6;
  --coral: #ff453a;
  --gold: #ffcc00;
  --blue: #007aff;
  --ok: #30a46c;
  --bad: #d33b30;
  --apple-blue: #007aff;
  --apple-teal: #00c7be;
  --apple-mint: #34c759;
  --apple-yellow: #ffcc00;
  --apple-red: #ff453a;
  --apple-purple: #af52de;
  --glass-hairline: rgba(255, 255, 255, 0.76);
  --glass-edge: rgba(255, 255, 255, 0.94);
  --glass-bottom-edge: rgba(74, 92, 110, 0.16);
  --glass-shadow: 0 26px 82px rgba(31, 43, 54, 0.14);
  --glass-shadow-soft: 0 14px 42px rgba(31, 43, 54, 0.1);
  --glass-inner:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(80, 94, 108, 0.1);
}

body {
  background:
    linear-gradient(180deg, #fbfdff 0%, #f2f7fb 35%, #f8f7ef 100%),
    linear-gradient(112deg, rgba(0, 122, 255, 0.18) 0%, rgba(0, 122, 255, 0) 34%, rgba(255, 204, 0, 0.14) 64%, rgba(255, 204, 0, 0) 100%),
    linear-gradient(245deg, rgba(0, 199, 190, 0.14) 0%, rgba(0, 199, 190, 0) 42%, rgba(175, 82, 222, 0.11) 100%),
    var(--bg);
  color: var(--text);
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.03) 38%, rgba(255, 255, 255, 0.38)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 58%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 1px, rgba(255, 255, 255, 0) 1px 16px);
  mix-blend-mode: screen;
}

.verify-card,
.question-card,
.practice-dock,
.utility-sheet,
.panel,
.result-card,
.search-card,
.exam-header,
.search-header,
.exam-grid,
.empty-state {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-hairline);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.26) 45%, rgba(248, 252, 255, 0.38)),
    rgba(255, 255, 255, 0.34);
  box-shadow:
    var(--glass-inner),
    0 1px 0 var(--glass-edge),
    var(--glass-shadow);
  -webkit-backdrop-filter: blur(42px) saturate(1.95) contrast(1.04);
  backdrop-filter: blur(42px) saturate(1.95) contrast(1.04);
}

.verify-card::before,
.question-card::before,
.practice-dock::before,
.utility-sheet::before,
.panel::before,
.result-card::before,
.search-card::before,
.exam-header::before,
.search-header::before,
.exam-grid::before,
.empty-state::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 31%),
    linear-gradient(325deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  opacity: 0.76;
}

.verify-card > *,
.question-card > *,
.practice-dock > *,
.utility-sheet > *,
.panel > *,
.result-card > *,
.search-card > *,
.exam-header > *,
.search-header > *,
.exam-grid > *,
.empty-state > * {
  position: relative;
  z-index: 1;
}

.verify-card,
.question-card {
  border-radius: 34px;
}

.practice-dock,
.utility-sheet {
  border-radius: 32px;
}

.topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(36px) saturate(1.85);
  backdrop-filter: blur(36px) saturate(1.85);
}

.brand-mark {
  background:
    linear-gradient(180deg, rgba(0, 122, 255, 0.96), rgba(0, 94, 214, 0.96)),
    var(--apple-blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 14px 36px rgba(0, 122, 255, 0.24);
}

.brand h1,
.question-text,
.exam-review-card h3 {
  color: #101820;
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.32);
  color: rgba(55, 68, 78, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 6px 18px rgba(35, 48, 58, 0.06);
}

.badge.green {
  background:
    linear-gradient(180deg, rgba(230, 244, 255, 0.72), rgba(220, 240, 255, 0.34)),
    rgba(0, 122, 255, 0.08);
  color: #0057b8;
}

.badge.blue {
  background:
    linear-gradient(180deg, rgba(228, 250, 248, 0.72), rgba(219, 248, 245, 0.32)),
    rgba(0, 199, 190, 0.09);
  color: #006a70;
}

.badge.coral {
  background: rgba(255, 69, 58, 0.1);
  color: #b3261e;
}

.favorite-star {
  border-color: rgba(255, 204, 0, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 250, 218, 0.78), rgba(255, 235, 153, 0.36)),
    rgba(255, 204, 0, 0.12);
  color: #a06a00;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 22px rgba(255, 204, 0, 0.14);
}

.favorite-star.active {
  background:
    linear-gradient(180deg, rgba(255, 233, 124, 0.9), rgba(255, 204, 0, 0.58)),
    rgba(255, 204, 0, 0.28);
  color: #7a5300;
}

.tab-button,
.soft-button,
.chip,
.number-button,
.dock-menu-button {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.22)),
    rgba(255, 255, 255, 0.3);
  color: rgba(37, 50, 60, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(75, 92, 108, 0.08),
    0 10px 28px rgba(32, 45, 56, 0.08);
  -webkit-backdrop-filter: blur(26px) saturate(1.75);
  backdrop-filter: blur(26px) saturate(1.75);
}

.tab-button.active,
.chip.active,
.number-button.current {
  border-color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(180deg, rgba(0, 122, 255, 0.9), rgba(0, 89, 205, 0.9)),
    var(--apple-blue);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 14px 34px rgba(0, 122, 255, 0.24);
}

.soft-button.active {
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(220, 242, 255, 0.72), rgba(228, 249, 247, 0.36)),
    rgba(0, 122, 255, 0.1);
  color: #0057b8;
}

.solid-button {
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(0, 199, 190, 0.9), rgba(0, 122, 255, 0.9)),
    var(--apple-blue);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 16px 38px rgba(0, 122, 255, 0.22);
}

.solid-button:disabled {
  border-color: rgba(255, 255, 255, 0.64);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.2)),
    rgba(255, 255, 255, 0.22);
  color: rgba(71, 83, 94, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 20px rgba(32, 45, 56, 0.05);
}

.danger-button {
  background:
    linear-gradient(180deg, rgba(255, 240, 238, 0.72), rgba(255, 255, 255, 0.24)),
    rgba(255, 69, 58, 0.08);
  color: #bd2d25;
}

.question-card {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.28) 44%, rgba(245, 251, 255, 0.42)),
    rgba(255, 255, 255, 0.34);
}

.question-card::after,
.practice-dock::after,
.verify-card::after,
.utility-sheet::after {
  position: absolute;
  inset: 1px;
  z-index: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0) 18%),
    linear-gradient(305deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 24%);
  opacity: 0.72;
}

.question-text {
  font-weight: 760;
}

.option-button {
  border-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(80, 94, 108, 0.08),
    0 8px 22px rgba(30, 43, 54, 0.05);
  -webkit-backdrop-filter: blur(20px) saturate(1.55);
  backdrop-filter: blur(20px) saturate(1.55);
}

.option-key {
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.86), rgba(238, 243, 249, 0.64));
  color: rgba(78, 94, 106, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.option-button.selected,
.option-button.correct {
  border-color: rgba(0, 122, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(229, 244, 255, 0.7), rgba(234, 250, 248, 0.34)),
    rgba(0, 122, 255, 0.08);
}

.option-button.selected .option-key,
.option-button.correct .option-key {
  background:
    linear-gradient(180deg, rgba(0, 199, 190, 0.96), rgba(0, 122, 255, 0.96));
  color: #fff;
}

.option-button.wrong {
  border-color: rgba(255, 69, 58, 0.3);
  background: rgba(255, 69, 58, 0.08);
}

.option-button.wrong .option-key {
  background:
    linear-gradient(180deg, rgba(255, 105, 97, 0.96), rgba(255, 69, 58, 0.96));
}

.answer-panel {
  border: 1px solid rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(145deg, rgba(255, 252, 226, 0.72), rgba(255, 255, 255, 0.2)),
    rgba(255, 204, 0, 0.12);
  box-shadow:
    inset 5px 0 0 rgba(255, 204, 0, 0.74),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 34px rgba(94, 79, 22, 0.08);
  -webkit-backdrop-filter: blur(26px) saturate(1.75);
  backdrop-filter: blur(26px) saturate(1.75);
}

.practice-dock {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.26) 48%, rgba(246, 252, 255, 0.36)),
    rgba(255, 255, 255, 0.32);
  box-shadow:
    var(--glass-inner),
    0 -1px 0 rgba(255, 255, 255, 0.58),
    0 24px 72px rgba(30, 43, 54, 0.18);
}

.dock-menu-button span {
  background: rgba(18, 25, 31, 0.84);
}

.utility-backdrop {
  background: rgba(226, 235, 242, 0.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
}

.utility-sheet {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.26) 48%, rgba(245, 252, 255, 0.36)),
    rgba(255, 255, 255, 0.34);
}

.stat {
  border-color: rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2)),
    rgba(255, 255, 255, 0.26);
}

.score-ring {
  background:
    conic-gradient(var(--apple-blue) var(--value), rgba(255, 255, 255, 0.28) 0),
    rgba(255, 255, 255, 0.3);
  color: #0057b8;
}

.review-option.correct-answer,
.answer-pill.correct {
  border-color: rgba(48, 164, 108, 0.32);
  background: rgba(52, 199, 89, 0.1);
  color: #167047;
}

.review-option.wrong-answer,
.answer-pill.wrong {
  border-color: rgba(255, 69, 58, 0.3);
  background: rgba(255, 69, 58, 0.09);
  color: #bd2d25;
}

body.practice-fit .practice-study-area .question-card {
  border-radius: 34px;
}

body.practice-fit .practice-dock {
  border-radius: 30px;
}

@media (max-width: 390px) {
  body.practice-fit .practice-study-area .question-card {
    border-radius: 30px;
  }

  body.practice-fit .practice-dock {
    border-radius: 28px;
  }
}

/* Wallpaper contrast and glass refraction tuning */
body {
  background:
    linear-gradient(180deg, #fcfdff 0%, #eef6ff 30%, #f7fbff 58%, #fffaf1 100%),
    linear-gradient(118deg, rgba(0, 122, 255, 0.2) 0%, rgba(238, 247, 255, 0.12) 32%, rgba(0, 199, 190, 0.14) 52%, rgba(255, 204, 0, 0.18) 100%),
    linear-gradient(245deg, rgba(175, 82, 222, 0.12) 0%, rgba(255, 255, 255, 0) 36%, rgba(52, 199, 89, 0.1) 100%),
    var(--bg);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(22deg, rgba(0, 122, 255, 0) 0 26%, rgba(0, 122, 255, 0.12) 26% 38%, rgba(0, 122, 255, 0) 38%),
    linear-gradient(338deg, rgba(0, 199, 190, 0) 0 54%, rgba(0, 199, 190, 0.1) 54% 68%, rgba(0, 199, 190, 0) 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
}

.verify-card,
.question-card,
.practice-dock,
.utility-sheet,
.panel,
.result-card,
.search-card,
.exam-header,
.search-header,
.exam-grid,
.empty-state {
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.18) 46%, rgba(238, 248, 255, 0.32)),
    rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(40, 58, 76, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.7),
    0 28px 86px rgba(31, 43, 54, 0.16);
}

.question-card {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.18) 44%, rgba(235, 248, 255, 0.34)),
    rgba(255, 255, 255, 0.26);
}

.practice-dock {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.18) 48%, rgba(232, 247, 255, 0.3)),
    rgba(255, 255, 255, 0.26);
}

.option-button,
.tab-button,
.soft-button,
.chip,
.number-button,
.dock-menu-button {
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.18)),
    rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(56, 76, 96, 0.08),
    0 10px 26px rgba(28, 42, 54, 0.07);
}

.option-button {
  border-bottom-color: rgba(120, 145, 165, 0.22);
}

.option-button:hover,
.soft-button:hover,
.tab-button:hover {
  border-color: rgba(255, 255, 255, 0.96);
}

.answer-panel {
  background:
    linear-gradient(145deg, rgba(255, 252, 226, 0.66), rgba(255, 255, 255, 0.18)),
    rgba(255, 204, 0, 0.1);
}

/* Native polish: lighter symbols, bolder glass, no form hints */
.favorite-star {
  display: inline-grid !important;
  width: 25px !important;
  height: 25px !important;
  min-height: 25px !important;
  place-items: center;
  margin-left: -1px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(29, 42, 52, 0.34);
  line-height: 1;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.favorite-star::before,
.favorite-star::after {
  display: none !important;
}

.favorite-star:active {
  transform: scale(0.92);
}

.favorite-star.active {
  background: transparent !important;
  color: #ffb700;
  filter: drop-shadow(0 6px 12px rgba(255, 183, 0, 0.22));
}

.favorite-icon {
  width: 21px;
  height: 21px;
  overflow: visible;
}

.favorite-icon .star-fill {
  fill: currentColor;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.favorite-icon .star-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.favorite-star.active .star-fill {
  opacity: 0.92;
}

.favorite-star.active .star-line {
  stroke: rgba(135, 88, 0, 0.42);
}

.verify-input::placeholder {
  color: transparent;
}

.verify-input {
  caret-color: var(--apple-blue);
  color: rgba(17, 27, 35, 0.88);
  letter-spacing: 0.08em;
}

.verify-card {
  transform: translateZ(0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(42, 63, 82, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.7),
    0 34px 96px rgba(31, 43, 54, 0.16);
}

.question-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(42, 63, 82, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.72),
    0 30px 88px rgba(24, 38, 50, 0.17);
}

.practice-dock {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(42, 63, 82, 0.12),
    0 -1px 0 rgba(255, 255, 255, 0.46),
    0 24px 72px rgba(24, 38, 50, 0.18);
}

.tab-button.active {
  background:
    linear-gradient(180deg, rgba(0, 122, 255, 0.92), rgba(0, 93, 219, 0.9)),
    var(--apple-blue);
}

.dock-tabs .tab-button.active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 10px 24px rgba(0, 122, 255, 0.22);
}

body.practice-fit .badges {
  align-items: center;
}

body.practice-fit .favorite-star {
  width: 23px !important;
  height: 23px !important;
  min-height: 23px !important;
}

body.practice-fit .favorite-icon {
  width: 19px;
  height: 19px;
}

/* Apple Sports-inspired scoreboard skin */
:root {
  --sports-bg: #050706;
  --sports-surface: rgba(18, 20, 19, 0.82);
  --sports-surface-2: rgba(28, 31, 29, 0.84);
  --sports-line: rgba(255, 255, 255, 0.11);
  --sports-text: #f5f7f7;
  --sports-muted: rgba(235, 241, 241, 0.58);
  --sports-green: #0b6f33;
  --sports-green-2: #021d0e;
  --sports-blue: #0a84ff;
  --sports-yellow: #ffd60a;
  --sports-red: #ff453a;
  --sports-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

html {
  background: var(--sports-bg);
}

body {
  background:
    linear-gradient(180deg, rgba(9, 91, 35, 0.96) 0%, rgba(3, 37, 16, 0.9) 16%, rgba(5, 7, 6, 0.98) 42%, #050706 100%),
    radial-gradient(circle at 84% -8%, rgba(77, 255, 137, 0.28), rgba(77, 255, 137, 0) 32%),
    radial-gradient(circle at 16% 18%, rgba(0, 132, 255, 0.14), rgba(0, 132, 255, 0) 28%),
    var(--sports-bg);
  color: var(--sports-text);
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 24%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, rgba(255, 255, 255, 0) 1px 14px);
  opacity: 1;
  mix-blend-mode: screen;
}

body::after {
  background:
    linear-gradient(180deg, rgba(5, 7, 6, 0) 0%, rgba(5, 7, 6, 0.28) 54%, rgba(5, 7, 6, 0.64) 100%),
    radial-gradient(circle at 50% 98%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 46%);
}

.verify-card,
.question-card,
.practice-dock,
.utility-sheet,
.panel,
.result-card,
.search-card,
.exam-header,
.search-header,
.exam-grid,
.empty-state {
  border-color: var(--sports-line);
  background:
    linear-gradient(180deg, rgba(38, 41, 39, 0.9), rgba(14, 16, 15, 0.86)),
    var(--sports-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 -1px 0 rgba(0, 0, 0, 0.65),
    var(--sports-shadow);
  -webkit-backdrop-filter: blur(34px) saturate(1.38);
  backdrop-filter: blur(34px) saturate(1.38);
}

.verify-card::before,
.question-card::before,
.practice-dock::before,
.utility-sheet::before,
.panel::before,
.result-card::before,
.search-card::before,
.exam-header::before,
.search-header::before,
.exam-grid::before,
.empty-state::before,
.question-card::after,
.practice-dock::after,
.verify-card::after,
.utility-sheet::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 36%),
    linear-gradient(135deg, rgba(67, 255, 127, 0.06), rgba(67, 255, 127, 0) 38%);
  opacity: 1;
}

.brand-mark {
  background:
    linear-gradient(180deg, rgba(20, 174, 80, 0.96), rgba(2, 104, 43, 0.96)),
    var(--sports-green);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 16px 38px rgba(16, 185, 90, 0.2);
}

.brand h1,
.verify-brand h1,
.question-text,
.exam-header h2,
.search-header h2,
.section-title h2,
.section-title h3,
.result-card h2,
.exam-review-card h3 {
  color: var(--sports-text);
}

.brand p,
.verify-brand p,
.question-index,
.exam-header p,
.search-header p,
.section-title span,
.footer-note,
.progress-meta,
.stat span {
  color: var(--sports-muted);
}

.badge {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(245, 247, 247, 0.74);
  box-shadow: none;
}

.badge.green {
  background: rgba(50, 215, 75, 0.16);
  color: #78f19b;
}

.badge.blue {
  background: rgba(10, 132, 255, 0.16);
  color: #8ec7ff;
}

.badge.coral {
  background: rgba(255, 69, 58, 0.14);
  color: #ff9d98;
}

.question-card {
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(34, 37, 35, 0.92), rgba(11, 13, 12, 0.9)),
    var(--sports-surface);
}

.question-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 7px;
}

.question-text {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.42);
}

.option-button {
  border-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--sports-surface-2);
  color: var(--sports-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 12px 24px rgba(0, 0, 0, 0.22);
}

.option-key {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 247, 247, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.option-text {
  color: var(--sports-text);
  font-weight: 680;
}

.option-button.selected,
.option-button.correct {
  border-color: rgba(50, 215, 75, 0.4);
  background:
    linear-gradient(180deg, rgba(50, 215, 75, 0.22), rgba(7, 54, 25, 0.26)),
    rgba(8, 38, 19, 0.72);
}

.option-button.selected .option-key,
.option-button.correct .option-key {
  background:
    linear-gradient(180deg, rgba(67, 255, 127, 0.96), rgba(22, 139, 62, 0.96));
  color: #041008;
}

.option-button.wrong {
  border-color: rgba(255, 69, 58, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 69, 58, 0.2), rgba(70, 13, 10, 0.3)),
    rgba(47, 13, 12, 0.78);
}

.option-button.wrong .option-key {
  background:
    linear-gradient(180deg, rgba(255, 117, 110, 0.96), rgba(255, 69, 58, 0.96));
  color: #fff;
}

.answer-panel {
  border-color: rgba(255, 214, 10, 0.28);
  background:
    linear-gradient(180deg, rgba(55, 43, 7, 0.94), rgba(24, 20, 9, 0.9)),
    rgba(255, 214, 10, 0.11);
  box-shadow:
    inset 5px 0 0 rgba(255, 214, 10, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 44px rgba(0, 0, 0, 0.28);
}

.answer-panel strong,
.answer-panel p {
  color: #fff7d1;
}

.practice-dock {
  border-radius: 28px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(34, 37, 35, 0.84), rgba(12, 14, 13, 0.82)),
    rgba(12, 14, 13, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 24px 72px rgba(0, 0, 0, 0.4);
}

.tab-button,
.soft-button,
.chip,
.number-button,
.dock-menu-button {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.055);
  color: rgba(245, 247, 247, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.18);
}

.tab-button.active,
.chip.active,
.number-button.current {
  border-color: rgba(50, 215, 75, 0.52);
  background:
    linear-gradient(180deg, rgba(50, 215, 75, 0.96), rgba(8, 126, 48, 0.96)),
    var(--sports-green);
  color: #041008;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 34px rgba(50, 215, 75, 0.18);
}

.solid-button {
  border-color: rgba(50, 215, 75, 0.45);
  background:
    linear-gradient(180deg, rgba(50, 215, 75, 0.94), rgba(8, 126, 48, 0.94)),
    var(--sports-green);
  color: #041008;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 16px 38px rgba(50, 215, 75, 0.18);
}

.solid-button:disabled {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 247, 247, 0.28);
  box-shadow: none;
}

.favorite-star {
  color: rgba(245, 247, 247, 0.34);
}

.favorite-star.active {
  color: var(--sports-yellow);
}

.dock-menu-button span {
  background: rgba(245, 247, 247, 0.76);
}

.verify-input,
.search-input,
.note-box,
.number-input {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.055);
  color: var(--sports-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.verify-card {
  background:
    linear-gradient(180deg, rgba(34, 37, 35, 0.9), rgba(10, 13, 11, 0.9)),
    var(--sports-surface);
}

.verify-submit {
  color: #041008;
}

.utility-backdrop {
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

.utility-sheet {
  background:
    linear-gradient(180deg, rgba(34, 37, 35, 0.92), rgba(10, 13, 11, 0.92)),
    var(--sports-surface);
}

.stat {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
}

.stat strong,
.score-ring {
  color: var(--sports-text);
}

.review-option,
.answer-pill,
.review-explanation {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--sports-text);
}

body.practice-fit .layout.practice-layout {
  max-width: 430px;
}

body.practice-fit .practice-study-area .question-card {
  border-radius: 30px;
}

body.practice-fit .practice-dock {
  border-radius: 27px;
}

/* Apple.com-inspired product page skin */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --line: rgba(0, 0, 0, 0.1);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --green: #0071e3;
  --green-2: #147ce5;
  --coral: #d70015;
  --gold: #b7791f;
  --blue: #06c;
  --ok: #248a3d;
  --bad: #d70015;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
}

html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 42%, #ffffff 100%),
    var(--bg);
  color: var(--text);
}

body::before,
body::after {
  display: none;
}

.verify-card,
.question-card,
.practice-dock,
.utility-sheet,
.panel,
.result-card,
.search-card,
.exam-header,
.search-header,
.exam-grid,
.empty-state {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.verify-card::before,
.question-card::before,
.practice-dock::before,
.utility-sheet::before,
.panel::before,
.result-card::before,
.search-card::before,
.exam-header::before,
.search-header::before,
.exam-grid::before,
.empty-state::before,
.question-card::after,
.practice-dock::after,
.verify-card::after,
.utility-sheet::after {
  display: none;
}

.verify-card,
.question-card {
  border-radius: 30px;
}

.practice-dock,
.utility-sheet {
  border-radius: 26px;
}

.brand-mark {
  background: #1d1d1f;
  color: #fff;
  box-shadow: none;
}

.brand h1,
.verify-brand h1,
.question-text,
.exam-header h2,
.search-header h2,
.section-title h2,
.section-title h3,
.result-card h2,
.exam-review-card h3 {
  color: var(--text);
  text-shadow: none;
}

.brand p,
.verify-brand p,
.question-index,
.exam-header p,
.search-header p,
.section-title span,
.footer-note,
.progress-meta,
.stat span {
  color: var(--muted);
}

.question-head {
  border-bottom: 0;
  padding-bottom: 0;
}

.badge {
  border: 0;
  background: #f5f5f7;
  color: var(--muted);
  box-shadow: none;
}

.badge.green {
  background: #e8f2ff;
  color: #06c;
}

.badge.blue {
  background: #f0f4f8;
  color: #1d1d1f;
}

.badge.coral {
  background: #fff1f0;
  color: var(--coral);
}

.favorite-star {
  color: rgba(29, 29, 31, 0.36);
}

.favorite-star.active {
  color: #f5a700;
}

.option-button {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--text);
  box-shadow: none;
}

.option-key {
  background: #f5f5f7;
  color: var(--muted);
  box-shadow: none;
}

.option-text {
  color: var(--text);
  font-weight: 600;
}

.option-button.selected,
.option-button.correct {
  border-color: rgba(0, 113, 227, 0.34);
  background: #f0f7ff;
}

.option-button.selected .option-key,
.option-button.correct .option-key {
  background: #0071e3;
  color: #fff;
}

.option-button.wrong {
  border-color: rgba(215, 0, 21, 0.3);
  background: #fff2f2;
}

.option-button.wrong .option-key {
  background: var(--coral);
  color: #fff;
}

.answer-panel {
  border: 1px solid rgba(245, 166, 35, 0.28);
  background: #fff8e6;
  box-shadow: inset 5px 0 0 #f5a700;
}

.answer-panel strong {
  color: var(--text);
}

.answer-panel p {
  color: #4d4332;
}

.practice-dock {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}

.tab-button,
.soft-button,
.chip,
.number-button,
.dock-menu-button {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
}

.tab-button.active,
.chip.active,
.number-button.current {
  border-color: #0071e3;
  background: #0071e3;
  color: #fff;
  box-shadow: none;
}

.solid-button {
  border-color: #0071e3;
  background: #0071e3;
  color: #fff;
  box-shadow: none;
}

.solid-button:disabled,
.soft-button:disabled {
  border-color: rgba(0, 0, 0, 0.08);
  background: #f5f5f7;
  color: rgba(29, 29, 31, 0.32);
  opacity: 1;
  filter: none;
}

.dock-menu-button span {
  background: #1d1d1f;
}

.verify-input,
.search-input,
.note-box,
.number-input {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--text);
  box-shadow: none;
}

.verify-input {
  letter-spacing: 0.08em;
}

.verify-card {
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.1);
}

.verify-submit {
  color: #fff;
}

.empty-state {
  display: grid;
  min-height: 100%;
  align-content: center;
  color: var(--muted);
}

.empty-state h2 {
  color: var(--text);
}

.empty-practice-area {
  grid-template-rows: 1fr !important;
}

.utility-backdrop {
  background: rgba(245, 245, 247, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.utility-sheet {
  background: #fff;
}

.stat {
  border-color: rgba(0, 0, 0, 0.08);
  background: #fbfbfd;
}

.stat strong,
.score-ring {
  color: var(--text);
}

.review-option,
.answer-pill,
.review-explanation {
  border-color: rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--text);
}

.review-option.correct-answer,
.answer-pill.correct {
  border-color: rgba(36, 138, 61, 0.28);
  background: #f0fff4;
  color: var(--ok);
}

.review-option.wrong-answer,
.answer-pill.wrong {
  border-color: rgba(215, 0, 21, 0.28);
  background: #fff2f2;
  color: var(--bad);
}

body.practice-fit .layout.practice-layout {
  max-width: 430px;
}

body.practice-fit .practice-study-area .question-card {
  border-radius: 30px;
}

body.practice-fit .practice-dock {
  border-radius: 24px;
}

/* Navigation cleanup: favorites live in the question star, so the dock keeps five lean modes. */
.dock-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.nav-icon-button {
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.nav-icon-button span {
  display: block;
  transform: translateY(-0.5px);
}

body.practice-fit .practice-dock .practice-toolbar .nav-icon-button {
  font-size: 17px;
  letter-spacing: 0;
}

body.practice-fit .dock-tabs .tab-button[data-mode="exam300"] {
  font-size: 9.5px;
}

/* Reading rhythm polish inspired by clean chapter-practice apps, without their red palette. */
body,
button,
input,
textarea {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

body {
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f8fa 48%, #f2f4f7 100%),
    #f7f8fa;
}

body.practice-fit .layout.practice-layout {
  max-width: 430px;
  padding: 22px 12px calc(10px + env(safe-area-inset-bottom));
}

body.practice-fit .practice-screen {
  min-height: calc(100svh - 32px - env(safe-area-inset-bottom));
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

body.practice-fit .practice-study-area {
  grid-template-rows: minmax(0, auto) 82px;
  align-content: start;
  gap: 10px;
}

body.practice-fit .practice-study-area .question-card {
  padding: 17px 14px 15px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 29px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

body.practice-fit .question-head {
  margin-bottom: 12px;
}

body.practice-fit .badges {
  gap: 7px;
}

body.practice-fit .badge {
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
}

.favorite-star {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: rgba(60, 60, 67, 0.34);
  box-shadow: none;
}

.favorite-star.active {
  color: #ffb400;
}

body.practice-fit .favorite-star {
  width: 28px;
  height: 28px;
}

body.practice-fit .favorite-icon {
  width: 20px;
  height: 20px;
}

body.practice-fit .question-index {
  color: rgba(60, 60, 67, 0.72);
  font-size: 13px;
  font-weight: 650;
}

body.practice-fit .practice-study-area .question-text {
  font-size: 17px;
  line-height: 1.44;
  font-weight: 560;
  color: #24262b;
}

body.practice-fit .density-medium .question-text {
  font-size: 16.2px;
  line-height: 1.4;
}

body.practice-fit .density-tight .question-text {
  font-size: 15px;
  line-height: 1.34;
}

body.practice-fit .density-ultra .question-text {
  font-size: 13.6px;
  line-height: 1.28;
}

body.practice-fit .density-micro .question-text {
  font-size: 12.7px;
  line-height: 1.22;
}

body.practice-fit .practice-study-area .options {
  gap: 8px;
  margin-top: 12px;
}

.option-button,
.review-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

body.practice-fit .practice-study-area .option-button,
.review-option {
  min-height: 48px;
  padding: 7px 11px;
  border-radius: 20px;
  border-color: rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.option-key {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
  font-size: 15px;
  font-weight: 620;
  line-height: 1;
  background: #eceef2;
  color: rgba(60, 60, 67, 0.72);
}

body.practice-fit .practice-study-area .option-key,
.review-option .option-key {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
}

.option-key.wide {
  width: auto;
  min-width: 58px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13.5px;
}

body.practice-fit .density-tight .option-key.wide,
body.practice-fit .density-ultra .option-key.wide,
body.practice-fit .density-micro .option-key.wide {
  min-width: 52px;
  padding: 0 10px;
  font-size: 12px;
}

body.practice-fit .practice-study-area .option-key.wide,
.review-option .option-key.wide {
  width: auto;
  min-width: 58px;
  height: 38px;
  border-radius: 999px;
}

body.practice-fit .practice-study-area .option-text {
  padding-top: 0;
  font-size: 15.8px;
  line-height: 1.36;
  font-weight: 500;
  color: #2f3338;
}

body.practice-fit .density-tight .option-text {
  font-size: 14.4px;
  line-height: 1.28;
}

body.practice-fit .density-ultra .option-text {
  font-size: 13px;
  line-height: 1.22;
}

body.practice-fit .density-micro .option-text {
  font-size: 12px;
  line-height: 1.18;
}

.option-button.selected,
.option-button.correct {
  border-color: rgba(0, 122, 255, 0.24);
  background: #f1f8ff;
}

.option-button.selected .option-key,
.option-button.correct .option-key {
  background: #007aff;
  color: #fff;
}

.option-button.wrong {
  border-color: rgba(255, 59, 48, 0.22);
  background: #fff4f3;
}

.option-button.wrong .option-key {
  background: #ff3b30;
  color: #fff;
}

.answer-panel {
  border: 1px solid rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 250, 255, 0.6)),
    rgba(255, 255, 255, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 34px rgba(15, 23, 42, 0.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.7);
  backdrop-filter: blur(24px) saturate(1.7);
}

.answer-panel.answer-panel-outside {
  border-color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(244, 248, 255, 0.58)),
    rgba(255, 255, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.45),
    0 18px 42px rgba(15, 23, 42, 0.08);
}

.answer-panel strong {
  color: rgba(22, 25, 30, 0.96);
}

.answer-panel p {
  color: rgba(60, 60, 67, 0.76);
}

.answer-placeholder {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: none;
  opacity: 0;
}

body.practice-fit .answer-panel-outside {
  height: 82px;
  min-height: 82px;
  max-height: 82px;
  border-radius: 20px;
}

/* Final polish: clipped answers, calmer wrong-question header, and softer macaron blue. */
:root {
  --green: #7ccfff;
  --green-2: #6ec4f5;
  --blue: #5eb7ec;
  --apple-blue: #7ccfff;
}

.badge.green {
  background: rgba(124, 207, 255, 0.18);
  color: #1977a8;
}

.badge.blue {
  background: rgba(235, 241, 248, 0.9);
  color: #2d3746;
}

.tab-button.active,
.chip.active,
.number-button.current {
  border-color: rgba(124, 207, 255, 0.7);
  background: #7ccfff;
  color: #073f61;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 10px 22px rgba(124, 207, 255, 0.28);
}

.solid-button {
  border-color: rgba(124, 207, 255, 0.72);
  background: #7ccfff;
  color: #073f61;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 12px 24px rgba(124, 207, 255, 0.28);
}

.option-button.selected,
.option-button.correct {
  border-color: rgba(124, 207, 255, 0.42);
  background: rgba(243, 251, 255, 0.98);
}

.option-button.selected .option-key,
.option-button.correct .option-key {
  background: #7ccfff;
  color: #073f61;
}

.answer-panel.answer-panel-outside {
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(243, 249, 255, 0.56)),
    rgba(255, 255, 255, 0.5);
}

body.practice-fit .answer-panel.answer-panel-outside {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 5px;
  overflow: hidden;
  padding: 10px 13px;
}

body.practice-fit .answer-panel.answer-panel-outside strong {
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.practice-fit .answer-panel.answer-panel-outside p {
  display: -webkit-box;
  max-height: 35px;
  overflow: hidden;
  margin: 0;
  color: rgba(60, 60, 67, 0.74);
  font-size: 12.8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Utility sheet stability: keep the page still and bring the panel into view immediately. */
body.utility-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body.utility-open .utility-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.42), rgba(245, 248, 252, 0.34)),
    rgba(247, 249, 253, 0.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  backdrop-filter: blur(22px) saturate(1.45);
  touch-action: none;
}

body.utility-open .utility-sheet {
  position: fixed;
  right: 12px;
  bottom: calc(122px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 90;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: auto;
  max-width: 430px;
  max-height: min(44svh, 380px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(246, 250, 255, 0.58)),
    rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.42),
    0 18px 52px rgba(15, 23, 42, 0.14);
  padding: 10px;
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  backdrop-filter: blur(28px) saturate(1.7);
  touch-action: auto;
}

body.utility-open .utility-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.utility-open .utility-body .panel {
  max-height: none;
  overflow: visible;
}

body.utility-open .utility-nav {
  overflow-x: auto;
  padding: 6px 0 8px;
  scrollbar-width: none;
}

body.utility-open .utility-nav::-webkit-scrollbar {
  display: none;
}

body.utility-open .utility-nav .chip {
  flex: 0 0 auto;
}

body.utility-open .glass-menu-button {
  display: none;
}

body.utility-open .practice-dock {
  pointer-events: none;
  opacity: 0.82;
}

@media (max-width: 380px) {
  body.utility-open .utility-sheet {
    right: 9px;
    bottom: calc(116px + env(safe-area-inset-bottom));
    left: 9px;
    max-height: min(46svh, 360px);
    border-radius: 24px;
  }
}

/* Final answer-state and Safari scroll-restoration fixes. */
html,
body {
  overflow-x: hidden;
}

body.practice-fit {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
}

body.practice-fit .app-shell {
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

body.practice-fit .layout.practice-layout {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100svh;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  padding-top: calc(18px + env(safe-area-inset-top));
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.option-button.selected:not(.correct):not(.wrong) {
  border-color: rgba(100, 210, 255, 0.38);
  background: rgba(245, 252, 255, 0.96);
}

.option-button.selected:not(.correct):not(.wrong) .option-key {
  background: #64d2ff;
  color: #07354d;
}

.option-button.correct {
  border-color: rgba(52, 199, 89, 0.34);
  background:
    linear-gradient(180deg, rgba(245, 255, 248, 0.98), rgba(234, 250, 240, 0.94)),
    rgba(52, 199, 89, 0.08);
}

.option-button.correct .option-key {
  background: #34c759;
  color: #fff;
}

.option-button.wrong {
  border-color: rgba(255, 69, 58, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 247, 246, 0.98), rgba(255, 238, 236, 0.94)),
    rgba(255, 69, 58, 0.08);
}

.option-button.wrong .option-key {
  background: #ff453a;
  color: #fff;
}

.option-button.correct.selected .option-key {
  background: #30d158;
}

.option-button.correct.selected {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(52, 199, 89, 0.08);
}

.option-button.wrong.selected {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(255, 69, 58, 0.1);
}

/* Right-hand dock layout: actions on the left, previous/next on the thumb side. */
.practice-dock .practice-toolbar,
body.practice-fit .practice-dock .practice-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 9px;
  align-items: stretch;
  width: 100%;
}

.dock-action-group,
.dock-step-group {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.dock-action-group {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dock-step-group {
  grid-template-columns: repeat(2, minmax(58px, 1fr));
}

.practice-dock .dock-action-group button,
.practice-dock .dock-step-group button,
body.practice-fit .practice-dock .dock-action-group button,
body.practice-fit .practice-dock .dock-step-group button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  border-radius: 21px;
  font-size: 12px;
  line-height: 1;
}

body.practice-fit .practice-dock .dock-step-group .nav-icon-button {
  min-height: 48px;
  border-radius: 24px;
  font-size: 20px;
  font-weight: 760;
}

.memorize-button.active {
  border-color: rgba(255, 159, 10, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(255, 238, 204, 0.86)),
    rgba(255, 159, 10, 0.12);
  color: #7a4300;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 22px rgba(255, 159, 10, 0.14);
}

.dock-nav-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  align-items: stretch;
  margin-top: 2px;
}

.dock-tabs {
  display: contents;
}

.dock-tabs .tab-button,
.dock-menu-button,
body.practice-fit .dock-tabs .tab-button,
body.practice-fit .dock-menu-button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 1px;
  border-radius: 20px;
  font-size: 10.5px;
}

body.practice-fit .dock-tabs .tab-button[data-mode="exam300"] {
  font-size: 9px;
}

.dock-menu-button {
  gap: 4px;
}

.dock-menu-button span {
  width: 16px;
}

@media (max-width: 380px) {
  .practice-dock .practice-toolbar,
  body.practice-fit .practice-dock .practice-toolbar {
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 7px;
  }

  .dock-action-group,
  .dock-step-group,
  .dock-nav-row {
    gap: 6px;
  }

  .dock-step-group {
    grid-template-columns: repeat(2, minmax(54px, 1fr));
  }

  .practice-dock .dock-action-group button,
  .practice-dock .dock-step-group button,
  body.practice-fit .practice-dock .dock-action-group button,
  body.practice-fit .practice-dock .dock-step-group button {
    min-height: 42px;
    font-size: 11.2px;
  }

  body.practice-fit .practice-dock .dock-step-group .nav-icon-button {
    min-height: 46px;
    font-size: 19px;
  }

  .dock-tabs .tab-button,
  .dock-menu-button,
  body.practice-fit .dock-tabs .tab-button,
  body.practice-fit .dock-menu-button {
    min-height: 38px;
  }
}

/* Consistent reading type and no accidental double-tap zoom while rushing questions. */
html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body.practice-fit,
body.practice-fit .app-shell,
body.practice-fit .layout.practice-layout,
body.practice-fit .question-card,
body.practice-fit .option-button,
body.practice-fit .practice-dock,
body.practice-fit .practice-dock button {
  touch-action: manipulation;
}

body.practice-fit .practice-study-area .question-text,
body.practice-fit .density-medium .question-text,
body.practice-fit .density-tight .question-text,
body.practice-fit .density-ultra .question-text,
body.practice-fit .density-micro .question-text {
  font-size: 17px;
  line-height: 1.44;
  font-weight: 560;
}

body.practice-fit .practice-study-area .option-text,
body.practice-fit .density-tight .option-text,
body.practice-fit .density-ultra .option-text,
body.practice-fit .density-micro .option-text {
  font-size: 15.8px;
  line-height: 1.36;
  font-weight: 500;
}

body.practice-fit .density-tight .option-key.wide,
body.practice-fit .density-ultra .option-key.wide,
body.practice-fit .density-micro .option-key.wide {
  min-width: 58px;
  padding: 0 12px;
  font-size: 13.5px;
}

/* Practice answer comparison, inspired by the 233 answer-result strip. */
body.practice-fit .practice-study-area {
  grid-template-rows: minmax(0, auto) 76px;
}

body.practice-fit .answer-panel.answer-panel-outside {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 76px;
  min-height: 76px;
  max-height: 76px;
  gap: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 250, 255, 0.58)),
    rgba(255, 255, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 18px 42px rgba(15, 23, 42, 0.08);
  -webkit-backdrop-filter: blur(26px) saturate(1.7);
  backdrop-filter: blur(26px) saturate(1.7);
}

.answer-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.answer-compare-cell {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  gap: 2px;
  padding: 5px 8px;
}

.answer-compare-cell + .answer-compare-cell {
  border-left: 1px solid rgba(60, 60, 67, 0.1);
}

.answer-compare-cell span {
  color: rgba(60, 60, 67, 0.58);
  font-size: 11.5px;
  font-weight: 520;
  line-height: 1.05;
}

body.practice-fit .answer-panel .answer-compare-cell strong {
  max-width: 100%;
  overflow: hidden;
  color: #34c759;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.practice-fit .answer-panel .answer-compare-mine-correct strong {
  color: #34c759;
}

body.practice-fit .answer-panel .answer-compare-mine-wrong strong {
  color: #ff453a;
}

body.practice-fit .answer-panel.answer-panel-outside .answer-explanation {
  display: -webkit-box;
  max-height: 40px;
  overflow: hidden;
  margin: 0;
  color: rgba(60, 60, 67, 0.72);
  font-size: 12px;
  line-height: 1.48;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 380px) {
  body.practice-fit .practice-study-area {
    grid-template-rows: minmax(0, auto) 74px;
  }

  body.practice-fit .answer-panel.answer-panel-outside {
    grid-template-rows: minmax(0, 1fr);
    height: 74px;
    min-height: 74px;
    max-height: 74px;
    border-radius: 22px;
    padding: 9px 10px;
  }

  body.practice-fit .answer-panel .answer-compare-cell strong {
    font-size: 18px;
  }

  body.practice-fit .answer-panel.answer-panel-outside .answer-explanation {
    font-size: 11.5px;
    line-height: 1.45;
    max-height: 36px;
  }
}

/* Header type switcher: move 单选/多选/判断 beside the bank type label. */
body.practice-fit .question-head {
  align-items: flex-start;
  gap: 8px;
}

body.practice-fit .question-head .badges {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

body.practice-fit .category-badge {
  order: 0;
  flex: 0 1 auto;
  max-width: min(46vw, 176px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-type-tabs {
  order: 1;
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.header-type-tab {
  display: inline-grid;
  min-width: 34px;
  min-height: 25px;
  place-items: center;
  border: 1px solid rgba(60, 60, 67, 0.07);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 250, 255, 0.58)),
    rgba(255, 255, 255, 0.54);
  color: rgba(29, 29, 31, 0.72);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  padding: 0 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 5px 14px rgba(15, 23, 42, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
  backdrop-filter: blur(18px) saturate(1.45);
}

.header-type-tab.active {
  border-color: rgba(68, 177, 232, 0.24);
  background:
    linear-gradient(180deg, rgba(196, 237, 255, 0.9), rgba(159, 222, 252, 0.76)),
    rgba(125, 211, 252, 0.38);
  color: #075985;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(56, 189, 248, 0.13);
}

body.practice-fit .favorite-star {
  order: 2;
  flex: 0 0 auto;
}

body.practice-fit .badges > .badge.coral,
body.practice-fit .badges > .badge.green:not(.category-badge),
body.practice-fit .badges > .badge.blue:not(.category-badge) {
  order: 3;
}

body.practice-fit .question-index {
  flex: 0 0 auto;
  padding-top: 2px;
}

/* Bottom dock now keeps secondary destinations only: 错题 / 模拟考试 / 更多. */
.dock-nav-row,
body.practice-fit .dock-nav-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dock-secondary-tabs .tab-button,
.dock-menu-button,
body.practice-fit .dock-secondary-tabs .tab-button,
body.practice-fit .dock-menu-button {
  min-height: 42px;
  border-radius: 22px;
  font-size: 12px;
}

body.practice-fit .dock-secondary-tabs .tab-button[data-mode="exam300"] {
  font-size: 11px;
}

@media (max-width: 380px) {
  body.practice-fit .category-badge {
    max-width: min(42vw, 142px);
  }

  .header-type-tabs {
    gap: 4px;
  }

  .header-type-tab {
    min-width: 31px;
    min-height: 24px;
    padding: 0 7px;
    font-size: 10.5px;
  }

  .dock-nav-row,
  body.practice-fit .dock-nav-row {
    gap: 7px;
  }

  .dock-secondary-tabs .tab-button,
  .dock-menu-button,
  body.practice-fit .dock-secondary-tabs .tab-button,
  body.practice-fit .dock-menu-button {
    min-height: 40px;
    font-size: 11px;
  }
}

/* Chrome/iOS tight-height guard: long questions scroll inside the card, never over the dock. */
body.practice-fit,
body.practice-fit .app-shell,
body.practice-fit .layout.practice-layout {
  height: 100svh;
  min-height: 100svh;
}

@supports (height: 100dvh) {
  body.practice-fit,
  body.practice-fit .app-shell,
  body.practice-fit .layout.practice-layout {
    height: 100dvh;
    min-height: 100dvh;
  }
}

body.practice-fit .layout.practice-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

body.practice-fit .practice-workspace,
body.practice-fit .practice-screen {
  display: grid;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body.practice-fit .practice-workspace {
  grid-template-rows: minmax(0, 1fr);
}

body.practice-fit .practice-screen {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}

body.practice-fit .practice-study-area {
  grid-template-rows: minmax(0, 1fr) 76px;
  align-content: stretch;
  min-height: 0;
  overflow: hidden;
}

body.practice-fit .practice-study-area .question-card {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

body.practice-fit .practice-study-area .question-card::-webkit-scrollbar {
  display: none;
}

body.practice-fit .practice-dock {
  flex: 0 0 auto;
}

@media (max-width: 380px) {
  body.practice-fit .practice-study-area {
    grid-template-rows: minmax(0, 1fr) 74px;
  }
}

/* Category picker and long-option polish. */
.category-select {
  order: 0;
  flex: 0 1 auto;
  max-width: min(46vw, 180px);
  min-height: 25px;
  border: 1px solid rgba(60, 60, 67, 0.07);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(248, 250, 255, 0.9), rgba(239, 243, 250, 0.74)),
    rgba(255, 255, 255, 0.58);
  color: rgba(29, 29, 31, 0.82);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  padding: 0 22px 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(60, 60, 67, 0.62) 50%),
    linear-gradient(135deg, rgba(60, 60, 67, 0.62) 50%, transparent 50%),
    linear-gradient(180deg, rgba(248, 250, 255, 0.9), rgba(239, 243, 250, 0.74));
  background-position:
    calc(100% - 12px) 50%,
    calc(100% - 8px) 50%,
    0 0;
  background-size:
    4px 4px,
    4px 4px,
    100% 100%;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 5px 14px rgba(15, 23, 42, 0.05);
}

body.practice-fit .practice-study-area .option-button {
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 8px;
  padding-right: 12px;
  padding-left: 9px;
}

body.practice-fit .density-tight .option-button,
body.practice-fit .density-ultra .option-button,
body.practice-fit .density-micro .option-button {
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 8px;
}

body.practice-fit .practice-study-area .option-key {
  justify-self: center;
  align-self: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

body.practice-fit .practice-study-area .option-text {
  min-width: 0;
  padding-left: 1px;
}

body.practice-fit .practice-study-area .question-card {
  scrollbar-width: thin;
  scrollbar-color: rgba(60, 60, 67, 0.28) transparent;
}

body.practice-fit .practice-study-area .question-card::-webkit-scrollbar {
  display: block;
  width: 3px;
}

body.practice-fit .practice-study-area .question-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(60, 60, 67, 0.26);
}

@media (max-width: 380px) {
  .category-select {
    max-width: min(42vw, 146px);
    min-height: 24px;
    padding-right: 20px;
    font-size: 10.5px;
  }

  body.practice-fit .practice-study-area .option-button,
  body.practice-fit .density-tight .option-button,
  body.practice-fit .density-ultra .option-button,
  body.practice-fit .density-micro .option-button {
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 7px;
    padding-left: 8px;
  }

  body.practice-fit .practice-study-area .option-key {
    width: 36px;
    min-width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
}

.category-picker {
  order: 0;
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-width: 0;
  max-width: min(46vw, 180px);
}

.category-select-button {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 25px;
  min-width: 0;
  border: 1px solid rgba(60, 60, 67, 0.07);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(248, 250, 255, 0.9), rgba(239, 243, 250, 0.74)),
    rgba(255, 255, 255, 0.58);
  color: rgba(29, 29, 31, 0.82);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  padding: 0 9px 0 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 5px 14px rgba(15, 23, 42, 0.05);
}

.category-select-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-caret {
  color: rgba(60, 60, 67, 0.58);
  font-size: 12px;
  line-height: 1;
}

.category-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  border: 0;
  background: rgba(246, 248, 251, 0.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.category-popover {
  position: fixed;
  top: calc(88px + env(safe-area-inset-top));
  right: 14px;
  left: 14px;
  z-index: 181;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 430px;
  max-height: min(50svh, 420px);
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94)),
    rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 24px 60px rgba(15, 23, 42, 0.22);
  padding: 10px;
  -webkit-backdrop-filter: blur(26px) saturate(1.65);
  backdrop-filter: blur(26px) saturate(1.65);
}

.category-popover-title {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 4px 2px;
}

.category-popover-title strong {
  color: rgba(29, 29, 31, 0.92);
  font-size: 14px;
  font-weight: 760;
}

.category-popover-title span {
  color: rgba(60, 60, 67, 0.56);
  font-size: 12px;
  font-weight: 650;
}

.category-option {
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(60, 60, 67, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(29, 29, 31, 0.86);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.18;
  padding: 0 8px;
}

.category-option.active {
  border-color: rgba(68, 177, 232, 0.26);
  background:
    linear-gradient(180deg, rgba(196, 237, 255, 0.92), rgba(159, 222, 252, 0.78)),
    rgba(125, 211, 252, 0.4);
  color: #075985;
}

@media (max-width: 380px) {
  .category-picker {
    max-width: min(42vw, 146px);
  }

  .category-select-button {
    min-height: 24px;
    font-size: 10.5px;
    padding-right: 8px;
  }

  .category-popover {
    grid-template-columns: 1fr;
    top: calc(76px + env(safe-area-inset-top));
    max-height: min(54svh, 430px);
  }
}

/* Final mobile stability pass: use native category selection and a conservative viewport. */
body.practice-fit,
body.practice-fit .app-shell,
body.practice-fit .layout.practice-layout {
  height: 100svh !important;
  min-height: 100svh !important;
  max-height: 100svh !important;
  overflow: hidden;
}

body.practice-fit .layout.practice-layout {
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

body.practice-fit .practice-screen {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}

body.practice-fit .practice-study-area {
  grid-template-rows: minmax(0, 1fr) 72px;
  min-height: 0;
  overflow: hidden;
}

body.practice-fit .practice-study-area .question-card {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.practice-fit .answer-panel.answer-panel-outside {
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  padding: 8px 10px;
}

body.practice-fit .category-select {
  order: 0;
  display: inline-grid;
  flex: 0 1 auto;
  width: auto;
  max-width: min(37vw, 156px);
  min-height: 28px;
  border: 1px solid rgba(60, 60, 67, 0.08);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.66);
  color: rgba(29, 29, 31, 0.86);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0 22px 0 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 6px 16px rgba(15, 23, 42, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
  backdrop-filter: blur(18px) saturate(1.45);
}

body.practice-fit .category-select:focus {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 3px rgba(116, 208, 247, 0.18),
    0 8px 20px rgba(15, 23, 42, 0.06);
}

body.practice-fit .category-picker,
body.practice-fit .category-picker-backdrop,
body.practice-fit .category-popover {
  display: none !important;
}

@media (max-width: 380px) {
  body.practice-fit .layout.practice-layout {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  body.practice-fit .practice-study-area {
    grid-template-rows: minmax(0, 1fr) 70px;
  }

  body.practice-fit .answer-panel.answer-panel-outside {
    height: 70px;
    min-height: 70px;
    max-height: 70px;
  }

  body.practice-fit .category-select {
    max-width: min(35vw, 136px);
    min-height: 26px;
    font-size: 10.5px;
    padding-left: 9px;
    padding-right: 20px;
  }
}

.actual-category-badge {
  max-width: min(28vw, 112px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-cue {
  display: inline-grid;
  min-height: 1.28em;
  place-items: center;
  margin-left: 0.35em;
  border: 1px solid rgba(52, 199, 89, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(233, 255, 241, 0.92), rgba(212, 250, 225, 0.76)),
    rgba(52, 199, 89, 0.12);
  color: #1f9d55;
  font-size: 0.72em;
  font-weight: 760;
  line-height: 1;
  padding: 0.08em 0.42em;
  vertical-align: 0.12em;
}

.exam-start-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  border: 0;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.48), rgba(245, 248, 252, 0.38)),
    rgba(247, 249, 253, 0.54);
  -webkit-backdrop-filter: blur(20px) saturate(1.45);
  backdrop-filter: blur(20px) saturate(1.45);
}

.exam-start-sheet {
  position: fixed;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 14px;
  z-index: 181;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-width: 430px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 250, 255, 0.68)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 24px 64px rgba(15, 23, 42, 0.2);
  padding: 12px;
  -webkit-backdrop-filter: blur(30px) saturate(1.75);
  backdrop-filter: blur(30px) saturate(1.75);
}

.exam-start-title {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 4px 2px;
}

.exam-start-title strong {
  color: rgba(29, 29, 31, 0.94);
  font-size: 15px;
  font-weight: 780;
}

.exam-start-title span {
  color: rgba(60, 60, 67, 0.58);
  font-size: 12px;
  font-weight: 650;
}

.exam-kind-option {
  display: grid;
  align-content: center;
  min-height: 68px;
  min-width: 0;
  border: 1px solid rgba(60, 60, 67, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 255, 0.66)),
    rgba(255, 255, 255, 0.62);
  color: rgba(29, 29, 31, 0.9);
  gap: 5px;
  padding: 0 12px;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 20px rgba(15, 23, 42, 0.05);
}

.exam-kind-option span {
  font-size: 14px;
  font-weight: 760;
}

.exam-kind-option small {
  color: rgba(60, 60, 67, 0.58);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.exam-kind-option:disabled {
  opacity: 0.42;
}

.exam-timer {
  color: #ff453a;
  font-weight: 720;
}

.dock-nav-row,
body.practice-fit .dock-nav-row {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

body.practice-fit .dock-secondary-tabs .tab-button[data-mode="judgeCorrect"],
body.practice-fit .dock-secondary-tabs .tab-button[data-mode="allSelect"],
body.practice-fit .dock-secondary-tabs .tab-button[data-mode="exam300"] {
  font-size: 9.5px;
}

@media (max-width: 380px) {
  .actual-category-badge {
    max-width: min(25vw, 92px);
  }

  .exam-start-sheet {
    grid-template-columns: 1fr;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .dock-secondary-tabs .tab-button,
  .dock-menu-button,
  body.practice-fit .dock-secondary-tabs .tab-button,
  body.practice-fit .dock-menu-button {
    font-size: 10.5px;
  }

  body.practice-fit .dock-secondary-tabs .tab-button[data-mode="judgeCorrect"],
  body.practice-fit .dock-secondary-tabs .tab-button[data-mode="allSelect"],
  body.practice-fit .dock-secondary-tabs .tab-button[data-mode="exam300"] {
    font-size: 8.8px;
  }
}

/* The bottom dock owns "更多"; the legacy floating menu can cover exam cards. */
.glass-menu-button {
  display: none !important;
}
