:root {
  color-scheme: light;
  --brand: #d31145;
  --brand-bg: #fff1f4;
  --brand-line: rgba(211, 17, 69, 0.18);
  --purple: #4c4794;
  --purple-bg: #f3f2fb;
  --blue: #1f78ad;
  --blue-bg: #edf7fc;
  --text: #1f1f1f;
  --sub: #595959;
  --muted: #8c8c8c;
  --line: rgba(5, 5, 5, 0.08);
  --bg: #f5f5f5;
  --card: #fff;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 0 1px var(--line);
}

.catalog-page {
  min-height: 100vh;
  background: #fff;
  padding-bottom: 28px;
}

.catalog-header {
  min-height: 64px;
  padding: 12px 16px 10px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.course-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
}

.catalog-header h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.catalog-back,
.catalog-folder,
.catalog-sort {
  border: 0;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.catalog-back {
  width: 36px;
  height: 36px;
  margin-left: -8px;
}

.catalog-back svg {
  width: 22px;
  height: 22px;
  stroke-width: 3;
  transform: rotate(180deg);
}

.catalog-folder {
  gap: 5px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.catalog-folder svg {
  width: 18px;
  height: 18px;
}

.catalog-search-row {
  padding: 18px 16px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
}

.catalog-search {
  height: 42px;
  min-width: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.catalog-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.catalog-search input::placeholder {
  color: #bfbfbf;
}

.catalog-sort {
  width: 36px;
  height: 36px;
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
}

.catalog-tabs {
  padding: 0 16px 20px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.catalog-tabs::-webkit-scrollbar {
  display: none;
}

.catalog-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 12px;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.catalog-tabs button.active {
  color: #fff;
  background: var(--brand);
}

.catalog-list {
  padding: 6px 16px 0;
  display: grid;
  gap: 22px;
}

.catalog-item {
  width: 100%;
  display: grid;
  gap: 10px;
}

.catalog-main {
  width: 100%;
  border: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  text-align: left;
  background: transparent;
}

.catalog-cover {
  width: 108px;
  height: 108px;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: var(--brand-bg);
  box-shadow: inset 0 0 0 1px var(--line);
}

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

.catalog-cover em {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 7px 4px;
  border-radius: 0 0 9px 0;
  background: rgba(255, 241, 244, 0.94);
  color: rgba(211, 17, 69, 0.68);
  font-size: 13px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 600;
}

.catalog-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.catalog-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.catalog-copy strong {
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.ai-analysis-tag {
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #f05a82);
  box-shadow: 0 4px 10px rgba(211, 17, 69, 0.16);
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.catalog-copy > span:not(.catalog-title-row) {
  color: #707070;
  font-size: 16px;
  line-height: 1.2;
}

.catalog-item.active .catalog-cover {
  box-shadow: 0 0 0 2px rgba(211, 17, 69, 0.16);
}

.catalog-progress {
  margin-left: 132px;
  display: grid;
  gap: 8px;
}

.catalog-progress-btn {
  width: 100%;
  border: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  text-align: left;
  background: transparent;
}

.progress-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.progress-title strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

.progress-title em {
  color: var(--brand);
  font-size: 13px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 800;
}

.progress-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f0f0;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #f06286);
}

.progress-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.progress-detail {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  background: var(--brand-bg);
}

.progress-detail div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.progress-detail strong {
  color: var(--brand);
  font-size: 12px;
  line-height: 1.2;
}

.progress-detail span {
  color: var(--sub);
  font-size: 11px;
  line-height: 1.35;
}

.progress-detail span.done {
  color: var(--text);
  font-weight: 600;
}

.progress-journey {
  grid-template-columns: 1fr;
  gap: 6px;
}

.progress-journey > strong {
  color: var(--brand);
  font-size: 12px;
  line-height: 1.3;
}

.catalog-course-card {
  position: relative;
  padding: 12px 16px 14px;
  border: 1px solid rgba(211, 17, 69, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 88%, rgba(211, 17, 69, 0.08), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 249, 0.94));
  box-shadow:
    0 18px 42px rgba(33, 21, 26, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.catalog-course-card.no-ai {
  border-color: rgba(33, 21, 26, 0.08);
  background:
    radial-gradient(circle at 92% 88%, rgba(33, 21, 26, 0.04), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 247, 0.92));
}

.catalog-course-card.is-ai-pending {
  border-color: rgba(211, 17, 69, 0.2);
  background:
    radial-gradient(circle at 92% 82%, rgba(211, 17, 69, 0.1), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 248, 0.95));
}

.featured-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.featured-status-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-status {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}

.catalog-course-card.is-complete .featured-status {
  color: #15945b;
}

.catalog-course-card.is-pending .featured-status {
  color: var(--brand);
}

.catalog-course-card.is-learning .featured-status {
  color: #d97904;
}

.featured-learners {
  flex: 0 0 auto;
  color: rgba(33, 21, 26, 0.42);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.featured-divider {
  display: block;
  height: 1px;
  margin: 9px 0 10px;
  background: rgba(33, 21, 26, 0.1);
}

.featured-main {
  width: 100%;
  border: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  text-align: left;
  background: transparent;
}

.featured-cover {
  width: 88px;
  height: 88px;
}

.featured-copy {
  gap: 6px;
}

.featured-copy strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.32;
  font-weight: 900;
}

.pending-ai-guide {
  width: fit-content;
  margin-top: 3px;
  display: grid;
  gap: 5px;
}

.pending-ai-guide > span {
  color: rgba(33, 21, 26, 0.48);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
}

.pending-ai-guide em {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--brand);
  font-size: 12px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 900;
}

.pending-ai-guide svg {
  width: 13px;
  height: 13px;
}

.featured-progress-panel {
  width: 100%;
  margin-top: 5px;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.featured-progress-track {
  position: relative;
  width: min(100%, 226px);
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
}

.featured-progress-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(211, 17, 69, 0.06), rgba(33, 21, 26, 0.08));
}

.featured-progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--progress);
  height: 7px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #ff7796);
  box-shadow: 0 8px 18px rgba(211, 17, 69, 0.18);
}

