:root {
  --bg: #f7fbf2;
  --ink: #10231f;
  --muted: #68786f;
  --card: #fffef7;
  --line: rgba(28, 63, 55, 0.11);
  --nav: #0b322d;
  --hero-start: #0f463f;
  --hero-mid: #168177;
  --hero-end: #63b76f;
  --green: #78e2a1;
  --mint: #defbe9;
  --amber: #ffd764;
  --blue: #8fd4ff;
  --orange: #ff916b;
  --pink: #ffc9dc;
  --lavender: #d8ccff;
  --shadow: 0 22px 70px rgba(28, 63, 55, 0.1);
  --shadow-raised: 0 18px 46px rgba(28, 63, 55, 0.13), 0 4px 14px rgba(28, 63, 55, 0.06);
  --glow: 0 24px 68px rgba(38, 147, 135, 0.14);
  --radius: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 80% 7%, rgba(255, 215, 100, 0.42), transparent 23rem),
    radial-gradient(circle at 8% 14%, rgba(143, 212, 255, 0.32), transparent 28rem),
    radial-gradient(circle at 62% 84%, rgba(120, 226, 161, 0.26), transparent 24rem),
    var(--bg);
}

body::before {
  display: none;
}

body::after {
  display: none;
}

.cursor-trail-dot {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 18%, rgba(120, 226, 161, 0.72) 38%, transparent 72%),
    radial-gradient(circle, rgba(143, 212, 255, 0.46), transparent 76%);
  filter: blur(0.2px);
  box-shadow: 0 0 20px rgba(120, 226, 161, 0.28);
  opacity: 0.82;
  transform: translate3d(-50%, -50%, 0) scale(1);
  animation: cursorTrail 0.72s ease-out forwards;
  will-change: transform, opacity;
}

@keyframes cursorTrail {
  to {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--trail-x, 0px)), calc(-50% + var(--trail-y, 0px)), 0) scale(0.22);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.learning-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 20px;
  border-right: 1px solid rgba(255, 253, 244, 0.08);
  background:
    radial-gradient(circle at 10% 10%, rgba(120, 226, 161, 0.15), transparent 15rem),
    linear-gradient(180deg, #082520 0%, var(--nav) 58%, #0f231e 100%);
  color: #fffaf0;
}

.logo {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  font-weight: 800;
  line-height: 1.12;
}

.logo span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--amber));
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(120, 226, 161, 0.24);
}

.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 44px;
}

.sidebar nav a {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border-radius: 18px;
  color: rgba(255, 250, 240, 0.62);
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: rgba(255, 250, 240, 0.13);
  color: #fffaf0;
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.08);
}

.sidebar nav a:hover {
  transform: translateX(3px);
}

.session-control {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 250, 240, 0.12);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.08);
}

.session-control span {
  color: rgba(255, 250, 240, 0.54);
  font-size: 12px;
  font-weight: 800;
}

.session-control strong {
  color: #fffaf0;
  font-size: 17px;
}

.session-control button {
  min-height: 38px;
  margin-top: 6px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 250, 240, 0.12);
  color: rgba(255, 250, 240, 0.82);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.session-control button:hover {
  background: rgba(255, 250, 240, 0.2);
}

.dashboard {
  padding: 28px clamp(22px, 4vw, 54px) 64px;
}

.mobile-top {
  display: none;
}

.mobile-tabbar {
  display: none;
}

.welcome-panel,
.hero-course,
.cover-large,
.tile-cover,
.detail-cover-art,
.library-cover,
.stats-row article,
.course-tile,
.progress-panel > *,
.detail-nav,
.detail-summary,
.about-card,
.action-card,
.library-card,
.profile-hero,
.profile-stats article,
.current-learning-card,
.mini-panel,
.learning-history {
  border: 0;
  background: linear-gradient(145deg, rgba(255, 254, 247, 0.94), rgba(250, 246, 234, 0.84));
  background-clip: padding-box;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

:where(
    .welcome-panel,
    .hero-course,
    .stats-row article,
    .course-tile,
    .progress-panel > *,
    .detail-summary,
    .about-card,
    .action-card,
    .library-card,
    .profile-hero,
    .profile-stats article,
    .current-learning-card,
    .mini-panel,
    .learning-history,
    .reward-card,
    .store-hero,
    .task-hero
  ) {
  position: relative;
  overflow: hidden;
}

:where(.course-tile, .library-card, .reward-card, .current-learning-card, .about-card, .action-card, .profile-stats article, .stats-row article)::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 14% 8%, rgba(143, 212, 255, 0.16), transparent 12rem),
    radial-gradient(circle at 92% 18%, rgba(255, 215, 100, 0.16), transparent 10rem);
  opacity: 0;
  transition: opacity 0.22s ease;
}

:where(.course-tile, .library-card, .reward-card, .current-learning-card, .about-card, .action-card, .profile-stats article, .stats-row article):hover::before {
  opacity: 1;
}

:where(.course-tile, .library-card, .reward-card, .current-learning-card, .about-card, .action-card, .profile-stats article, .stats-row article) > * {
  position: relative;
  z-index: 1;
}

.welcome-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 220px;
  padding: 24px 26px;
  border-radius: var(--radius);
  border-color: transparent;
  box-shadow: 0 18px 42px rgba(28, 63, 55, 0.055);
  overflow: hidden;
}

.welcome-panel::after,
.profile-chip::after {
  display: none;
}

.welcome-panel > *,
.profile-chip > * {
  position: relative;
  z-index: 1;
}

.image-banner,
.image-cover {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.image-banner {
  background-position: center right;
  background-size: cover;
}

.image-banner > * {
  position: relative;
  z-index: 1;
}

.home-banner {
  background-image:
    linear-gradient(90deg, rgba(255, 253, 244, 0.95), rgba(255, 253, 244, 0.7) 47%, rgba(255, 253, 244, 0.25)),
    url("./assets/images/banner-home-learning.png");
}

.course-banner {
  background-image:
    linear-gradient(90deg, rgba(24, 82, 72, 0.84), rgba(53, 115, 104, 0.62) 48%, rgba(150, 181, 143, 0.08)),
    url("./assets/images/course-handbook-banner.png") !important;
}

.store-banner {
  background-image:
    linear-gradient(90deg, rgba(24, 82, 72, 0.84), rgba(53, 115, 104, 0.58) 45%, rgba(150, 181, 143, 0.08)),
    url("./assets/images/banner-points-store.png") !important;
}

.profile-banner {
  background-image:
    linear-gradient(90deg, rgba(24, 82, 72, 0.84), rgba(53, 115, 104, 0.58) 45%, rgba(150, 181, 143, 0.08)),
    url("./assets/images/banner-profile-learning.png") !important;
}

.course-cover::before {
  background-image: var(--course-cover-image, url("./assets/images/course-handbook-cover.png")) !important;
  background-position: center 42%;
  background-size: cover;
}

.course-wide-cover::before {
  background-image: url("./assets/images/course-handbook-banner.png") !important;
  background-position: center right;
  background-size: cover;
}

.welcome-panel > div:first-child {
  min-width: 0;
  flex: 1;
}

.soft-label {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.welcome-panel h1 {
  max-width: 680px;
  margin: 8px 0 0;
  padding: 3px 0;
  border-radius: 5px;
  font-size: clamp(28px, 3vw, 39px);
  line-height: 1.16;
  letter-spacing: 0;
}

.profile-chip {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 380px;
  padding: 20px 22px;
  border: 0;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 254, 247, 0.92), rgba(255, 255, 255, 0.62)),
    radial-gradient(circle at 10% 12%, rgba(120, 226, 161, 0.24), transparent 8rem);
  box-shadow: 0 18px 46px rgba(28, 63, 55, 0.055);
}

.avatar {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 24px;
  background: var(--mint);
  font-size: 38px;
  font-weight: 900;
}

.avatar.large {
  width: 112px;
  height: 112px;
  border-radius: 32px;
  font-size: 54px;
}

.profile-hero .avatar.large {
  flex: 0 0 112px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 250, 240, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.2), rgba(255, 250, 240, 0.07)),
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.28), transparent 44%),
    radial-gradient(circle at 78% 84%, rgba(120, 226, 161, 0.2), transparent 54%);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  color: rgba(255, 250, 240, 0.96);
  text-shadow: 0 12px 28px rgba(16, 35, 31, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -18px 38px rgba(16, 54, 47, 0.08),
    0 22px 54px rgba(16, 35, 31, 0.12);
}

.profile-chip strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.profile-chip p {
  margin: 3px 0 0;
  color: var(--muted);
}

.hero-course {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  min-height: 320px;
  margin-top: 22px;
  padding: 28px;
  overflow: hidden;
  isolation: isolate;
  border-color: transparent;
  border-radius: 38px;
  box-shadow: 0 20px 48px rgba(28, 63, 55, 0.065);
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 215, 100, 0.34), transparent 18rem),
    radial-gradient(circle at 8% 82%, rgba(143, 212, 255, 0.2), transparent 22rem),
    linear-gradient(135deg, #185248 0%, #357368 58%, #96b58f 100%);
  color: #fffaf0;
}

.hero-course.is-empty {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 250, 240, 0.26), transparent 17rem),
    radial-gradient(circle at 12% 86%, rgba(120, 226, 161, 0.18), transparent 20rem),
    linear-gradient(135deg, #184f58 0%, #2f7b78 54%, #d6b76c 100%);
}

.hero-course.is-empty .course-wide-cover::before {
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 250, 240, 0.9), transparent 12rem),
    radial-gradient(circle at 72% 68%, rgba(198, 243, 122, 0.78), transparent 13rem),
    linear-gradient(135deg, rgba(143, 212, 255, 0.82), rgba(255, 211, 106, 0.82)) !important;
}

.hero-course.is-empty .cover-title {
  max-width: 250px;
}

.hero-course::before,
.library-hero::before,
.store-hero::before,
.profile-hero::before,
.task-hero::before,
.detail-summary.course-banner::before {
  display: none;
}

.hero-course::after,
.library-hero::after,
.store-hero::after,
.profile-hero::after,
.task-hero::after,
.detail-summary.course-banner::after {
  position: absolute;
  right: -110px;
  bottom: -150px;
  z-index: 0;
  width: 360px;
  height: 360px;
  pointer-events: none;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 226, 161, 0.2), transparent 68%);
  filter: blur(24px);
  opacity: 0.72;
}

.hero-course > *,
.library-hero > *,
.store-hero > *,
.profile-hero > *,
.task-hero > *,
.detail-summary.course-banner > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  align-self: center;
}

.course-type {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.13);
  color: rgba(255, 250, 240, 0.76);
  font-weight: 800;
}

.hero-copy h2 {
  max-width: 720px;
  margin: 18px 0 14px;
  font-size: clamp(32px, 4.7vw, 56px);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 250, 240, 0.72);
  font-size: 19px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.main-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), #c6f37a);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(120, 226, 161, 0.24);
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.main-button::before,
.submit-button::before,
.action-link::before,
.detail-nav a::before,
.plain-link::before,
.reward-card button::before,
.library-toolbar button::before,
.section-head a::before {
  position: absolute;
  left: 50%;
  top: 110%;
  z-index: -1;
  width: 150%;
  height: 180%;
  content: "";
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  transform: translateX(-50%) scale(1.1);
  transition: top 0.42s cubic-bezier(0.2, 0.9, 0.2, 1), transform 0.42s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.main-button:hover,
.submit-button:hover,
.action-link:hover,
.detail-nav a:hover,
.plain-link:hover,
.reward-card button:hover,
.library-toolbar button:hover,
.section-head a:hover {
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(38, 147, 135, 0.26);
}

.main-button:hover::before,
.submit-button:hover::before,
.action-link:hover::before,
.detail-nav a:hover::before,
.plain-link:hover::before,
.reward-card button:hover::before,
.library-toolbar button:hover::before,
.section-head a:hover::before {
  top: -48%;
  transform: translateX(-50%) scale(0.9);
}

.hero-actions span {
  color: rgba(255, 250, 240, 0.62);
  font-weight: 750;
}

.course-carousel-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.course-carousel-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid rgba(255, 250, 240, 0.72);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.24);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.course-carousel-dots button.active {
  width: 34px;
  background: #fffaf0;
}