.featured-progress-marker {
  position: absolute;
  left: var(--progress);
  top: 50%;
  min-width: 52px;
  padding: 5px 9px;
  border: 1px solid rgba(211, 17, 69, 0.2);
  border-radius: 999px;
  color: var(--brand);
  background: #fff6f8;
  box-shadow: 0 8px 18px rgba(211, 17, 69, 0.12);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, -50%);
}

.featured-footer {
  width: 100%;
  margin: 5px 0 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  background: transparent;
  border: 0;
}

.featured-cta {
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  min-height: auto;
  padding: 0;
  color: var(--brand);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.featured-cta::after {
  content: ">";
  margin-left: 3px;
  font-size: 12px;
}

.featured-next {
  min-width: 0;
  color: rgba(33, 21, 26, 0.46);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

.featured-journey {
  margin-top: 12px;
}

.topbar {
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar-title {
  min-width: 0;
}

.topbar-title span,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.topbar-title strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.segmented {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.segmented button {
  border: 0;
  border-radius: 8px;
  min-height: 34px;
  background: transparent;
  color: var(--sub);
  font-size: 14px;
  font-weight: 600;
}

.segmented button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 2px 10px rgba(211, 17, 69, 0.14);
  border: 1px solid var(--brand-line);
}

.study-backbar {
  padding: 10px 12px 0;
}

.study-backbar .text-action svg {
  transform: rotate(180deg);
}

.content {
  padding: 12px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.course-brief,
.chapter-summary,
.audio-block,
.chapter-card,
.slide-section,
.term-card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.course-brief,
.chapter-summary,
.slide-section {
  padding: 14px;
}

.compliance-note {
  padding: 2px 4px 8px;
  display: grid;
  gap: 6px;
}

.compliance-note strong {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
}

.compliance-note p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.course-brief {
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.course-brief::before {
  display: none;
}

.course-brief > * {
  position: relative;
  z-index: 1;
}

.course-cover {
  height: 218px;
  position: relative;
  background-size: cover;
  background-position: center;
}

.cover-detail-btn {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(211, 17, 69, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 15px;
  font-weight: 800;
}

.cover-detail-btn svg {
  width: 15px;
  height: 15px;
}

.course-info {
  padding: 14px;
}

.course-source-link {
  padding-top: 2px;
}

.section-head,
.slide-head,
.chapter-card-head,
.audio-title-row,
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.25;
}

h2 {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.35;
}

h3 {
  font-size: 15px;
  line-height: 1.4;
}

p {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.65;
}

.course-brief p,
.chapter-summary p {
  margin-top: 10px;
}

.course-brief p {
  margin-top: 8px;
}

.chapter-summary p {
  margin-top: 8px;
}

.ai-notice {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(5, 5, 5, 0.12);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.course-meta-line {
  margin-top: 10px;
}

.goal {
  color: var(--text);
  font-weight: 600;
  margin-top: 6px;
  display: block;
}

.tag-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.checkable-tag {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--sub);
  background: #fafafa;
}

.tag-red {
  color: var(--brand);
  border-color: var(--brand-line);
  background: var(--brand-bg);
}

.tag-purple {
  color: var(--purple);
  border-color: rgba(76, 71, 148, 0.18);
  background: var(--purple-bg);
}

.tag-blue {
  color: var(--blue);
  border-color: rgba(31, 120, 173, 0.18);
  background: var(--blue-bg);
}

.section {
  display: grid;
  gap: 10px;
}

.source-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pdf-preview-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.pdf-preview {
  width: 100%;
  height: 620px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

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

.chapter-card {
  padding: 12px;
}

.chapter-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  justify-content: stretch;
}

.chapter-title-block {
  min-width: 0;
}

.chapter-index {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-bg);
  border: 1px solid var(--brand-line);
  font-size: 13px;
  font-weight: 700;
}

.chapter-card p {
  margin-top: 9px;
}

.key-page-details {
  margin-top: 10px;
}

.key-page-details summary {
  width: fit-content;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.key-page-details summary span {
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-bg);
  border: 1px solid rgba(31, 120, 173, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.key-page-details summary::-webkit-details-marker {
  display: none;
}

.key-page-details summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.16s ease;
}

.key-page-details[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.key-page-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.key-page {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  text-align: left;
  align-items: center;
}

.key-page span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.key-page strong {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.primary-btn,
.secondary-btn {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.primary-btn {
  color: #fff;
  background: var(--brand);
}

.secondary-btn {
  margin-top: 0;
  width: 100%;
  color: var(--brand);
  background: var(--brand-bg);
  border: 1px solid var(--brand-line);
}

.chapter-enter-btn {
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  min-height: 30px;
  padding: 5px 9px;
  background: var(--brand-bg);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chapter-enter-btn svg {
  width: 14px;
  height: 14px;
}

.audio-block {
  padding: 12px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
}

.audio-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-bg);
  border: 1px solid var(--brand-line);
}

.audio-main {
  min-width: 0;
}

.audio-duration {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.audio-block h3 {
  margin-top: 8px;
  font-size: 17px;
}

.audio-block p {
  margin-top: 4px;
}

.audio-actions {
  margin-top: 10px;
}

.audio-block audio {
  width: 100%;
  height: 36px;
  margin-top: 8px;
  accent-color: var(--brand);
}

.audio-block-compact {
  padding: 10px 12px;
}

.overview-audio-panel {
  margin-top: 12px;
  padding: 10px;
  border-top: 1px solid var(--brand-line);
  border-radius: 12px;
  background: rgba(255, 241, 244, 0.58);
}

.overview-audio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overview-audio-head h3 {
  font-size: 15px;
  line-height: 1.35;
  color: var(--brand);
}

.overview-audio-panel audio {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 34px;
  margin-top: 8px;
  accent-color: var(--brand);
}

.chapter-tabs {
  position: sticky;
  top: 51px;
  z-index: 4;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  background: rgba(245, 245, 245, 0.94);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.chapter-tabs::-webkit-scrollbar,
.slide-strip::-webkit-scrollbar {
  display: none;
}

.checkable-tag {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
}

.checkable-tag.active {
  color: var(--brand);
  border-color: var(--brand-line);
  background: var(--brand-bg);
}

.slide-head {
  align-items: center;
  min-width: 0;
}

.slide-head > div {
  min-width: 0;
}

.slide-title-with-index {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-title-with-index h2 {
  margin: 0;
}

.slide-module-meta {
  margin-top: 12px;
}

.slide-page-tabs {
  margin: 14px -14px 0;
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 14px;
  border-bottom: 1px solid rgba(33, 21, 26, 0.08);
  scrollbar-width: none;
}

.slide-page-tabs::-webkit-scrollbar {
  display: none;
}

.slide-page-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px 12px 0;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  background: transparent;
  transition: transform 0.18s ease, color 0.18s ease;
}

.slide-page-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  transition: background 0.18s ease;
}

.slide-page-tab span {
  color: rgba(33, 21, 26, 0.54);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
}

.slide-page-tab.active {
  color: var(--brand);
}

.slide-page-tab.active::after {
  background: var(--brand);
}

.slide-page-tab.active span {
  color: var(--brand);
}

.slide-page-tab:active {
  transform: scale(0.98);
}

.slide-page-summary {
  margin-top: 14px;
  padding: 0;
  background: transparent;
}

.slide-page-summary h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
}

.slide-page-summary h3 span {
  color: var(--brand);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.slide-page-summary p {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.6;
}

.term-panel {
  margin: 12px 0 10px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(211, 17, 69, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand);
  padding: 7px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 10px 24px rgba(33, 21, 26, 0.08);
  backdrop-filter: blur(12px);
}

.term-panel-head {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.term-panel-head strong {
  font-size: 12px;
}

.term-chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.term-chip-row::-webkit-scrollbar {
  display: none;
}

.term-chip {
  flex: 0 0 auto;
  min-height: 25px;
  border: 1px solid rgba(211, 17, 69, 0.14);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 244, 246, 0.82);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.slide-image {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fafafa;
}

.slide-image img {
  display: block;
  width: 100%;
  max-width: 100%;
}

.slide-strip {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.slide-thumb {
  flex: 0 0 92px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  text-align: left;
}

.slide-thumb.active {
  border-color: var(--brand);
  background: var(--brand-bg);
}

.slide-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.slide-thumb span {
  display: block;
  margin-top: 5px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 600;
}

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(33, 21, 26, 0.44);
  backdrop-filter: blur(10px);
}

.bottom-sheet {
  position: relative;
  width: min(100%, 360px);
  max-height: 70vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(145deg, #fff8f9, #fff);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  padding: 16px;
  box-shadow:
    0 28px 70px rgba(33, 21, 26, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  animation: termPopoverIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
}

.term-list {
  margin-top: 12px;
  max-height: calc(70vh - 92px);
  overflow-y: auto;
  display: grid;
}

.term-card {
  padding: 14px;
  border-radius: 18px;
  box-shadow: none;
}

.term-card.focused {
  border-color: rgba(211, 17, 69, 0.14);
  background: rgba(255, 244, 246, 0.64);
}

.term-card p {
  margin-top: 0;
  color: rgba(33, 21, 26, 0.76);
  font-size: 14px;
  line-height: 1.7;
}

.source-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-pill {
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--blue);
  border: 1px solid rgba(31, 120, 173, 0.18);
  background: var(--blue-bg);
  font-size: 11px;
  line-height: 1.5;
}

@keyframes termPopoverIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 700px) {
  body {
    padding: 18px 0;
  }

  .app-shell {
    min-height: calc(100vh - 36px);
    border-radius: 18px;
    overflow: hidden;
  }
}

/* AIA editorial refresh */
:root {
  --brand-deep: #9f0d34;
  --brand-soft: #fff4f6;
  --brand-wash: #fff8f2;
  --ink: #21151a;
  --sub: #5f5f66;
  --muted: #9996a0;
  --line: rgba(33, 21, 26, 0.09);
  --bg: #f7f1ea;
  --card: rgba(255, 255, 255, 0.94);
  --shadow: 0 14px 34px rgba(63, 39, 45, 0.08);
  --shadow-strong: 0 18px 44px rgba(95, 18, 42, 0.14);
  --font-body: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "PingFang SC", serif;
}

html,
body {
  background:
    radial-gradient(circle at 10% 0%, rgba(211, 17, 69, 0.12), transparent 28%),
    radial-gradient(circle at 100% 18%, rgba(179, 126, 64, 0.1), transparent 30%),
    linear-gradient(180deg, #fbf4ee 0%, #f4eee8 46%, #f7f1ea 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

button,
input {
  font-family: var(--font-body);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 250, 246, 0.94) 0%, rgba(247, 241, 234, 0.98) 100%),
    var(--bg);
  box-shadow:
    0 0 0 1px rgba(33, 21, 26, 0.07),
    0 24px 80px rgba(33, 21, 26, 0.14);
}

.catalog-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, transparent 36%),
    transparent;
}

.catalog-header,
.topbar {
  border-bottom-color: rgba(33, 21, 26, 0.08);
  background: rgba(255, 252, 249, 0.88);
  backdrop-filter: blur(18px);
}

.catalog-header h1,
.topbar-title strong,
h1,
h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.catalog-folder,
.text-action {
  color: var(--brand-deep);
  font-weight: 800;
}

.catalog-search-row {
  padding-top: 16px;
}

.catalog-search {
  height: 44px;
  border-color: rgba(33, 21, 26, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.catalog-sort {
  border-radius: 14px;
  background: rgba(211, 17, 69, 0.08);
}

.catalog-tabs {
  gap: 12px;
  padding-bottom: 18px;
}

.catalog-tabs button {
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(33, 21, 26, 0.82);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.catalog-tabs button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 10px 22px rgba(211, 17, 69, 0.22);
}

.catalog-tabs button:active,
.catalog-main:active,
.chapter-enter-btn:active,
.key-page:active {
  transform: scale(0.98);
}

.catalog-list {
  gap: 18px;
}

.catalog-item {
  border-radius: 24px;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.catalog-item.active {
  margin: -4px -4px 0;
  padding: 10px;
  border: 1px solid rgba(211, 17, 69, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 244, 246, 0.92), rgba(255, 255, 255, 0.9) 56%),
    #fff;
  box-shadow: var(--shadow);
}

.catalog-main {
  gap: 20px;
}

.catalog-cover {
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 14px 26px rgba(33, 21, 26, 0.12);
}

.catalog-cover em {
  border-radius: 0 0 12px 0;
  color: var(--brand);
  background: rgba(255, 244, 246, 0.96);
  font-weight: 800;
}

.catalog-copy strong {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.catalog-copy > span:not(.catalog-title-row) {
  color: rgba(33, 21, 26, 0.58);
}

.ai-analysis-tag {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(135deg, #f03b6e, var(--brand-deep));
  box-shadow: 0 8px 18px rgba(211, 17, 69, 0.2);
}

.catalog-progress {
  margin-left: 128px;
  padding-right: 2px;
}

.progress-title strong {
  color: var(--ink);
}

.progress-bar {
  height: 7px;
  background: rgba(33, 21, 26, 0.08);
}

.progress-bar span {
  background: linear-gradient(90deg, var(--brand), #ff7796);
  box-shadow: 0 0 0 1px rgba(211, 17, 69, 0.05);
}

.progress-detail {
  border-color: rgba(211, 17, 69, 0.14);
  border-radius: 16px;
  background: rgba(255, 244, 246, 0.78);
}

.content {
  gap: 14px;
  padding: 14px;
}

.course-brief,
.chapter-summary,
.chapter-card,
.slide-section,
.source-preview {
  border-color: rgba(33, 21, 26, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 249, 0.92)),
    var(--card);
  box-shadow: var(--shadow);
}

.course-brief {
  overflow: hidden;
}

.course-cover {
  height: 226px;
}

.course-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 15, 18, 0.06), rgba(20, 15, 18, 0.18)),
    radial-gradient(circle at 82% 78%, rgba(211, 17, 69, 0.26), transparent 28%);
}

.cover-detail-btn {
  z-index: 1;
  right: 16px;
  bottom: 16px;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, rgba(211, 17, 69, 0.94), rgba(159, 13, 52, 0.94));
  box-shadow: 0 14px 28px rgba(33, 21, 26, 0.24);
}

.course-info {
  padding: 16px;
}

.eyebrow {
  color: rgba(33, 21, 26, 0.46);
  font-weight: 800;
  letter-spacing: 0.08em;
}

p {
  color: var(--sub);
}

.tag,
.checkable-tag {
  border-radius: 999px;
}

.tag-red {
  color: var(--brand);
  border-color: rgba(211, 17, 69, 0.2);
  background: rgba(255, 244, 246, 0.92);
}

.overview-audio-panel {
  border: 1px solid rgba(211, 17, 69, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 244, 246, 0.96), rgba(255, 250, 246, 0.94)),
    #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.overview-audio-head h3 {
  color: var(--ink);
  font-size: 16px;
}

.overview-audio-panel audio,
.audio-block audio {
  height: 38px;
  accent-color: var(--brand);
}

.overview-audio-panel audio::-webkit-media-controls-panel,
.audio-block audio::-webkit-media-controls-panel {
  background-color: #fff2f5;
}

.course-mainline {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 10%, rgba(211, 17, 69, 0.13), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 244, 246, 0.54));
  box-shadow:
    0 12px 26px rgba(33, 21, 26, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.course-mainline > span {
  display: block;
  color: var(--brand);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 900;
}

.course-mainline p {
  margin-top: 0;
  color: rgba(33, 21, 26, 0.76);
  font-size: 13px;
  line-height: 1.58;
  font-weight: 400;
}

.course-mainline .course-meta-line {
  margin-top: 10px;
}

.course-meta-inline {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: baseline;
}

.section {
  gap: 12px;
}

.chapter-card {
  padding: 11px 12px;
  scroll-margin-top: 82px;
}

.chapter-card-head {
  gap: 8px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.chapter-index {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  color: rgba(211, 17, 69, 0.72);
  background: rgba(211, 17, 69, 0.06);
  border-color: rgba(211, 17, 69, 0.08);
  box-shadow: none;
}

.chapter-title-block h3 {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.chapter-enter-btn {
  min-height: 32px;
  border-color: rgba(211, 17, 69, 0.18);
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(255, 244, 246, 0.95);
}

.chapter-enter-primary {
  width: 34px;
  height: 34px;
  min-height: 34px;
  margin-top: 0;
  padding: 0;
  border: 1px solid rgba(211, 17, 69, 0.22);
  border-radius: 999px;
  justify-content: center;
  color: var(--brand);
  background: rgba(255, 244, 246, 0.72);
  box-shadow: 0 8px 16px rgba(211, 17, 69, 0.08);
}

.chapter-enter-primary svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.chapter-card-foot {
  margin-top: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.chapter-card-foot .key-page-details {
  margin-top: 0;
}

.chapter-page-range {
  color: rgba(33, 21, 26, 0.42);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
}

.chapter-page-inline {
  color: rgba(33, 21, 26, 0.42);
  font-size: 11px;
  font-weight: 700;
}

.key-page-details summary {
  color: rgba(33, 21, 26, 0.5);
  font-size: 12px;
  font-weight: 600;
  gap: 5px;
}

.key-page-details summary span {
  min-height: auto;
  padding: 0;
  color: rgba(33, 21, 26, 0.42);
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.key-page-details summary span::before {
  content: "· ";
}

.key-page {
  border-color: rgba(33, 21, 26, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.chapter-tabs {
  top: 0;
  margin: 0;
  padding: 10px 12px;
  gap: 0;
  background: rgba(255, 250, 246, 0.92);
  backdrop-filter: blur(16px);
}

.chapter-tabs::before {
  content: "";
  position: absolute;
  inset: 10px 12px;
  border: 1px solid rgba(33, 21, 26, 0.08);
  border-radius: 12px;
  background: rgba(33, 21, 26, 0.06);
  pointer-events: none;
}

.checkable-tag {
  position: relative;
  z-index: 1;
  min-width: 78px;
  min-height: 34px;
  padding: 7px 14px;
  border: 0;
  border-radius: 10px;
  justify-content: center;
  color: rgba(33, 21, 26, 0.62);
  background: transparent;
  box-shadow: none;
}

.checkable-tag + .checkable-tag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(33, 21, 26, 0.09);
}

.checkable-tag.active {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 8px 18px rgba(33, 21, 26, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.checkable-tag.active::before,
.checkable-tag.active + .checkable-tag::before {
  display: none;
}

.study-backbar {
  background: rgba(255, 250, 246, 0.82);
}

.slide-image,
.slide-thumb,
.pdf-preview {
  border-color: rgba(33, 21, 26, 0.08);
}

.term-panel {
  border-color: rgba(211, 17, 69, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.term-chip {
  border-color: rgba(211, 17, 69, 0.14);
  border-radius: 999px;
}

.ai-notice {
  color: rgba(33, 21, 26, 0.45);
  border-top-color: rgba(33, 21, 26, 0.08);
}

.compliance-note {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
}

.bottom-sheet {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(145deg, #fff8f9, #fff),
    #fff;
  box-shadow:
    0 28px 70px rgba(33, 21, 26, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.course-brief,
.chapter-summary,
.chapter-card,
.slide-section,
.source-preview,
.catalog-item {
  animation: fadeUp 0.42s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chapter-learning-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.learn-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(33, 21, 26, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 246, 0.88)),
    #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.learn-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.learn-panel-index {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(211, 17, 69, 0.76);
  background: rgba(211, 17, 69, 0.06);
  border: 1px solid rgba(211, 17, 69, 0.08);
  box-shadow: none;
  font-size: 11px;
  font-weight: 900;
}

.learn-panel h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.takeaway-panel {
  border-color: rgba(120, 92, 66, 0.16);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.85), transparent 36%),
    linear-gradient(135deg, rgba(249, 243, 234, 0.96), rgba(255, 255, 255, 0.92) 62%),
    #fff;
}

.takeaway-card-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  perspective: 900px;
}

.takeaway-flip-card {
  min-width: 0;
  height: 138px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.takeaway-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.takeaway-flip-card.flipped .takeaway-card-inner {
  transform: rotateY(180deg);
}

.takeaway-card-face {
  position: absolute;
  inset: 0;
  padding: 12px 10px;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 10px 22px rgba(33, 21, 26, 0.08);
}

.takeaway-card-front {
  align-items: center;
  text-align: center;
}

.takeaway-card-back {
  justify-content: flex-start;
  transform: rotateY(180deg);
  overflow-y: auto;
  scrollbar-width: none;
}

.takeaway-card-back::-webkit-scrollbar {
  display: none;
}

.takeaway-card-logic .takeaway-card-face,
.takeaway-card-points .takeaway-card-face,
.takeaway-card-talk .takeaway-card-face {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(145deg, #fffaf3, #eadccd);
}

.takeaway-card-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #3f342f;
  box-shadow: 0 8px 18px rgba(63, 52, 47, 0.15);
  font-size: 13px;
  font-weight: 900;
}

.takeaway-card-face strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.28;
  font-weight: 900;
}

.takeaway-card-face em {
  color: rgba(33, 21, 26, 0.48);
  font-size: 10px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 700;
}

.takeaway-card-back p {
  margin: 0;
  color: rgba(33, 21, 26, 0.72);
  font-size: 11px;
  line-height: 1.5;
}

.takeaway-card-back ol {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 4px;
  color: rgba(33, 21, 26, 0.72);
  font-size: 11px;
  line-height: 1.38;
}

.takeaway-expanded-mask {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
}

.takeaway-expanded-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.1), transparent 38%),
    rgba(33, 21, 26, 0.46);
  backdrop-filter: blur(10px);
}

.takeaway-expanded-card {
  position: relative;
  z-index: 1;
  width: min(100%, 374px);
  max-height: min(72vh, 560px);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 28px 70px rgba(33, 21, 26, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  animation: takeawayExpand 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.takeaway-expanded-card.takeaway-card-logic,
.takeaway-expanded-card.takeaway-card-points,
.takeaway-expanded-card.takeaway-card-talk {
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(145deg, #fffaf3, #eadccd);
}

.takeaway-expanded-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(33, 21, 26, 0.1);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(33, 21, 26, 0.72);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 18px rgba(33, 21, 26, 0.1);
}

.takeaway-expanded-close svg {
  width: 16px;
  height: 16px;
}

.takeaway-expanded-head {
  padding-right: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.takeaway-expanded-head h2 {
  margin-top: 1px;
  font-size: 22px;
}

.takeaway-expanded-body {
  margin-top: 16px;
  max-height: calc(min(72vh, 560px) - 112px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.takeaway-expanded-body p {
  margin: 0;
  color: rgba(33, 21, 26, 0.78);
  font-size: 15px;
  line-height: 1.72;
}

.takeaway-expanded-body ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: rgba(33, 21, 26, 0.78);
  font-size: 15px;
  line-height: 1.62;
}

@keyframes takeawayExpand {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.72) rotateY(-64deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateY(0deg);
  }
}

.takeaway-row {
  margin-top: 10px;
  display: grid;
  gap: 5px;
}

.takeaway-row > strong {
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(211, 17, 69, 0.08);
  font-size: 12px;
  line-height: 1.35;
}

.takeaway-row p {
  margin-top: 0;
}

.takeaway-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.55;
}

.audio-learn-panel audio {
  display: block;
  width: 100%;
  height: 38px;
  margin-top: 10px;
  accent-color: var(--brand);
}

.audio-learn-panel audio::-webkit-media-controls-panel {
  background-color: #fff2f5;
}

.key-learn-panel p,
.audio-learn-panel p {
  margin-top: 8px;
}

.learning-key-pages {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.learning-key-page {
  min-width: 0;
  min-height: 52px;
  padding: 8px;
  border: 1px solid rgba(33, 21, 26, 0.08);
  border-radius: 14px;
  display: grid;
  gap: 3px;
  text-align: left;
  background: rgba(255, 255, 255, 0.86);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.learning-key-page span {
  color: var(--brand);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
}

.learning-key-page strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.learning-key-page.active {
  border-color: rgba(211, 17, 69, 0.22);
  background: rgba(255, 244, 246, 0.95);
  box-shadow: 0 8px 16px rgba(211, 17, 69, 0.08);
}

.learning-key-page:active {
  transform: scale(0.98);
}