.course-carousel-dots button:hover {
  transform: translateY(-1px);
}

.course-carousel-dots span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.profile-dots {
  margin-top: 0;
}

.profile-dots button {
  border-color: rgba(21, 17, 12, 0.28);
  background: rgba(21, 17, 12, 0.12);
}

.profile-dots button.active {
  background: var(--ink);
}

.cover-large,
.tile-cover,
.detail-cover-art,
.library-cover {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.cover-large {
  display: grid;
  min-height: 300px;
  align-content: end;
  padding: 28px;
  border-radius: 32px;
  color: var(--ink);
}

.cover-large.course-wide-cover {
  color: #fffaf0;
}

.cover-large.course-wide-cover::after {
  display: none;
}

.cover-large::before,
.tile-cover::before,
.detail-cover-art::before,
.library-cover::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--art-bg);
}

.cover-large::after,
.tile-cover::after,
.detail-cover-art::after,
.library-cover::after {
  display: none;
}

.detail-cover-art::after {
  position: absolute;
  inset: 42% 0 0;
  z-index: 0;
  display: block;
  pointer-events: none;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(255, 250, 240, 0),
    rgba(255, 250, 240, 0.34) 32%,
    rgba(255, 250, 240, 0.78) 100%
  );
}

.library-cover::after {
  position: absolute;
  inset: 32% 0 0;
  z-index: 0;
  display: block;
  pointer-events: none;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(255, 250, 240, 0),
    rgba(255, 250, 240, 0.46) 34%,
    rgba(255, 250, 240, 0.94) 100%
  );
}

.detail-cover-art > *,
.library-cover > * {
  position: relative;
  z-index: 1;
}

.course-cover::before {
  background-image: var(--course-cover-image, url("./assets/images/course-handbook-cover.png")) !important;
  background-position: center 42%;
  background-size: cover;
}

.course-wide-cover::before {
  background-image: url("./assets/images/course-handbook-banner.png") !important;
  background-position: center right;
  background-size: cover;
}

.cover-badge {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.65);
  color: #b1ada5;
  font-weight: 850;
}

.cover-title {
  margin-top: 12px;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.stats-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.stats-row article {
  min-height: 124px;
  padding: 22px;
  border-radius: 26px;
  box-shadow: var(--shadow-raised);
}

.stats-row span {
  color: var(--muted);
  font-weight: 750;
}

.stats-row strong {
  display: block;
  margin-top: 14px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.level-card {
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.level-copy {
  display: grid;
}

.level-copy p,
.store-balance p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.level-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece3d4;
}

.level-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  box-shadow: 0 0 24px rgba(158, 219, 177, 0.55);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 16px;
}

.section-head h2 {
  margin: 6px 0 0;
  font-size: 34px;
  letter-spacing: -0.055em;
}

.section-head a {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid rgba(28, 63, 55, 0.1);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.82);
  color: #315f58;
  font-weight: 800;
  isolation: isolate;
  box-shadow: 0 12px 28px rgba(28, 63, 55, 0.08);
  transition: transform 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.section-head.compact {
  margin: 0 0 18px;
}

.section-head.compact h2 {
  font-size: clamp(30px, 3.7vw, 46px);
}

.course-tile {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.course-tile:hover,
.action-link:hover,
.main-button:hover {
  transform: translateY(-2px);
}

.course-tile:hover,
.library-card:hover,
.reward-card:hover {
  border-color: rgba(38, 147, 135, 0.2);
  box-shadow: 0 30px 90px rgba(38, 147, 135, 0.18);
}

.course-tile:hover .tile-cover::before,
.library-card:hover .library-cover::before,
.cover-large:hover::before,
.detail-cover-art:hover::before {
  transform: scale(1.035);
}

.cover-large::before,
.tile-cover::before,
.detail-cover-art::before,
.library-cover::before {
  transition: transform 0.45s ease;
}

.tile-cover {
  min-height: 290px;
}

.tile-cover span {
  position: absolute;
  left: 22px;
  top: 22px;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.72);
  font-size: 20px;
  font-weight: 950;
}

.tile-copy {
  display: grid;
  align-content: center;
  padding: 28px;
}

.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tile-top span,
.tile-top strong {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f2ede4;
  color: var(--muted);
  font-weight: 850;
}

.tile-top strong {
  background: var(--mint);
  color: #10632b;
}

.tile-copy h3 {
  margin: 18px 0 12px;
  padding: 3px 0;
  font-size: clamp(26px, 2.35vw, 32px);
  line-height: 1.12;
  letter-spacing: 0;
}

.tile-copy p,
.timeline-card p,
.ring-card p,
.detail-summary p,
.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.tile-copy dl,
.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 20px 0 0;
}

.tile-copy dt,
.about-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.tile-copy dd {
  margin: 4px 0 0;
  font-weight: 850;
}

.progress-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-top: 72px;
}

.ring-card,
.timeline-card {
  padding: 24px;
  border-radius: 30px;
}

.progress-ring {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--card) 0 55%, transparent 57%),
    conic-gradient(var(--green) 0 var(--ring-progress, 0%), #ece3d4 var(--ring-progress, 0%) 100%);
  transition: background 0.28s ease;
}

.progress-ring span {
  font-size: 30px;
  font-weight: 950;
}

.progress-panel h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.timeline-card ol {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.timeline-card li {
  padding: 13px 14px;
  border-radius: 16px;
  background: #f3ede4;
  color: var(--muted);
  font-weight: 800;
}

.timeline-card li.done {
  background: var(--mint);
  color: #10632b;
}

.timeline-action {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 24px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1.35;
  text-align: left;
}

.timeline-action::after {
  margin-left: auto;
  color: rgba(16, 35, 31, 0.42);
  content: "→";
  font-weight: 950;
  transition: transform 0.18s ease;
}

.timeline-action:hover::after {
  transform: translateX(3px);
}

.timeline-action.is-passive {
  cursor: default;
  opacity: 1;
}

.timeline-action.is-passive::after {
  content: "";
}

.detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 22px;
  font-weight: 850;
}

.detail-nav a {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 13px;
  margin: -8px 0;
  border-radius: 999px;
  isolation: isolate;
  transition: transform 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.detail-nav a:hover {
  transform: translateX(-2px);
}

.detail-nav span {
  color: var(--muted);
}

.course-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 22px;
  margin-top: 22px;
}

.detail-cover-art {
  display: grid;
  min-height: 430px;
  align-content: end;
  padding: 36px;
  border-radius: 38px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.detail-cover-art span {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  font-weight: 900;
}

.detail-cover-art strong {
  max-width: 390px;
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(42px, 6.4vw, 74px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  text-shadow: 0 2px 18px rgba(255, 250, 240, 0.72);
}

.detail-summary {
  display: grid;
  align-content: center;
  min-height: 430px;
  padding: 42px;
  border-radius: 38px;
}

.detail-summary.course-banner {
  border-color: transparent;
  color: #fffaf0;
}

.detail-summary .course-type {
  background: #f3ede4;
  color: var(--muted);
}

.detail-summary.course-banner .course-type {
  background: rgba(255, 253, 244, 0.16);
  color: rgba(255, 250, 240, 0.82);
}

.detail-summary.course-banner p,
.detail-summary.course-banner .summary-stats span {
  color: rgba(255, 250, 240, 0.74);
}

.detail-summary.course-banner .summary-stats {
  background: rgba(255, 253, 244, 0.16);
  border-color: rgba(255, 253, 244, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 42px rgba(16, 35, 31, 0.18);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.detail-summary.course-banner .summary-stat {
  background: linear-gradient(145deg, rgba(255, 253, 244, 0.22), rgba(255, 253, 244, 0.1));
  border-color: rgba(255, 253, 244, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(16, 35, 31, 0.12);
}

.detail-summary.course-banner .summary-stat.points {
  background: rgba(221, 249, 231, 0.22);
}

.detail-summary h1 {
  margin: 18px -13px 14px 0;
  font-size: clamp(32px, 4.15vw, 51px);
  line-height: 1.12;
  letter-spacing: 0;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
  padding: 10px;
  border: 1px solid rgba(21, 17, 12, 0.08);
  border-radius: 26px;
  background: rgba(243, 237, 228, 0.72);
}

.summary-stat {
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(21, 17, 12, 0.07);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.72);
}

.summary-stat.points {
  background: linear-gradient(135deg, rgba(219, 247, 231, 0.9), rgba(255, 250, 240, 0.76));
}

.summary-stats strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.summary-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.about-card,
.action-card {
  padding: 30px;
  border-radius: 32px;
}

.about-card h2,
.action-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: -0.055em;
}

.about-card {
  display: grid;
  gap: 20px;
}

.about-main h2 {
  max-width: 640px;
  margin: 8px 0 12px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

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

.about-modules article {
  min-height: 116px;
  padding: 18px;
  border: 1px solid rgba(21, 17, 12, 0.08);
  border-radius: 22px;
  background: rgba(243, 237, 228, 0.62);
}

.about-modules span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.about-modules strong {
  display: block;
  margin-top: 10px;
  font-size: 21px;
  line-height: 1.25;
}

.action-card {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 12px;
}

.action-link {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 0 16px;
  border-radius: 20px;
  background: #f3ede4;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  isolation: isolate;
  transition: transform 0.2s ease, background 0.2s ease;
}

button.action-link {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

button.action-link:disabled {
  cursor: wait;
  opacity: 0.72;
}

.action-link.primary {
  background: var(--nav);
  color: #fffaf0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.action-link span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.72);
  color: var(--ink);
}

.action-link:not(.primary):hover {
  background: linear-gradient(135deg, rgba(222, 251, 233, 0.92), rgba(255, 247, 213, 0.88));
}

.task-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  margin-top: 22px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 38px;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 215, 100, 0.24), transparent 18rem),
    linear-gradient(135deg, var(--hero-start) 0%, var(--hero-mid) 58%, var(--hero-end) 100%);
  color: #fffaf0;
  box-shadow: var(--shadow);
}

.task-hero,
.library-hero,
.store-hero,
.profile-hero {
  border-color: transparent;
}

.task-hero .soft-label,
.task-hero p {
  color: rgba(255, 250, 240, 0.68);
}

.task-hero h1 {
  max-width: 780px;
  margin: 10px 0 16px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1;
  letter-spacing: -0.065em;
}

.task-hero p {
  max-width: 620px;
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
}

.task-score {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 200px;
  padding: 24px;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 28px;
  background: rgba(255, 250, 240, 0.1);
}

.task-score span {
  color: rgba(255, 250, 240, 0.68);
  font-weight: 850;
}

.task-score strong {
  font-size: 58px;
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.quiz-layout,
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.quiz-layout.stacked {
  grid-template-columns: 1fr;
}

.quiz-card,
.review-card,
.exam-aside,
.privacy-card {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
}

.quiz-card,
.review-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.question-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(21, 17, 12, 0.08);
  border-radius: 24px;
  background: rgba(243, 237, 228, 0.58);
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.question-card h2 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.question-card label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(21, 17, 12, 0.08);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.78);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.question-card label:hover {
  transform: translateX(3px);
  border-color: rgba(38, 147, 135, 0.2);
  background: rgba(222, 251, 233, 0.58);
  box-shadow: 0 12px 26px rgba(38, 147, 135, 0.08);
}

.question-card input {
  accent-color: #10632b;
}

.exam-progress-strip {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
}

.progress-only {
  position: relative;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece3d4;
}

.progress-only i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--pink));
  box-shadow: 0 0 24px rgba(255, 211, 106, 0.44);
  transition: width 0.28s ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.exam-submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding-top: 4px;
}

.exam-submit-row .submit-button {
  min-width: 180px;
}

.exam-aside,
.privacy-card {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 14px;
  padding: 24px;
}

.exam-progress {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(243, 237, 228, 0.7);
}

.exam-progress span {
  color: var(--muted);
  font-weight: 850;
}

.exam-progress strong {
  font-size: 42px;
  letter-spacing: -0.06em;
}

.submit-button {
  position: relative;
  overflow: hidden;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--nav);
  color: #fffaf0;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.primary-action {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), #c6f37a);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(120, 226, 161, 0.2);
}

.submit-button:hover {
  transform: translateY(-2px);
}

.plain-link {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
  isolation: isolate;
  transition: transform 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.plain-link:hover,
.section-head a:hover {
  transform: translateY(-2px);
}

.rating-row {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(21, 17, 12, 0.08);
  border-radius: 24px;
  background: rgba(243, 237, 228, 0.58);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.rating-row:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 100, 0.34);
  box-shadow: 0 18px 46px rgba(255, 215, 100, 0.12);
}

.rating-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.rating-row span,
.feedback-field span {
  color: var(--muted);
  font-weight: 900;
}

.rating-row strong {
  font-size: 36px;
  line-height: 1;
}

.star-control {
  position: relative;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 254, 247, 0.92), rgba(255, 247, 213, 0.62)),
    radial-gradient(circle at 12% 15%, rgba(255, 215, 100, 0.16), transparent 8rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 34px rgba(255, 215, 100, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.star-control:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 18px 42px rgba(255, 215, 100, 0.18);
}

.star-visual {
  position: relative;
  display: flex;
  width: max-content;
  height: 42px;
  gap: 8px;
}

.star-slot {
  position: relative;
  display: block;
  width: 34px;
  height: 42px;
  font-size: 34px;
  line-height: 42px;
  transform-origin: 50% 70%;
}

.star-empty,
.star-gold {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}

.rating-row .star-empty {
  color: #d8cdbb;
}

.rating-row .star-gold {
  width: 0;
  overflow: hidden;
  color: var(--amber);
  filter: drop-shadow(0 8px 14px rgba(246, 134, 74, 0.22));
  transition: width 0.2s ease;
}

.star-hit-grid {
  position: absolute;
  inset: 8px 12px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
}

.star-hit-grid button {
  min-width: 0;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.star-hit-grid button:focus {
  outline: none;
}

.star-hit-grid button:focus-visible {
  border-radius: 8px;
  outline: 2px solid rgba(246, 134, 74, 0.46);
  outline-offset: 2px;
}

.star-slot.is-wave {
  animation: starWave 0.44s cubic-bezier(0.2, 1.55, 0.36, 1) both;
}

@keyframes starWave {
  45% {
    transform: translateY(-9px) scale(1.18) rotate(-6deg);
  }
  100% {
    transform: translateY(0) scale(1) rotate(0);
  }
}

.feedback-field {
  display: grid;
  gap: 12px;
}

.feedback-field textarea {
  min-height: 170px;
  padding: 18px;
  border: 1px solid rgba(21, 17, 12, 0.08);
  border-radius: 24px;
  outline: none;
  resize: vertical;
  background: rgba(255, 250, 240, 0.78);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.feedback-field textarea:focus {
  border-color: rgba(38, 147, 135, 0.28);
  background: rgba(255, 254, 247, 0.94);
  box-shadow: 0 0 0 5px rgba(120, 226, 161, 0.16);
}

.privacy-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.055em;
}

.privacy-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.privacy-stack {
  display: grid;
  gap: 10px;
}

.privacy-stack span {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(243, 237, 228, 0.7);
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--nav);
  color: #fffaf0;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 72% 17%, rgba(255, 215, 100, 0.25), transparent 22rem),
    radial-gradient(circle at 19% 80%, rgba(120, 226, 161, 0.2), transparent 25rem),
    rgba(7, 27, 24, 0.58);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-panel {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  padding: clamp(28px, 5vw, 44px);
  border-radius: 38px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 215, 100, 0.22), transparent 16rem),
    linear-gradient(145deg, #fffef7, #f3fbef);
  box-shadow: 0 38px 100px rgba(5, 27, 22, 0.28);
}

.auth-panel::after {
  position: absolute;
  right: -84px;
  bottom: -96px;
  width: 260px;
  height: 260px;
  content: "";
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(120, 226, 161, 0.42), rgba(143, 212, 255, 0.32));
  filter: blur(2px);
}

.auth-panel > * {
  position: relative;
  z-index: 1;
}

.auth-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 30px;
  color: var(--ink);
  font-weight: 900;
}

.auth-mark span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: 22px;
}

.auth-panel h2 {
  margin: 10px 0 14px;
  font-size: clamp(32px, 6vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.auth-panel p:not(.soft-label) {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-feishu-button {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding: 0 23px 0 14px;
  margin: 30px 0 22px;
  border-radius: 999px;
  background: var(--nav);
  color: #fffaf0;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-feishu-button span {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 50%;
  background: #3370ff;
  font-weight: 950;
}

.auth-feishu-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(11, 50, 45, 0.24);
}

.auth-panel small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.redeem-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 20%, rgba(135, 236, 173, 0.15), transparent 18rem),
    radial-gradient(circle at 80% 72%, rgba(255, 211, 106, 0.14), transparent 20rem),
    rgba(7, 21, 19, 0.68);
  -webkit-backdrop-filter: blur(22px) saturate(0.78);
  backdrop-filter: blur(22px) saturate(0.78);
}

.redeem-dialog[hidden] {
  display: none;
}

.redeem-panel {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(224, 239, 229, 0.28);
  border-radius: 34px;
  background:
    linear-gradient(140deg, rgba(27, 48, 43, 0.97), rgba(13, 29, 26, 0.96));
  -webkit-backdrop-filter: blur(30px) saturate(1.15);
  backdrop-filter: blur(30px) saturate(1.15);
  box-shadow:
    0 40px 92px rgba(3, 15, 13, 0.48),
    inset 0 1px 0 rgba(255, 250, 240, 0.16);
  color: #fffaf0;
}

.redeem-panel::before {
  position: absolute;
  inset: auto -12% -44% 32%;
  height: 220px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(116, 226, 159, 0.2), rgba(255, 210, 100, 0.16));
  filter: blur(20px);
  transform: rotate(-8deg);
}

.redeem-panel > * {
  position: relative;
  z-index: 1;
}

.dialog-close {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(242, 244, 234, 0.14);
  color: #fffaf0;
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
  transition: background 0.18s ease, transform 0.18s ease;
}

.dialog-close:hover {
  background: rgba(242, 244, 234, 0.23);
  transform: rotate(2deg);
}

.redeem-panel .soft-label {
  color: #98d8b2;
}

.redeem-panel h2 {
  max-width: 420px;
  margin: 8px 0 12px;
  color: #fffaf0;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.redeem-panel p {
  margin: 0;
  color: rgba(232, 241, 234, 0.84);
  line-height: 1.7;
}

.redeem-facts {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.redeem-facts span,
.redeem-facts strong {
  padding: 14px 16px;
  border: 1px solid rgba(224, 239, 229, 0.14);
  border-radius: 18px;
  background: rgba(250, 247, 237, 0.08);
  color: #fffaf0;
}

.redeem-facts span {
  color: rgba(244, 245, 236, 0.92);
}

.redeem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.redeem-actions [hidden] {
  display: none !important;
}

.redeem-actions button,
.redeem-actions a {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), #c6f37a);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(120, 226, 161, 0.22);
}

.redeem-actions a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.redeem-actions button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.redeem-panel small {
  display: block;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(224, 239, 229, 0.12);
  color: rgba(218, 231, 222, 0.76);
  line-height: 1.6;
}

.tap-ripple {
  position: absolute;
  left: var(--ripple-x);
  top: var(--ripple-y);
  z-index: 2;
  width: 12px;
  height: 12px;
  pointer-events: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%) scale(1);
  animation: tapRipple 0.62s ease-out forwards;
}

@keyframes tapRipple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

:where(a, button, label, .star-control, .course-tile, .library-card, .reward-card) {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, label, textarea):focus-visible {
  outline: 3px solid rgba(120, 226, 161, 0.42);
  outline-offset: 4px;
}

.library-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  margin-top: 22px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 38px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 215, 100, 0.25), transparent 18rem),
    radial-gradient(circle at 12% 88%, rgba(131, 200, 255, 0.16), transparent 18rem),
    linear-gradient(135deg, var(--hero-start) 0%, var(--hero-mid) 60%, var(--hero-end) 100%);
  color: #fffaf0;
  box-shadow: var(--shadow);
}

.library-hero .soft-label,
.library-hero p {
  color: rgba(255, 250, 240, 0.68);
}

.library-hero h1 {
  max-width: 860px;
  margin: 10px 0 16px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1;
  letter-spacing: -0.066em;
}

.library-hero p {
  max-width: 620px;
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
}

.library-meter {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 26px;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 30px;
  background: rgba(255, 250, 240, 0.1);
}

.library-meter span {
  color: rgba(255, 250, 240, 0.68);
  font-weight: 850;
}

.library-meter strong {
  font-size: 62px;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.library-tools {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(16, 35, 31, 0.07);
  border-radius: 28px;
  background: rgba(255, 250, 240, 0.58);
}

.library-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(620px, 100%);
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(16, 35, 31, 0.08);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.9);
}

.library-search span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.library-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 760;
}

.library-search input::placeholder {
  color: rgba(104, 120, 111, 0.64);
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.library-toolbar button {
  position: relative;
  overflow: hidden;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(21, 17, 12, 0.08);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.74);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  isolation: isolate;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.library-toolbar button.active {
  background: var(--nav);
  color: #fffaf0;
}

.library-toolbar button:hover {
  transform: translateY(-2px);
  background: var(--mint);
  color: #10632b;
}

.library-tools > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.library-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(240px, 0.75fr));
  gap: 18px;
  margin-top: 18px;
}

.library-card {
  display: grid;
  overflow: hidden;
  border-radius: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-library-card {
  grid-column: 1 / -1;
  grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1fr);
  min-height: 360px;
}

.library-card:hover {
  transform: translateY(-2px);
}

.library-cover {
  display: grid;
  min-height: 260px;
  align-content: end;
  padding: 28px;
}

.library-cover span {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  font-weight: 900;
}

.library-cover strong {
  max-width: 280px;
  margin-top: 12px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.library-copy {
  display: grid;
  align-content: center;
  padding: 28px;
}

.library-copy h2 {
  margin: 18px 0 12px;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.library-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.library-copy dl {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 22px 0 0;
}

.library-copy dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.library-copy dd {
  max-width: 320px;
  margin: 4px 0 0;
  font-weight: 900;
}

.ghost-card {
  opacity: 0.72;
}

.ghost-card .library-copy {
  align-content: start;
}

.ghost-card .library-copy h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.empty-result {
  grid-column: 1 / -1;
  min-height: 220px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  margin-top: 22px;
  padding: 34px;
  overflow: hidden;
  border-radius: 38px;
  background:
    radial-gradient(circle at 18% 20%, rgba(131, 200, 255, 0.24), transparent 18rem),
    radial-gradient(circle at 92% 16%, rgba(255, 215, 100, 0.2), transparent 18rem),
    linear-gradient(135deg, var(--hero-start) 0%, var(--hero-mid) 58%, var(--hero-end) 100%);
  color: #fffaf0;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.profile-identity .soft-label,
.profile-identity p,
.profile-level-card p {
  color: rgba(255, 250, 240, 0.68);
}

.profile-identity h1 {
  max-width: 720px;
  margin: 8px 0 12px;
  font-size: clamp(30px, 3.45vw, 45px);
  line-height: 1.08;
  letter-spacing: 0;
}

.profile-level-card {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 240px;
  padding: 26px;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 30px;
  background: rgba(255, 250, 240, 0.1);
}

.profile-level-card span {
  color: rgba(255, 250, 240, 0.82);
  font-weight: 850;
}

.profile-level-card strong {
  color: rgba(255, 250, 240, 0.96);
  font-size: 62px;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.available-balance {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.12);
  color: rgba(255, 250, 240, 0.82);
  font-size: 14px;
  font-weight: 800;
}

.available-balance b {
  margin-left: 6px;
  color: #fffaf0;
  font-size: 18px;
}

.profile-level-card p {
  margin: 0;
  color: rgba(255, 250, 240, 0.86);
  font-weight: 760;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.profile-stats article {
  min-height: 124px;
  padding: 22px;
  border-radius: 26px;
}

.profile-stats span {
  color: var(--muted);
  font-weight: 850;
}

.profile-stats strong {
  display: block;
  margin-top: 14px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.learning-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.current-learning-card,
.mini-panel,
.learning-history {
  border-radius: 32px;
}

.current-learning-card {
  display: grid;
  gap: 18px;
  padding: 30px;
}

.current-learning-card > p,
.mini-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.course-progress-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-height: 74px;
  align-items: center;
  padding: 0 14px;
  border-radius: 24px;
  background: rgba(243, 237, 228, 0.62);
  overflow: hidden;
}

.course-progress-line::before {
  position: absolute;
  right: 28px;
  left: 28px;
  top: 50%;
  height: 8px;
  border-radius: 999px;
  background: #e3dacb;
  content: "";
  transform: translateY(-50%);
}

.course-progress-line i {
  position: absolute;
  left: 28px;
  top: 50%;
  z-index: 1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transform: translateY(-50%);
}

.course-progress-line span {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.9);
  color: var(--muted);
  font-weight: 950;
}

.course-progress-line span.done {
  background: var(--mint);
  color: #10632b;
}

.learning-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.learning-side {
  display: grid;
  gap: 14px;
}

.mini-panel {
  padding: 24px;
}

.mini-panel span {
  color: var(--muted);
  font-weight: 900;
}

.mini-panel h3 {
  margin: 10px 0;
  font-size: 26px;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.tier-panel {
  background:
    radial-gradient(circle at 82% 14%, rgba(120, 226, 161, 0.14), transparent 10rem),
    rgba(255, 250, 240, 0.72);
}

.level-ladder {
  display: grid;
  gap: 8px;
  margin: 16px 0 12px;
}

.level-ladder div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
}

.level-ladder div.active {
  background: var(--mint);
  color: #10632b;
}

.level-ladder strong {
  font-weight: 900;
}

.level-ladder span {
  color: inherit;
  font-size: 12px;
}

.learning-history {
  margin-top: 22px;
  padding: 30px;
}

.learning-history ol {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.learning-history li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 0 18px;
  border: 1px solid rgba(21, 17, 12, 0.08);
  border-radius: 20px;
  background: rgba(243, 237, 228, 0.58);
}

.learning-history li.history-link-item {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border-color: rgba(26, 80, 68, 0.1);
  background: linear-gradient(102deg, rgba(255, 252, 246, 0.94), rgba(236, 248, 240, 0.76));
  box-shadow: 0 12px 24px rgba(27, 57, 46, 0.06);
}

.learning-history li.history-link-item::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 4px;
  border-radius: 999px;
  content: "";
  background: #f1c349;
}

.learning-history li.history-link-item.is-complete::before {
  background: #63c28a;
}

.learning-history li.history-link-item a {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) auto 42px;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 10px 14px 10px 22px;
  border-radius: 20px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.learning-history li.history-link-item a:hover {
  background: rgba(222, 251, 233, 0.48);
  box-shadow: inset 0 0 0 1px rgba(68, 150, 107, 0.1);
  transform: translateY(-2px);
}

.learning-history span,
.learning-history em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}

.learning-history strong {
  font-size: 19px;
}

.learning-history .history-state {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 0 14px;
  border-radius: 999px;
  color: #276052;
  background: rgba(222, 251, 233, 0.84);
  font-size: 13px;
  font-weight: 900;
}

.learning-history .history-course {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.learning-history .history-course strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-history .history-course em {
  color: #637c73;
  font-size: 13px;
  font-weight: 760;
}

.learning-history .history-reward {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 9px 13px;
  border: 1px solid rgba(65, 160, 103, 0.15);
  border-radius: 999px;
  color: #147047;
  background: rgba(220, 249, 229, 0.82);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.learning-history .history-reward small {
  color: #36795c;
  font-size: 12px;
  font-weight: 850;
}

.learning-history .history-open {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #315f58;
  background: rgba(255, 250, 240, 0.78);
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
}

.record-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.record-panel {
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
}

.record-panel > span {
  color: var(--muted);
  font-weight: 900;
}

.record-panel h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1;
  letter-spacing: -0.065em;
}

.record-panel p,
.record-panel blockquote {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.record-panel blockquote {
  min-height: 88px;
  padding: 18px;
  border-left: 4px solid var(--green);
  border-radius: 18px;
  background: rgba(243, 237, 228, 0.62);
}

.review-panel-wide {
  grid-column: 1 / -1;
}

.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: 22px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 38px;
  background:
    radial-gradient(circle at 90% 18%, rgba(255, 215, 100, 0.28), transparent 18rem),
    radial-gradient(circle at 14% 86%, rgba(123, 224, 163, 0.18), transparent 18rem),
    linear-gradient(135deg, var(--hero-start) 0%, var(--hero-mid) 58%, var(--hero-end) 100%);
  color: #fffaf0;
  box-shadow: var(--shadow);
}

.store-hero .soft-label,
.store-hero p {
  color: rgba(255, 250, 240, 0.68);
}

.store-hero h1 {
  max-width: 780px;
  margin: 10px 0 16px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1;
  letter-spacing: -0.066em;
}

.store-hero p {
  max-width: 580px;
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
}

.store-balance {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 240px;
  padding: 26px;
  border-radius: 30px;
  background: rgba(255, 250, 240, 0.1);
  border: 1px solid rgba(255, 250, 240, 0.14);
}

.store-balance span {
  color: rgba(255, 250, 240, 0.68);
  font-weight: 800;
}

.store-balance strong {
  font-size: 58px;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.reward-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
}

.reward-art {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 24px;
  isolation: isolate;
}

.reward-art::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--art-bg);
}

.reward-art.has-image {
  background: #efe6d8;
}

.reward-art.has-image::before {
  display: none;
}

.reward-art img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.42s ease;
}

.reward-card:hover .reward-art img {
  transform: scale(1.035);
}

.reward-card span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: #10632b;
  font-weight: 900;
}

.reward-card h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.05em;
}

.reward-card button {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #ece3d4;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  isolation: isolate;
  transition: transform 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.reward-card button:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: no-preference) {
  .welcome-panel,
  .hero-course,
  .stats-row article,
  .course-tile,
  .progress-panel > *,
  .course-detail-hero,
  .detail-layout > *,
  .library-hero,
  .library-card,
  .exam-progress-strip,
  .profile-hero,
  .profile-stats article,
  .learning-board > *,
  .learning-history {
    animation: rise 0.58s both;
  }

  .hero-course,
  .stats-row article:nth-child(2),
  .course-tile,
  .detail-layout > *:nth-child(2),
  .library-card:nth-child(2) {
    animation-delay: 0.08s;
  }
}

@keyframes rise {
  from {
    transform: translateY(18px);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .welcome-panel {
    align-items: stretch;
  }

  .welcome-panel h1 {
    max-width: 100%;
    font-size: clamp(28px, 3.7vw, 39px);
  }

  .profile-chip {
    min-width: 0;
    width: min(420px, 100%);
  }

  .hero-course {
    grid-template-columns: 1fr;
  }

  .cover-large {
    min-height: 220px;
  }

  .hero-copy h2 {
    max-width: 760px;
    font-size: clamp(32px, 5.8vw, 48px);
  }
}

@media (max-width: 900px) {
  .learning-app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-tabbar {
    position: fixed;
    z-index: 80;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    border: 1px solid rgba(11, 50, 45, 0.12);
    border-radius: 24px;
    background: rgba(255, 250, 240, 0.9);
    box-shadow: 0 18px 48px rgba(11, 50, 45, 0.2);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .mobile-tabbar a {
    display: grid;
    min-height: 44px;
    place-items: center;
    border-radius: 17px;
    color: rgba(11, 50, 45, 0.7);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.02em;
  }

  .mobile-tabbar a.active {
    background: linear-gradient(135deg, var(--nav), #176a5d);
    color: #fffaf0;
    box-shadow: 0 10px 22px rgba(11, 50, 45, 0.2);
  }

  .toast {
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 90;
  }

  .mobile-top {
    display: flex;
    margin-bottom: 18px;
  }

  .dashboard {
    padding: 18px clamp(14px, 4vw, 28px) calc(112px + env(safe-area-inset-bottom));
  }

  .hero-course,
  .content-grid,
  .course-detail-hero,
  .detail-layout,
  .store-hero,
  .library-hero,
  .profile-hero,
  .library-grid,
  .primary-library-card,
  .learning-board,
  .task-hero,
  .quiz-layout,
  .review-layout {
    grid-template-columns: 1fr;
  }

  .hero-course {
    min-height: auto;
  }

  .hero-copy h2 {
    max-width: 760px;
    font-size: clamp(32px, 7vw, 48px);
  }

  .progress-panel {
    padding-top: 0;
  }

  .action-card,
  .exam-aside,
  .privacy-card {
    position: static;
  }

  .reward-grid,
  .library-grid,
  .profile-stats {
    grid-template-columns: 1fr;
  }

  .profile-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .learning-history li {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 18px;
  }

  .learning-history li.history-link-item a,
  .record-detail-grid {
    grid-template-columns: 1fr;
  }

  .learning-history li.history-link-item a {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 17px 14px 17px 22px;
  }

  .learning-history .history-state {
    grid-column: 1;
    grid-row: 1;
  }

  .learning-history .history-course {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .learning-history .history-course strong {
    white-space: normal;
  }

  .learning-history .history-reward {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }

  .learning-history .history-open {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 760px) {
  .welcome-panel,
  .profile-chip,
  .hero-actions,
  .section-head,
  .detail-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-chip {
    width: 100%;
  }

  .hero-course {
    grid-template-columns: 1fr;
    padding: 20px;
    border-radius: 28px;
  }

  .cover-large,
  .tile-cover,
  .detail-cover-art,
  .library-cover {
    min-height: 220px;
  }

  .stats-row,
  .summary-stats,
  .about-modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .level-card {
    grid-column: 1 / -1;
  }

  .course-tile {
    grid-template-columns: 1fr;
  }

  .exam-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .star-control {
    max-width: 100%;
  }

  .star-visual {
    gap: 6px;
  }

  .star-slot {
    width: 30px;
    font-size: 30px;
  }

  .learning-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .stats-row,
  .summary-stats,
  .about-modules {
    grid-template-columns: 1fr;
  }

  .dashboard {
    padding-inline: 10px;
  }

  .welcome-panel,
  .detail-summary,
  .about-card,
  .action-card {
    padding: 22px;
    border-radius: 24px;
  }
}
