/* =========================================================
   KL ???? ??Frontend Design System
   ========================================================= */

.cc-app {
  /* Brand */
  --cc-brand: #46C37B;
  --cc-brand-dark: #2f9d5f;
  --cc-brand-deep: #1f7a48;
  --cc-brand-soft: #e8f8ef;
  --cc-brand-mist: #f3fbf6;

  /* Neutrals */
  --cc-ink: #132019;
  --cc-ink-soft: #2c3d33;
  --cc-muted: #5f7267;
  --cc-faint: #8a9a90;
  --cc-line: #d5e2d9;
  --cc-line-soft: #e8efe9;
  --cc-paper: #ffffff;
  --cc-canvas: #f2f6f3;

  /* Channel accents */
  --cc-offline: #c2410c;
  --cc-offline-soft: #fff4ed;
  --cc-online: var(--cc-brand-deep);
  --cc-online-soft: var(--cc-brand-soft);

  /* Feedback */
  --cc-danger: #c0392b;
  --cc-success: var(--cc-brand-deep);

  /* Elevation */
  --cc-shadow-sm: 0 1px 2px rgba(19, 32, 25, 0.04);
  --cc-shadow: 0 8px 28px rgba(19, 32, 25, 0.07);
  --cc-shadow-lg: 0 18px 48px rgba(19, 32, 25, 0.1);

  /* Shape & type */
  --cc-radius: 14px;
  --cc-radius-sm: 10px;
  --cc-radius-xs: 8px;
  --cc-font-display: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --cc-font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --cc-max: 1120px;
  --cc-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: relative;
  max-width: var(--cc-max);
  margin: 0 auto;
  padding: 0 0 64px;
  color: var(--cc-ink);
  font-family: var(--cc-font-body);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

.cc-app *,
.cc-app *::before,
.cc-app *::after { box-sizing: border-box; }

.cc-app a { color: var(--cc-brand-deep); text-decoration: none; transition: color .2s var(--cc-ease); }
.cc-app a:hover { color: var(--cc-brand-dark); }

/* ---- Shell breakout for atmosphere ---- */
.cc-shell {
  position: relative;
  overflow: clip;
  background:
    radial-gradient(1200px 480px at 12% -10%, rgba(70, 195, 123, 0.16), transparent 60%),
    radial-gradient(900px 420px at 92% 8%, rgba(47, 157, 95, 0.1), transparent 55%),
    linear-gradient(180deg, #f7faf8 0%, var(--cc-canvas) 40%, #eef3f0 100%);
  padding: 0 16px 48px;
  margin: 0 -12px;
}

/* ---- Top nav (light segmented control) ---- */
.cc-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  padding: 16px 4px 12px;
  margin-bottom: 10px;
  animation: cc-fade-up .55s var(--cc-ease) both;
}
.cc-topnav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--cc-ink) !important;
  font-family: var(--cc-font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-decoration: none !important;
}
.cc-topnav__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--cc-brand) 0%, var(--cc-brand-deep) 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(70, 195, 123, 0.35);
}
.cc-topnav__links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 4px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 250, 248, 0.98) 100%);
  border: 1px solid rgba(70, 195, 123, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 22px rgba(47, 157, 95, 0.08),
    0 2px 6px rgba(26, 46, 35, 0.04);
}
.cc-topnav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--cc-font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--cc-muted) !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition:
    background .2s var(--cc-ease),
    color .2s var(--cc-ease),
    box-shadow .2s var(--cc-ease),
    transform .2s var(--cc-ease);
}
.cc-topnav__link:hover {
  background: rgba(70, 195, 123, 0.12);
  color: var(--cc-ink) !important;
  transform: translateY(-1px);
}
.cc-topnav__link.is-active {
  background: #fff;
  color: var(--cc-brand-deep) !important;
  box-shadow:
    0 4px 14px rgba(70, 195, 123, 0.18),
    0 1px 2px rgba(26, 46, 35, 0.06);
  outline: 1.5px solid rgba(70, 195, 123, 0.28);
  outline-offset: -1.5px;
}
.cc-topnav__link.is-active:hover {
  background: #fff;
  color: var(--cc-ink) !important;
  transform: none;
}
.cc-topnav__link:focus-visible {
  outline: 2px solid var(--cc-brand);
  outline-offset: 2px;
}
.cc-topnav__label--short { display: none; }

/* ---- Typography helpers ---- */
.cc-eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-brand-deep);
}
.cc-page-title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--cc-ink);
}
.cc-lead {
  margin: 10px 0 0;
  max-width: 42em;
  color: var(--cc-muted);
  font-size: 15px;
  line-height: 1.7;
}
.cc-section { margin: 36px 0; }
.cc-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.cc-section-title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Home featured section headings */
.cc-section-head--home {
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cc-line-soft);
}
.cc-home-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  animation: cc-fade-up .55s var(--cc-ease) both;
}
.cc-home-heading__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--cc-brand-deep);
  background:
    linear-gradient(155deg, #ffffff 0%, var(--cc-brand-soft) 72%, #dff5e8 100%);
  border: 1px solid rgba(70, 195, 123, 0.3);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 18px rgba(70, 195, 123, 0.14);
}
.cc-home-heading__icon svg {
  display: block;
}
.cc-home-heading__main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}
.cc-home-heading__title {
  position: relative;
  display: inline-block;
  margin: 0;
  padding-bottom: 7px;
  font-family: var(--cc-font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--cc-ink);
}
.cc-home-heading__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cc-brand) 0%, var(--cc-brand-deep) 42%, rgba(70, 195, 123, 0) 100%);
}
.cc-home-heading__rule {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  margin: 0 2px;
  background: var(--cc-line);
  align-self: center;
  transform: translateY(-1px);
}
.cc-home-heading__sub {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cc-muted);
  white-space: nowrap;
}

.cc-muted { color: var(--cc-muted); }
.cc-faint { color: var(--cc-faint); font-size: 13px; }

/* ---- Page head ---- */
.cc-page-head {
  padding: 18px 0 8px;
  margin-bottom: 20px;
  animation: cc-fade-up .5s var(--cc-ease) both;
}
.cc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cc-muted) !important;
}
.cc-back:hover { color: var(--cc-brand-deep) !important; }
.cc-back::before {
  content: '??;
  font-family: var(--cc-font-display);
}

/* ---- Buttons ---- */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  text-decoration: none !important;
  font-family: var(--cc-font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  transition: transform .2s var(--cc-ease), background .2s, border-color .2s, box-shadow .2s, color .2s;
}
.cc-btn:hover { transform: translateY(-1px); }
.cc-btn:active { transform: translateY(0); }
.cc-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.cc-btn-primary {
  background: linear-gradient(180deg, #52cd86 0%, var(--cc-brand) 100%);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(70, 195, 123, 0.28);
}
.cc-btn-primary:hover {
  background: linear-gradient(180deg, var(--cc-brand) 0%, var(--cc-brand-dark) 100%);
  color: #fff !important;
}
.cc-btn-outline {
  background: rgba(255, 255, 255, 0.55);
  color: var(--cc-ink) !important;
  border-color: var(--cc-line);
  backdrop-filter: blur(6px);
}
.cc-btn-outline:hover {
  border-color: var(--cc-brand);
  color: var(--cc-brand-deep) !important;
  background: #fff;
}
.cc-btn-ghost {
  background: transparent;
  color: var(--cc-muted) !important;
  border-color: transparent;
}
.cc-btn-block { width: 100%; }
.cc-btn-lg { padding: 14px 28px; font-size: 15px; }
.cc-btn-sm { padding: 7px 12px; font-size: 12px; }

/* ---- Pills / badges ---- */
.cc-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--cc-brand-soft);
  color: var(--cc-brand-deep);
  white-space: nowrap;
}
.cc-pill-offline { background: var(--cc-offline-soft); color: var(--cc-offline); }
.cc-pill-online { background: var(--cc-online-soft); color: var(--cc-online); }
.cc-pill-neutral { background: var(--cc-line-soft); color: var(--cc-muted); }
.cc-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

/* ---- Cards (interactive / content containers only) ---- */
.cc-card {
  background: var(--cc-paper);
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius);
  padding: 22px;
  box-shadow: var(--cc-shadow-sm);
}
.cc-panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius);
  padding: 20px;
  backdrop-filter: blur(10px);
}

/* ---- Forms ---- */
.cc-field { margin-bottom: 12px; }
.cc-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cc-muted);
}
.cc-input {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius-xs);
  background: #fff;
  color: var(--cc-ink);
  font-family: inherit;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.cc-input:focus {
  outline: none;
  border-color: var(--cc-brand);
  box-shadow: 0 0 0 3px rgba(70, 195, 123, 0.18);
}
.cc-input::placeholder { color: var(--cc-faint); }

.cc-channel-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.cc-channel-switch label,
.cc-seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--cc-line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-ink-soft);
  transition: border-color .2s, background .2s, color .2s;
}
.cc-channel-switch label:has(input:checked),
.cc-seg.is-active {
  border-color: var(--cc-brand);
  background: var(--cc-brand-soft);
  color: var(--cc-brand-deep);
  box-shadow: 0 0 0 1px var(--cc-brand);
}
.cc-channel-switch input { accent-color: var(--cc-brand); }

/* ---- Empty / status ---- */
.cc-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--cc-muted);
  border: 1px dashed var(--cc-line);
  border-radius: var(--cc-radius);
  background: rgba(255, 255, 255, 0.5);
}
.cc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--cc-line-soft);
  color: var(--cc-muted);
}
.cc-status--ok { background: var(--cc-brand-soft); color: var(--cc-brand-deep); }
.cc-status--warn { background: #fff4e5; color: #9a6700; }
.cc-status--bad { background: #fdecea; color: var(--cc-danger); }

/* =========================================================
   HOME
   ========================================================= */
.cc-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 28px;
  padding: clamp(32px, 4.5vw, 48px) 20px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  animation: cc-fade-up .55s var(--cc-ease) both;
}
.cc-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(115deg, #1f7a48 0%, #46C37B 55%, #2f9d5f 100%);
}
.cc-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 90% 50%, rgba(255, 255, 255, 0.12), transparent 55%);
}
.cc-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--cc-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 20px 40px;
}
.cc-hero__copy {
  flex: 0 1 auto;
  max-width: 28rem;
  min-width: 0;
}
.cc-hero__brand {
  margin: 0 0 8px;
  font-family: var(--cc-font-display);
  font-size: clamp(1.65rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.cc-hero__headline {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.45;
  opacity: 0.92;
}
/* CTA beside copy — left group, not pinned to the far right */
.cc-hero__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px 18px;
  margin-left: 60px;
}
.cc-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  min-width: 148px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--cc-font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  transition:
    background .2s var(--cc-ease),
    color .2s var(--cc-ease),
    border-color .2s var(--cc-ease),
    box-shadow .2s var(--cc-ease),
    transform .2s var(--cc-ease);
}
.cc-hero__cta--primary {
  background: #fff;
  color: var(--cc-brand-deep) !important;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.cc-hero__cta--primary:hover {
  background: #f5fff8;
  color: var(--cc-ink) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.cc-hero__cta--secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.cc-hero__cta--secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff !important;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.7);
}
.cc-hero__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Homepage coupon strip */
.cc-home-coupon {
  margin: 0 0 22px;
  border-radius: var(--cc-radius);
  background:
    linear-gradient(120deg, rgba(70, 195, 123, 0.16) 0%, rgba(232, 248, 239, 0.95) 45%, #fff 100%);
  border: 1px solid #b8e6cc;
  box-shadow: var(--cc-shadow-sm);
  overflow: hidden;
  position: relative;
  animation: cc-fade-up .55s .04s var(--cc-ease) both;
}
.cc-home-coupon::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cc-brand) 0%, var(--cc-brand-deep) 100%);
}
.cc-home-coupon__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 16px 18px 16px 22px;
}
.cc-home-coupon__copy {
  flex: 1 1 200px;
  min-width: 0;
}
.cc-home-coupon__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cc-brand-deep);
}
.cc-home-coupon__benefit {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cc-danger);
  line-height: 1.2;
}
.cc-home-coupon__hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--cc-muted);
}
.cc-home-coupon__code-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cc-home-coupon__code {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px dashed var(--cc-brand);
  font-family: var(--cc-font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cc-brand-deep);
}
.cc-home-coupon__copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--cc-brand-deep);
  background: var(--cc-brand);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(70, 195, 123, 0.28);
  transition: background .2s var(--cc-ease), transform .2s var(--cc-ease), box-shadow .2s var(--cc-ease);
}
.cc-home-coupon__copy-btn:hover {
  background: var(--cc-brand-dark);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(70, 195, 123, 0.35);
}
.cc-home-coupon__copy-btn.is-copied {
  background: var(--cc-brand-deep);
  border-color: var(--cc-brand-deep);
  color: #fff !important;
}
.cc-home-coupon__cta {
  flex-shrink: 0;
  min-width: 112px;
  justify-content: center;
}

/* Homepage recommend CTA card */
.cc-home-recommend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin: 0 0 28px;
  padding: 20px 22px;
  border-radius: var(--cc-radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow-sm);
  animation: cc-fade-up .55s .06s var(--cc-ease) both;
  transition: border-color .25s var(--cc-ease), box-shadow .25s var(--cc-ease);
}
.cc-home-recommend:hover {
  border-color: rgba(70, 195, 123, 0.28);
  box-shadow: var(--cc-shadow);
}
.cc-home-recommend__icon {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--cc-brand-soft);
  color: var(--cc-brand-deep);
}
.cc-home-recommend__copy {
  flex: 1 1 220px;
  min-width: 0;
}
.cc-home-recommend__title {
  margin: 0 0 6px;
  font-family: var(--cc-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
}
.cc-home-recommend__sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--cc-muted);
}
.cc-home-recommend__cta {
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .cc-home-coupon__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 14px 14px 18px;
  }
  .cc-home-coupon__code-wrap {
    width: 100%;
  }
  .cc-home-coupon__code {
    flex: 1;
    text-align: center;
  }
  .cc-home-coupon__cta {
    width: 100%;
  }
  .cc-home-recommend {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .cc-home-recommend__cta {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 600px) {
  .cc-home-coupon__benefit {
    font-size: 1.2rem;
  }
  .cc-home-recommend__title {
    font-size: 1.1rem;
  }
}

.cc-pathways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 40px;
  animation: cc-fade-up .6s .08s var(--cc-ease) both;
}
.cc-pathway {
  display: block;
  padding: 22px 20px;
  border-radius: var(--cc-radius);
  border: 1px solid var(--cc-line-soft);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--cc-shadow-sm);
  color: inherit !important;
  transition: transform .25s var(--cc-ease), box-shadow .25s, border-color .25s;
}
.cc-pathway:hover {
  transform: translateY(-3px);
  box-shadow: var(--cc-shadow);
  border-color: #b8e0c8;
  color: inherit !important;
}
.cc-pathway__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--cc-brand-soft);
  color: var(--cc-brand-deep);
  font-family: var(--cc-font-display);
  font-weight: 700;
  font-size: 14px;
}
.cc-pathway h3 {
  margin: 0 0 6px;
  font-family: var(--cc-font-display);
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
}
.cc-pathway p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--cc-muted);
}

/* Package grid / cards */
.cc-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.cc-package-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  transition: transform .25s var(--cc-ease), box-shadow .25s;
  animation: cc-fade-up .55s var(--cc-ease) both;
}
.cc-package-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cc-shadow);
}
.cc-package-card__top {
  padding: 22px 22px 0;
  flex: 1;
}
.cc-package-card__foot {
  padding: 0 22px 22px;
  margin-top: auto;
}
.cc-package-name {
  margin: 0 0 8px;
  font-family: var(--cc-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
  line-height: 1.3;
}
.cc-package-card .cc-muted {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cover images — cards & detail heroes */
.cc-cover {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(145deg, var(--cc-brand-soft), #cfe9d9);
}
.cc-cover[hidden] { display: none !important; }
.cc-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.cc-cover--card {
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  background: linear-gradient(145deg, #e8f8ef 0%, #d4eedf 100%);
}
.cc-cover--card img {
  transition: transform .35s var(--cc-ease);
}
.cc-package-card:hover .cc-cover--card img {
  transform: scale(1.03);
}
.cc-cover__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(70, 195, 123, 0.92);
  backdrop-filter: blur(4px);
}
.cc-cover__badge--course {
  background: rgba(19, 32, 25, 0.72);
}
.cc-cover__badge--sale {
  background: rgba(194, 65, 12, 0.92);
}
.cc-cover__badge--preview {
  background: rgba(31, 122, 72, 0.92);
}
.cc-inline-tag {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}
.cc-inline-tag--sale { background: var(--cc-offline); }
.cc-inline-tag--preview { background: var(--cc-brand-deep); }
.cc-package-card__sale-end {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--cc-offline);
}
/* Detail heroes: fixed height + full width (no aspect-ratio — it shrinks width when max-height binds). */
.cc-cover--detail {
  margin: 0 0 18px;
  width: 100%;
  height: 280px;
  max-height: 280px;
  aspect-ratio: auto;
  border-radius: calc(var(--cc-radius) + 2px);
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow-sm);
}
.cc-cover--detail img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  animation: cc-cover-fade .55s var(--cc-ease) both;
}
@keyframes cc-cover-fade {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cc-cover--detail img { animation: none; }
}
/* Full-bleed top of hero cards (back link lives outside hero). */
.cc-course-hero .cc-cover--course-hero,
.cc-pkg-hero .cc-cover--pkg-hero {
  width: calc(100% + 48px);
  max-width: none;
  height: 240px;
  max-height: 240px;
  margin: 0 -24px 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--cc-line-soft);
  box-shadow: none;
}
@media (max-width: 768px) {
  .cc-cover--detail {
    height: 180px;
    max-height: 180px;
    margin-bottom: 14px;
  }
  .cc-course-hero .cc-cover--course-hero,
  .cc-pkg-hero .cc-cover--pkg-hero {
    width: calc(100% + 48px);
    height: 180px;
    max-height: 180px;
    margin: 0 -24px 0;
  }
}

/* =========================================================
   DETAIL layouts
   ========================================================= */
.cc-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
.cc-detail-main .cc-section-title,
.cc-detail-main h2 {
  margin: 0 0 12px;
  font-family: var(--cc-font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.cc-detail-block {
  margin-bottom: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius);
}
.cc-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.cc-feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--cc-brand-mist);
  border-radius: var(--cc-radius-xs);
  font-size: 14px;
  border: 1px solid transparent;
  transition: border-color .2s var(--cc-ease), box-shadow .2s var(--cc-ease), transform .2s var(--cc-ease);
}
.cc-feature-list li:hover {
  border-color: rgba(70, 195, 123, 0.28);
  box-shadow: 0 4px 14px rgba(19, 32, 25, 0.05);
  transform: translateY(-1px);
}
.cc-feature-icon {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--cc-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.cc-feature-icon__svg {
  display: block;
  width: 15px;
  height: 15px;
}
.cc-course-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.cc-course-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius-sm);
  background: #fff;
}
.cc-course-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

/* ---- Package detail: hero + stats + course cards ---- */
.cc-package-detail {
  animation: cc-fade-up .5s var(--cc-ease) both;
}
.cc-package-detail__back {
  display: inline-block;
  margin: 0 0 12px;
}
.cc-package-detail__layout {
  margin-top: 4px;
}
.cc-pkg-hero {
  margin: 0 0 28px;
  padding: 22px 24px 24px;
  border-radius: calc(var(--cc-radius) + 4px);
  background:
    radial-gradient(720px 280px at 0% 0%, rgba(70, 195, 123, 0.14), transparent 55%),
    linear-gradient(165deg, #ffffff 0%, #f4faf6 100%);
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow-sm);
  overflow: hidden;
}
.cc-pkg-hero.has-cover {
  padding-top: 0;
}
.cc-pkg-hero__body {
  padding-top: 20px;
}
.cc-pkg-hero.has-cover .cc-pkg-hero__body {
  padding-top: 22px;
}
.cc-pkg-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-brand-deep);
}
.cc-pkg-hero__title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--cc-ink);
}
.cc-pkg-hero__lead {
  margin: 12px 0 0;
  max-width: 42em;
  font-size: 15px;
  line-height: 1.7;
  color: var(--cc-muted);
}
.cc-pkg-hero__prices {
  margin-top: 18px;
}
.cc-pkg-stats {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--cc-radius);
  background:
    linear-gradient(135deg, rgba(70, 195, 123, 0.14) 0%, rgba(31, 122, 72, 0.08) 100%),
    #fff;
  border: 1px solid #b8e6cc;
  box-shadow: var(--cc-shadow-sm);
}
.cc-pkg-stats__top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  min-width: 0;
}
.cc-pkg-stats__hero {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.cc-pkg-stats__value {
  font-family: var(--cc-font-display);
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--cc-brand-deep);
}
.cc-pkg-stats__unit {
  font-family: var(--cc-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cc-ink);
}
.cc-pkg-stats__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cc-muted);
}
.cc-pkg-stats__side {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}
.cc-pkg-stats__chip {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 12px 20px 12px 18px;
  border-radius: 14px;
  background:
    linear-gradient(155deg, #ffffff 0%, var(--cc-brand-soft) 78%, #dff5e8 100%);
  color: var(--cc-ink-soft);
  border: 1px solid #b8e6cc;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 6px 18px rgba(31, 122, 72, 0.12);
}
.cc-pkg-stats__chip strong {
  font-family: var(--cc-font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--cc-brand-deep);
}
.cc-pkg-stats__chip span {
  font-family: var(--cc-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--cc-ink-soft);
  opacity: 1;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.cc-pkg-stats__chip--alt {
  background:
    linear-gradient(155deg, #f7fcf9 0%, #eaf8f0 100%);
  border-color: #c5e9d4;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 12px rgba(31, 122, 72, 0.08);
}
.cc-pkg-stats__chip--alt strong {
  color: var(--cc-brand-deep);
}
.cc-pkg-stats__chip--alt span {
  color: var(--cc-brand-dark);
}

.cc-pkg-courses.cc-info-card {
  padding-bottom: 20px;
}
.cc-pkg-courses__head.cc-info-card__head {
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.cc-pkg-courses__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cc-pkg-courses__total {
  margin-left: auto;
  font-size: 13px;
  color: var(--cc-muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cc-brand-soft);
  border: 1px solid rgba(70, 195, 123, 0.22);
}
.cc-pkg-courses__total strong {
  color: var(--cc-brand-deep);
  font-size: 15px;
  font-family: var(--cc-font-display);
}
.cc-pkg-preview-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--cc-radius-sm);
  background: var(--cc-brand-soft);
  border: 1px solid rgba(70, 195, 123, 0.28);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cc-brand-deep);
}
.cc-pkg-preview-hint__icon {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cc-brand);
  color: #fff;
  margin-top: 1px;
}
.cc-pkg-course__preview-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--cc-brand);
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.cc-pkg-course-list {
  display: grid;
  gap: 14px;
}
.cc-pkg-course {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius-sm);
  background: #fff;
  box-shadow: var(--cc-shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.cc-pkg-course:hover {
  border-color: #b8e0c8;
  box-shadow: var(--cc-shadow);
}
.cc-pkg-course__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-right: 4px;
}
.cc-pkg-course__title-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}
.cc-pkg-course__index {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--cc-brand-mist);
  color: var(--cc-brand-deep);
  font-family: var(--cc-font-display);
  font-size: 12px;
  font-weight: 700;
}
.cc-pkg-course__name {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--cc-ink);
}
.cc-pkg-course__name a {
  color: inherit !important;
  text-decoration: none;
}
.cc-pkg-course__name a:hover { color: var(--cc-brand-deep) !important; }
.cc-pkg-course__group-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cc-offline);
  background: var(--cc-offline-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

/* High-contrast lesson badge ? top right of card */
.cc-pkg-course__lessons {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 12px 7px;
  border-radius: 12px;
  background: linear-gradient(160deg, #1f7a48 0%, #46C37B 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(31, 122, 72, 0.28);
  line-height: 1.1;
  text-align: center;
}
.cc-pkg-course__lessons em {
  font-family: var(--cc-font-display);
  font-style: normal;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.cc-pkg-course__lessons small {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.92;
  letter-spacing: 0.04em;
}

.cc-pkg-course__block {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
}
.cc-pkg-course__block--summary {
  background: #f7f9f8;
  border: 1px solid var(--cc-line-soft);
}
.cc-pkg-course__block--detail {
  background: linear-gradient(180deg, #f3fbf6 0%, #fff 100%);
  border: 1px solid #c5e8d4;
}
.cc-pkg-course__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cc-muted);
  text-transform: none;
}
.cc-pkg-course__label--detail,
.cc-pkg-course__label--outline {
  color: var(--cc-brand-deep);
}
.cc-pkg-course__label-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #dfe6e2;
  color: var(--cc-ink-soft);
  font-size: 11px;
  font-weight: 700;
}
.cc-pkg-course__label--detail .cc-pkg-course__label-mark,
.cc-pkg-course__label--outline .cc-pkg-course__label-mark {
  background: var(--cc-brand);
  color: #fff;
}
.cc-pkg-course__label--outline .cc-pkg-course__label-mark {
  background: var(--cc-brand-deep);
}
.cc-pkg-course__summary {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--cc-ink-soft);
}
.cc-pkg-course__content {
  font-size: 14px;
  line-height: 1.75;
  color: var(--cc-ink);
}
.cc-pkg-course__content p:first-child { margin-top: 0; }
.cc-pkg-course__content p:last-child { margin-bottom: 0; }
.cc-pkg-course__content .cc-rich-list,
.cc-pkg-course__outline .cc-rich-list {
  gap: 10px;
}
.cc-pkg-course__content .cc-rich-list__item,
.cc-pkg-course__outline .cc-rich-list__item {
  padding: 12px 14px 12px 48px;
  background: #fff;
  box-shadow: var(--cc-shadow-sm);
  transition: border-color .2s var(--cc-ease), box-shadow .2s var(--cc-ease);
}
.cc-pkg-course__content .cc-rich-list__item:hover,
.cc-pkg-course__outline .cc-rich-list__item:hover {
  border-color: rgba(70, 195, 123, 0.35);
  box-shadow: 0 4px 14px rgba(19, 32, 25, 0.05);
}
.cc-pkg-course__content .cc-rich-list__item::before,
.cc-pkg-course__outline .cc-rich-list__item::before {
  left: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.cc-pkg-course__outline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #c5e8d4;
}
.cc-pkg-course__outline .cc-rich {
  font-size: 14px;
  color: var(--cc-ink);
}
.cc-pkg-course__empty {
  margin: 0;
  font-size: 13px;
  color: var(--cc-faint);
}

.cc-pkg-course__children {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--cc-canvas);
  border-radius: 10px;
}
.cc-pkg-course__children-title {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cc-muted);
}
.cc-pkg-course__children ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.cc-pkg-course__children li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--cc-line-soft);
  font-size: 13px;
}
.cc-pkg-course__child-name { font-weight: 600; color: var(--cc-ink); }
.cc-pkg-course__child-lessons {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--cc-brand-deep);
  background: var(--cc-brand-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.cc-buy-box__lessons {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cc-line-soft);
}
.cc-buy-box__lessons strong {
  font-family: var(--cc-font-display);
  font-size: 1.75rem;
  color: var(--cc-brand-deep);
  letter-spacing: -0.03em;
  line-height: 1;
}
.cc-buy-box__lessons span {
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-muted);
}

@media (max-width: 600px) {
  .cc-pkg-course__head { flex-wrap: wrap; }
  .cc-pkg-course__lessons {
    margin-left: auto;
  }
  .cc-pkg-stats { padding: 14px 16px; gap: 6px; }
  .cc-pkg-stats__top { gap: 8px; }
  .cc-pkg-stats__chip {
    padding: 8px 12px;
    gap: 5px;
    border-radius: 12px;
  }
  .cc-pkg-stats__chip strong {
    font-size: 1.45rem;
  }
  .cc-pkg-stats__chip span {
    font-size: 12px;
  }
  .cc-pkg-stats__unit {
    font-size: 1rem;
  }
}
.cc-buy-box {
  position: sticky;
  top: 20px;
  padding: 22px;
  border-radius: var(--cc-radius);
  background: #fff;
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow);
  transition: border-color .25s var(--cc-ease), box-shadow .25s var(--cc-ease);
}
.cc-buy-box:hover {
  border-color: rgba(70, 195, 123, 0.28);
  box-shadow: var(--cc-shadow-lg);
}
.cc-pkg-buy__label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-brand-deep);
}
.cc-buy-box .cc-input:focus {
  border-color: var(--cc-brand);
  box-shadow: 0 0 0 3px rgba(70, 195, 123, 0.18);
  outline: none;
}
.cc-buy-box__price {
  margin: 0 0 4px;
  font-family: var(--cc-font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cc-brand-deep);
}
.cc-buy-box__hint {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--cc-faint);
}
.cc-contact-form { margin: 8px 0 14px; }
.cc-rich {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--cc-ink-soft);
}
.cc-rich p { margin: 0 0 12px; }
.cc-rich p:last-child { margin-bottom: 0; }
.cc-rich ul,
.cc-rich ol:not(.cc-rich-list) {
  margin: 0 0 12px;
  padding-left: 1.25em;
}
.cc-rich li { margin: 0 0 8px; }
.cc-rich li:last-child { margin-bottom: 0; }

/* Auto-structured numbered content (1、2、3、) */
.cc-rich-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: cc-rich;
}
.cc-rich-list__item {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 14px 16px 14px 52px;
  border-radius: var(--cc-radius-sm);
  background: linear-gradient(180deg, #f7fbf8 0%, #f3f8f5 100%);
  border: 1px solid var(--cc-line-soft);
}
.cc-rich-list__item::before {
  counter-increment: cc-rich;
  content: counter(cc-rich);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--cc-font-display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--cc-brand) 0%, var(--cc-brand-deep) 100%);
  box-shadow: 0 4px 10px rgba(70, 195, 123, 0.28);
}
.cc-rich-list__label {
  display: block;
  font-family: var(--cc-font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cc-ink);
  line-height: 1.35;
}
.cc-rich-list__body {
  display: block;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--cc-muted);
}
.cc-rich-list__subs {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.cc-rich-list__subs li {
  position: relative;
  margin: 0;
  padding-left: 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--cc-muted);
}
.cc-rich-list__subs li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cc-brand);
  opacity: 0.75;
}
.cc-teacher {
  display: flex;
  gap: 14px;
  align-items: center;
}
.cc-teacher__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--cc-brand-soft), #cfe9d9);
  display: grid;
  place-items: center;
  font-family: var(--cc-font-display);
  font-weight: 700;
  color: var(--cc-brand-deep);
}
.cc-teacher__name { margin: 0; font-weight: 700; }
.cc-teacher__title { margin: 2px 0 0; font-size: 13px; color: var(--cc-muted); }
.cc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--cc-muted);
}

/* =========================================================
   COURSE DETAIL — refined layout
   ========================================================= */
.cc-course-detail {
  animation: cc-fade-up .5s var(--cc-ease) both;
}
.cc-course-detail__back {
  display: inline-block;
  margin: 0 0 12px;
}
.cc-course-hero {
  margin: 0 0 28px;
  padding: 22px 24px 24px;
  border-radius: calc(var(--cc-radius) + 4px);
  background:
    radial-gradient(720px 280px at 0% 0%, rgba(70, 195, 123, 0.14), transparent 55%),
    linear-gradient(165deg, #ffffff 0%, #f4faf6 100%);
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow-sm);
  overflow: hidden;
}
.cc-course-hero.has-cover {
  padding-top: 0;
}
.cc-course-hero.has-cover .cc-course-hero__grid {
  padding-top: 22px;
}
.cc-course-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 28px;
  align-items: end;
}
.cc-course-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-brand-deep);
}
.cc-course-hero__title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--cc-ink);
}
.cc-course-hero__lead {
  margin: 12px 0 0;
  max-width: 40em;
  font-size: 15px;
  line-height: 1.7;
  color: var(--cc-muted);
}
.cc-course-hero__actions {
  margin-top: 16px;
}
/* Brand green solid CTA (matches course-center design system) */
.cc-btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--cc-radius-sm);
  background: linear-gradient(145deg, #46C37B 0%, var(--cc-brand-deep, #1f7a48) 100%);
  color: #fff !important;
  font-family: var(--cc-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 20px rgba(70, 195, 123, 0.32);
  transition: transform .2s var(--cc-ease), box-shadow .2s var(--cc-ease), filter .2s;
  cursor: pointer;
}
.cc-btn-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(70, 195, 123, 0.4);
  filter: brightness(1.03);
  color: #fff !important;
}
.cc-btn-preview:focus-visible {
  outline: 2px solid #46C37B;
  outline-offset: 3px;
}
.cc-btn-preview__icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.cc-btn-preview__icon svg { display: block; margin-left: 2px; }

.cc-course-stats {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cc-course-stats__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 88px;
  padding: 12px 14px;
  border-radius: var(--cc-radius-sm);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--cc-line-soft);
}
.cc-course-stats__item strong {
  font-family: var(--cc-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
  line-height: 1.2;
}
.cc-course-stats__item span {
  font-size: 12px;
  font-weight: 500;
  color: var(--cc-faint);
}
.cc-course-stats__item--offline strong { color: var(--cc-offline); }
.cc-course-stats__item--online strong { color: var(--cc-brand-deep); }

.cc-course-hero__teacher {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--cc-radius);
  background: #fff;
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow-sm);
  max-width: 280px;
}
.cc-course-hero__avatar,
.cc-teacher-card__avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--cc-brand-soft), #cfe9d9);
  font-family: var(--cc-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cc-brand-deep);
  border: 2px solid rgba(70, 195, 123, 0.35);
}
.cc-course-hero__avatar.has-photo,
.cc-teacher-card__avatar.has-photo {
  background: #e8efe9;
  box-shadow: 0 6px 16px rgba(19, 32, 25, 0.08);
}
.cc-course-hero__avatar img,
.cc-teacher-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cc-course-hero__teacher-label {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-faint);
}
.cc-course-hero__teacher-name {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
}
.cc-course-hero__teacher-title {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--cc-muted);
  line-height: 1.4;
}

.cc-course-detail__layout {
  margin-top: 4px;
}

/* Info cards */
.cc-info-card {
  margin-bottom: 18px;
  padding: 22px 24px;
  border-radius: var(--cc-radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow-sm);
  transition: box-shadow .25s var(--cc-ease), border-color .25s;
}
.cc-info-card:hover {
  border-color: rgba(70, 195, 123, 0.28);
  box-shadow: var(--cc-shadow);
}
.cc-info-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cc-line-soft);
}
.cc-info-card__icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--cc-brand-deep);
  background: var(--cc-brand-soft);
  flex-shrink: 0;
}
.cc-info-card__title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
}
.cc-info-card__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--cc-ink-soft);
}
.cc-rich--outline ul {
  margin: 0;
  padding-left: 1.15em;
}
.cc-rich--outline li {
  margin: 0 0 8px;
}
.cc-info-card .cc-rich-list__item {
  transition: border-color .2s var(--cc-ease), box-shadow .2s var(--cc-ease);
}
.cc-info-card .cc-rich-list__item:hover {
  border-color: rgba(70, 195, 123, 0.35);
  box-shadow: 0 4px 14px rgba(19, 32, 25, 0.05);
}

/* Teacher card */
.cc-teacher-card__body {
  display: grid;
  gap: 16px;
}
.cc-teacher-card__profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cc-teacher-card__avatar {
  width: 88px;
  height: 88px;
  font-size: 1.6rem;
}
.cc-teacher-card__name {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
}
.cc-teacher-card__title {
  margin: 6px 0 0;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cc-brand-deep);
  background: var(--cc-brand-soft);
}
.cc-teacher-card__bio {
  padding: 14px 16px;
  border-radius: var(--cc-radius-sm);
  background: var(--cc-brand-mist);
  border: 1px solid rgba(70, 195, 123, 0.12);
}
.cc-teacher-card__bio p:last-child { margin-bottom: 0; }
.cc-teacher-card__empty {
  margin: 0;
  font-size: 13px;
  color: var(--cc-faint);
}

/* Course sticky buy box */
.cc-course-buy {
  padding: 22px 22px 20px;
}
.cc-course-buy__label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cc-faint);
}
.cc-course-buy__prices {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.cc-course-buy__price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--cc-radius-xs);
  background: var(--cc-canvas);
  border: 1px solid var(--cc-line-soft);
}
.cc-course-buy__price strong {
  font-family: var(--cc-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
}
.cc-course-buy__summary {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cc-muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-course-buy__secondary { margin-top: 10px; }
.cc-course-buy__notes {
  list-style: none;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed var(--cc-line);
  display: grid;
  gap: 8px;
}
.cc-course-buy__notes li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  color: var(--cc-faint);
  line-height: 1.45;
}
.cc-course-buy__notes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cc-brand);
}

/* Preview modal player */
.cc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Preview modal — light card + brand green accent */
.cc-preview-modal {
  --cc-preview-accent: #46C37B;
  --cc-preview-ink: var(--cc-ink, #333);
  --cc-preview-muted: #888;
  --cc-preview-line: #e5e5e5;
  --cc-preview-soft: #f3fbf6;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft Yahei", MiSans, "HarmonyOS Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cc-preview-modal[hidden] { display: none !important; }
.cc-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.cc-preview-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(860px, 100%);
  max-width: 100%;
  height: auto;
  max-height: min(90vh, 90dvh);
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  color: var(--cc-preview-ink);
  border: 1px solid var(--cc-preview-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  animation: cc-fade-up .3s var(--cc-ease) both;
}
.cc-preview-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 16px 12px;
  background: #fff;
  border-bottom: 1px solid var(--cc-preview-line);
}
.cc-preview-modal__heading {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.cc-preview-modal__tag {
  display: inline-block;
  flex-shrink: 0;
  margin: 0;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  background: var(--cc-preview-accent);
}
.cc-preview-modal__title {
  margin: 0;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--cc-preview-ink);
  line-height: 1.35;
}
.cc-preview-modal__close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--cc-preview-line);
  border-radius: 4px;
  background: var(--cc-preview-soft);
  color: #666;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cc-preview-modal__close:hover {
  background: #fff;
  color: var(--cc-preview-accent);
  border-color: var(--cc-preview-accent);
}

.cc-preview-player {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
}
.cc-preview-player__stage {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: min(70vh, 70dvh);
  margin: 0 auto;
  background: #000;
  overflow: hidden;
}
.cc-preview-player__video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #000;
}
.cc-preview-player__loading,
.cc-preview-player__error {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 13px;
  color: #f0f0f0;
  pointer-events: none;
}
.cc-preview-player__error {
  pointer-events: auto;
  padding: 16px;
  text-align: center;
}
.cc-preview-player__loading[hidden],
.cc-preview-player__error[hidden],
.cc-preview-player__bigplay[hidden] { display: none !important; }
.cc-preview-player__spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--cc-preview-accent);
  animation: cc-spin .7s linear infinite;
}
.cc-preview-player__bigplay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;
  background: var(--cc-preview-accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.cc-preview-player__bigplay:hover {
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(1.04);
}
.cc-preview-player__bigplay svg { margin-left: 3px; }

.cc-preview-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 14px;
  background: #1a1a1a;
}
.cc-preview-controls__btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}
.cc-preview-controls__btn:hover { background: rgba(255, 255, 255, 0.18); }
.cc-preview-controls__scrub {
  flex: 1 1 160px;
  min-width: 120px;
}
.cc-preview-controls__scrub input[type="range"],
.cc-preview-controls__vol input[type="range"] {
  width: 100%;
  accent-color: var(--cc-preview-accent);
  cursor: pointer;
}
.cc-preview-controls__time {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #bbb;
  white-space: nowrap;
}
.cc-preview-controls__rate select {
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
}
.cc-preview-controls__vol { width: 88px; }

.cc-preview-ended {
  flex-shrink: 0;
  margin: 0;
  padding: 14px 16px 16px;
  background: var(--cc-preview-soft);
  border-top: 1px solid var(--cc-preview-line);
}
.cc-preview-ended[hidden] { display: none !important; }
.cc-preview-ended__text {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-preview-ink);
}
.cc-preview-ended__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cc-preview-ended__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px !important;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  line-height: 1.3;
}
.cc-preview-ended .btn-primary,
.cc-preview-ended a.btn-primary {
  color: #fff !important;
  background: var(--cc-preview-accent) !important;
  border: none;
}
.cc-preview-ended .btn-primary:hover {
  opacity: 0.9;
}
.cc-preview-ended .btn-default,
.cc-preview-ended a.btn-default {
  color: var(--cc-preview-ink) !important;
  background: #fff !important;
  border: 1px solid var(--cc-preview-line);
}
.cc-preview-ended .btn-default:hover {
  color: var(--cc-preview-accent) !important;
  border-color: var(--cc-preview-accent);
}

body.cc-preview-open {
  overflow: hidden !important;
  touch-action: none;
}

/*
 * Preview vs theme bottom bar (DUX .karbar):
 * - Always hide karbar while preview is open (all viewports).
 * - Do NOT use a bottom-sheet layout on H5 — that puts controls in the
 *   karbar collision zone and caused repeated regressions with AR fitting.
 * - PC stays centered + content-sized by video aspect ratio.
 */
html body.cc-preview-open .karbar,
html body.cc-preview-open.karbar-m-on .karbar,
html body.karbar-m-on.cc-preview-open .karbar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
html body.cc-preview-open.karbar-m-on,
html body.karbar-m-on.cc-preview-open {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 900px) {
  .cc-course-hero__grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .cc-course-hero__teacher {
    max-width: none;
  }
}
@media (max-width: 768px) {
  /* Centered card — not bottom sheet (avoids karbar / home-indicator clash) */
  .cc-preview-modal {
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    max-height: 100svh;
    padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
    overflow: hidden;
  }
  .cc-preview-modal__dialog {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100svh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 10px;
    border: 1px solid var(--cc-preview-line);
    overflow: hidden;
  }
  .cc-preview-modal__head {
    padding: 10px 12px 8px;
    flex-shrink: 0;
  }
  .cc-preview-modal__title {
    font-size: 15px;
  }
  .cc-preview-player {
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #000;
  }
  .cc-preview-player__stage {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: min(56vh, calc(100vh - 140px));
    max-height: min(56dvh, 56svh, calc(100svh - 140px));
    margin: 0 auto;
    background: #000;
  }
  .cc-preview-player__video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    background: #000;
  }
  .cc-preview-controls {
    flex-shrink: 0;
    padding: 8px 10px;
    gap: 6px 8px;
  }
  .cc-preview-controls__vol {
    display: none;
  }
  .cc-preview-ended {
    flex-shrink: 0;
    padding: 12px 14px 14px;
  }
  .cc-preview-ended__actions {
    flex-direction: column;
  }
  .cc-preview-ended__btn {
    width: 100%;
  }
  .cc-btn-preview { width: 100%; justify-content: center; }
}
@media (max-height: 640px) {
  .cc-preview-modal__dialog {
    height: auto;
    max-height: calc(100svh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
  .cc-preview-modal__head { padding: 8px 10px 6px; }
  .cc-preview-modal__title { font-size: 14px; }
  .cc-preview-player__stage {
    max-height: min(48svh, calc(100svh - 120px));
  }
  .cc-preview-ended {
    padding: 10px 12px 12px;
  }
  .cc-preview-ended__text {
    margin-bottom: 8px;
    font-size: 12px;
  }
}
@media (max-width: 600px) {
  .cc-course-hero,
  .cc-pkg-hero {
    padding: 16px 14px 18px;
    margin-bottom: 20px;
  }
  .cc-course-hero.has-cover,
  .cc-pkg-hero.has-cover {
    padding-top: 0;
  }
  .cc-course-hero.has-cover .cc-course-hero__grid {
    padding-top: 18px;
  }
  .cc-course-hero .cc-cover--course-hero,
  .cc-pkg-hero .cc-cover--pkg-hero {
    width: calc(100% + 28px);
    margin: 0 -14px 0;
  }
  .cc-pkg-hero__body {
    padding-top: 16px;
  }
  .cc-pkg-stats {
    padding: 14px 14px;
    gap: 6px;
  }
  .cc-pkg-stats__value {
    font-size: 2.2rem;
  }
  .cc-pkg-stats__chip {
    padding: 8px 11px;
  }
  .cc-pkg-stats__chip strong {
    font-size: 1.4rem;
  }
  .cc-pkg-courses__head.cc-info-card__head {
    align-items: flex-start;
  }
  .cc-pkg-courses__total {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
  .cc-course-stats__item {
    min-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
  }
  .cc-info-card {
    padding: 18px 16px;
  }
  .cc-teacher-card__profile {
    align-items: flex-start;
  }
  .cc-teacher-card__avatar {
    width: 72px;
    height: 72px;
  }
}

/* =========================================================
   SELECT — compact filters + cat chips + wide list | cart
   ========================================================= */
.cc-select-filters {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 14px;
  padding: 14px 18px 12px;
  border-radius: var(--cc-radius);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--cc-line-soft);
  box-shadow: 0 8px 28px rgba(19, 32, 25, 0.06);
  backdrop-filter: blur(12px);
  animation: cc-fade-up .4s var(--cc-ease) both;
}
.cc-select-filters__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cc-line-soft);
}
.cc-select-filters__title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
}
.cc-select-filters__hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--cc-muted);
}
.cc-select-filters__channel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.cc-select-filters__channel-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--cc-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cc-select-filters__channel .cc-channel-switch {
  margin: 0;
}
.cc-select-filters__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
}
.cc-select-filters__field {
  flex: 0 1 120px;
  min-width: 100px;
}
.cc-select-filters__field--grow {
  flex: 1 1 220px;
  min-width: 180px;
}
.cc-select-filters__field .cc-field__label {
  margin-bottom: 4px;
}
.cc-select-filters__field .cc-input {
  margin: 0;
}
.cc-select-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  padding-bottom: 1px;
}
.cc-select-filters__more {
  position: relative;
  color: var(--cc-brand-deep) !important;
  font-weight: 600;
}
.cc-select-filters__more.is-open {
  background: var(--cc-brand-soft);
}
.cc-select-filters__more-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--cc-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.cc-select-filters__more-badge[hidden] { display: none !important; }
.cc-select-filters__more-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--cc-line-soft);
}
.cc-select-filters__more-panel[hidden] { display: none !important; }

/* Category chips */
.cc-select-cats {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--cc-radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--cc-line-soft);
}
.cc-cat-tree {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.cc-cat-tree li {
  flex-shrink: 0;
  padding-left: 0 !important;
}
.cc-cat-tree a {
  display: block;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--cc-line);
  background: #fff;
  color: var(--cc-ink-soft) !important;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
}
.cc-cat-tree__child a {
  font-weight: 500;
  opacity: 0.92;
}
.cc-cat-tree a.active,
.cc-cat-tree a:hover {
  background: var(--cc-brand-soft);
  border-color: var(--cc-brand);
  color: var(--cc-brand-deep) !important;
}

/* Wide list + cart */
.cc-select-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  grid-template-areas: 'main cart';
  gap: 18px;
  align-items: start;
}
.cc-select-main { grid-area: main; }
.cc-select-cart { grid-area: cart; }

.cc-select-cart {
  position: sticky;
  top: 140px;
}
.cc-select-cart h3 {
  margin: 0 0 10px;
  font-family: var(--cc-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cc-faint);
}
.cc-select-main {
  min-width: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius);
  animation: cc-fade-up .45s var(--cc-ease) both;
}
.cc-select-main__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cc-line-soft);
}
.cc-select-main__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  min-width: 0;
}
.cc-select-main__title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cc-select-main__cat {
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-muted);
}
.cc-select-main__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-brand-deep);
  background: var(--cc-brand-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.cc-select-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cc-course-cards {
  display: grid;
  gap: 10px;
}
.cc-course-card {
  padding: 12px 14px;
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius-sm);
  background: #fff;
  box-shadow: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.cc-course-card:hover {
  border-color: #b8e0c8;
  box-shadow: 0 4px 14px rgba(70, 195, 123, 0.1);
}
.cc-course-card.is-selected {
  border-color: var(--cc-brand);
  background: var(--cc-brand-mist);
  box-shadow: 0 0 0 1px var(--cc-brand);
}
.cc-course-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cc-course-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.cc-course-card__price {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.cc-course-card__summary {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cc-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-course-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.cc-meta-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cc-canvas);
  border: 1px solid var(--cc-line-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--cc-muted);
}
.cc-course-card label {
  cursor: pointer;
  display: block;
}
.cc-course-card input[type="checkbox"] {
  accent-color: var(--cc-brand);
  margin-right: 8px;
  transform: scale(1.1);
}
.cc-group-children {
  margin: 10px 0 0;
  padding: 10px;
  background: var(--cc-canvas);
  border-radius: var(--cc-radius-xs);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}
.cc-group-children label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  min-width: 0;
}
.cc-group-children__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-group-children label:hover { background: #fff; }
.cc-select-cart {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  max-height: calc(100vh - 160px);
  overflow: auto;
}
.cc-select-cart ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  max-height: 180px;
  overflow: auto;
}
.cc-select-cart li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--cc-line-soft);
  font-size: 13px;
}
.cc-select-cart li a {
  font-size: 12px;
  color: var(--cc-danger) !important;
  white-space: nowrap;
}
.cc-select-cart__fields {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.cc-select-cart__fields .cc-field__label {
  margin-top: 6px;
  margin-bottom: 0;
  font-size: 12px;
}
.cc-select-cart__fields .cc-input {
  margin: 0;
}
.cc-cart-hint {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: var(--cc-radius-xs, 6px);
  background: #fff8e8;
  border: 1px solid #f0e0b8;
  color: #8a6d1d;
  font-size: 12px;
  line-height: 1.45;
}
.cc-cart-hint[hidden] { display: none !important; }
.cc-cart-total {
  padding: 12px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--cc-line-soft);
  font-size: 13px;
  color: var(--cc-muted);
  display: grid;
  gap: 4px;
}
.cc-total {
  font-family: var(--cc-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-brand-deep);
  margin-top: 4px;
}

/* =========================================================
   QUIZ / RECOMMEND — two-column: card + answer sheet
   ========================================================= */
.cc-quiz-wrap { margin: 0; }
.cc-quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}
.cc-quiz-main { min-width: 0; }
.cc-quiz-sheet {
  position: sticky;
  top: 96px;
}
.cc-quiz-sheet__inner {
  padding: 18px 16px;
  border-radius: var(--cc-radius);
  background: #fff;
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow);
  animation: cc-fade-up .4s var(--cc-ease) both;
}
.cc-quiz-sheet__head { margin-bottom: 14px; }
.cc-quiz-sheet__title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cc-ink);
}
.cc-quiz-sheet__hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--cc-muted);
}
.cc-quiz-sheet__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.cc-quiz-stat {
  display: grid;
  gap: 2px;
  padding: 10px 6px;
  text-align: center;
  border-radius: var(--cc-radius-xs, 8px);
  background: var(--cc-canvas);
  border: 1px solid var(--cc-line-soft);
}
.cc-quiz-stat strong {
  font-family: var(--cc-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cc-ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.cc-quiz-stat span {
  font-size: 11px;
  font-weight: 600;
  color: var(--cc-muted);
}
.cc-quiz-stat--done strong { color: var(--cc-brand-deep); }
.cc-quiz-stat--todo strong { color: #b45309; }
.cc-quiz-sheet__progress { margin-bottom: 16px; }
.cc-quiz-sheet__progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cc-muted);
}
.cc-quiz-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--cc-line-soft);
  overflow: hidden;
}
.cc-quiz-progress__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #52cd86 0%, var(--cc-brand) 50%, var(--cc-brand-deep) 100%);
  transition: width .35s var(--cc-ease);
}
.cc-quiz-sheet__nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.cc-quiz-nav-item {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--cc-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cc-ink-soft);
  font-family: var(--cc-font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .15s var(--cc-ease), box-shadow .2s;
}
.cc-quiz-nav-item:hover {
  border-color: var(--cc-brand);
  color: var(--cc-brand-deep);
  transform: translateY(-1px);
}
.cc-quiz-nav-item.is-answered {
  background: var(--cc-brand-soft);
  border-color: #a8ddbf;
  color: var(--cc-brand-deep);
}
.cc-quiz-nav-item.is-current {
  border-color: var(--cc-brand);
  background: var(--cc-brand);
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(70, 195, 123, 0.28);
}
.cc-quiz-nav-item.is-current.is-answered {
  background: var(--cc-brand-deep);
  border-color: var(--cc-brand-deep);
}
.cc-quiz-sheet__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--cc-muted);
}
.cc-quiz-sheet__legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cc-quiz-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d5e2d9;
  border: 1px solid var(--cc-line);
}
.cc-quiz-dot--done {
  background: var(--cc-brand-soft);
  border-color: var(--cc-brand);
}
.cc-quiz-dot--current {
  background: var(--cc-brand);
  border-color: var(--cc-brand);
}

/* Question card */
.cc-quiz-page {
  position: relative;
  margin: 0;
  padding: 26px 28px 24px;
  border-radius: var(--cc-radius);
  background: #fff;
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow-sm);
  animation: cc-quiz-enter .35s var(--cc-ease) both;
}
.cc-quiz-page[hidden] { display: none !important; }
@keyframes cc-quiz-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.cc-quiz-page__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cc-quiz-page__step {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--cc-faint);
  letter-spacing: 0.02em;
}
.cc-quiz-page__step-total { font-weight: 500; color: var(--cc-muted); }
.cc-quiz-type {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--cc-brand-deep);
  background: var(--cc-brand-soft);
  border: 1px solid #b8e0c8;
}
.cc-quiz-type[data-type="multiple"] {
  color: #9a3412;
  background: #fff4ed;
  border-color: #fdba8c;
}
.cc-quiz-type[data-type="select"] {
  color: #1e40af;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.cc-quiz-page__title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--cc-ink);
}
.cc-quiz-options {
  display: grid;
  gap: 10px;
  margin: 22px 0 20px;
}
.cc-quiz-select { display: grid; gap: 6px; }
.cc-quiz-select__control { max-width: 420px; }
.cc-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius-sm);
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  transition: border-color .2s, background .2s, transform .2s var(--cc-ease), box-shadow .2s;
}
.cc-option:hover {
  border-color: #b8e0c8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(70, 195, 123, 0.1);
}
.cc-option:has(input:checked) {
  border-color: var(--cc-brand);
  background: var(--cc-brand-mist);
  box-shadow: 0 0 0 1px var(--cc-brand);
}
.cc-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cc-option__mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid #c5d4cb;
  border-radius: 50%;
  background: #fff;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.cc-option:has(input[type="checkbox"]) .cc-option__mark { border-radius: 5px; }
.cc-option:has(input:checked) .cc-option__mark {
  border-color: var(--cc-brand);
  background: var(--cc-brand);
  box-shadow: inset 0 0 0 3px #fff;
}
.cc-option__text { flex: 1; line-height: 1.45; color: var(--cc-ink-soft); }
.cc-option:has(input:checked) .cc-option__text { color: var(--cc-ink); font-weight: 600; }
.cc-quiz-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--cc-line-soft);
}
.cc-recommend-result { animation: cc-fade-up .45s var(--cc-ease) both; }

@media (max-width: 960px) {
  .cc-quiz-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cc-quiz-sheet {
    position: sticky;
    top: 0;
    z-index: 15;
    order: -1;
  }
  .cc-quiz-sheet__inner {
    padding: 14px 12px;
    box-shadow: 0 8px 24px rgba(19, 32, 25, 0.08);
  }
  .cc-quiz-sheet__nav {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }
  .cc-quiz-page { padding: 20px 16px 18px; }
}

/* Recommend result panel */
.cc-reco-panel { margin-top: 8px; }
.cc-reco-panel__head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--cc-line-soft);
}
.cc-reco-panel__head .cc-page-title { margin-top: 4px; }
.cc-reco-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.cc-reco-answers {
  margin-bottom: 28px;
  padding: 18px 20px;
  border-radius: var(--cc-radius);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--cc-line-soft);
  box-shadow: var(--cc-shadow-sm);
}
.cc-reco-answers__title {
  margin-bottom: 12px;
  font-family: var(--cc-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cc-faint);
  text-transform: uppercase;
}
.cc-reco-answers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.cc-reco-answer-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--cc-brand-mist);
  border: 1px solid #c5e8d4;
}
.cc-reco-answer-chip__q {
  font-size: 11px;
  font-weight: 600;
  color: var(--cc-muted);
  line-height: 1.4;
}
.cc-reco-answer-chip__a {
  font-size: 14px;
  font-weight: 700;
  color: var(--cc-brand-deep);
  letter-spacing: -0.01em;
}

.cc-reco-courses-section { margin-bottom: 28px; }
.cc-reco-courses-section .cc-section-head { margin-bottom: 16px; }

.cc-reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.cc-reco-course {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius);
  background: #fff;
  box-shadow: var(--cc-shadow-sm);
  animation: cc-fade-up .5s var(--cc-ease) both;
  transition: transform .25s var(--cc-ease), box-shadow .25s, border-color .25s;
}
.cc-reco-course:hover {
  transform: translateY(-3px);
  box-shadow: var(--cc-shadow);
  border-color: #b8e0c8;
}

.cc-reco-course__reason {
  padding: 14px 18px;
  background: linear-gradient(135deg, #1f7a48 0%, #46C37B 100%);
  color: #fff;
}
.cc-reco-course__reason-label {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.2);
}
.cc-reco-course__reason p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.96;
}

.cc-reco-course__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.cc-reco-course__title-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}
.cc-reco-course__index {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--cc-brand-mist);
  color: var(--cc-brand-deep);
  font-family: var(--cc-font-display);
  font-size: 11px;
  font-weight: 700;
}
.cc-reco-course__name {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--cc-ink);
}
.cc-reco-course__lessons {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 7px 10px;
  border-radius: 10px;
  background: linear-gradient(160deg, #1f7a48, #46C37B);
  color: #fff;
  box-shadow: 0 4px 12px rgba(31, 122, 72, 0.25);
  line-height: 1.1;
}
.cc-reco-course__lessons em {
  font-family: var(--cc-font-display);
  font-style: normal;
  font-size: 1.2rem;
  font-weight: 700;
}
.cc-reco-course__lessons small {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.9;
}

.cc-reco-course__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 18px 0;
  font-size: 12px;
  color: var(--cc-muted);
}
.cc-reco-course .cc-price-row {
  padding: 10px 18px 0;
  margin: 0;
}

.cc-reco-course__block {
  margin: 12px 18px 0;
  padding: 12px 14px;
  border-radius: 10px;
}
.cc-reco-course__block--summary {
  background: #f7f9f8;
  border: 1px solid var(--cc-line-soft);
}
.cc-reco-course__block--detail {
  background: linear-gradient(180deg, #f3fbf6 0%, #fff 100%);
  border: 1px solid #c5e8d4;
}
.cc-reco-course__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cc-muted);
}
.cc-reco-course__label--detail { color: var(--cc-brand-deep); }
.cc-reco-course__label-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #dfe6e2;
  color: var(--cc-ink-soft);
  font-size: 11px;
  font-weight: 700;
}
.cc-reco-course__label--detail .cc-reco-course__label-mark {
  background: var(--cc-brand);
  color: #fff;
}
.cc-reco-course__summary {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--cc-ink-soft);
}
.cc-reco-course__suitable {
  margin: 10px 18px 0;
  font-size: 13px;
  color: var(--cc-muted);
  line-height: 1.5;
}
.cc-reco-course__suitable strong { color: var(--cc-ink-soft); }
.cc-reco-course__content {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--cc-ink);
}
.cc-reco-course__content p:first-child { margin-top: 0; }
.cc-reco-course__content p:last-child { margin-bottom: 0; }
.cc-reco-course__outline {
  margin: 12px 18px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--cc-canvas);
  border: 1px dashed #c5e8d4;
}
.cc-reco-course__outline-title {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cc-brand-deep);
}
.cc-reco-course__outline .cc-rich {
  font-size: 13px;
  color: var(--cc-ink-soft);
}
.cc-reco-course__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 16px 18px 18px;
}
.cc-reco-course__foot .cc-reco-remove {
  font-size: 12px;
  color: var(--cc-danger) !important;
}

.cc-reco-checkout {
  max-width: 420px;
  margin: 0 auto;
  padding: 24px;
  box-shadow: var(--cc-shadow);
}

@media (max-width: 1024px) {
  .cc-reco-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 640px) {
  .cc-reco-grid { grid-template-columns: 1fr; gap: 14px; }
  .cc-reco-answers__grid { grid-template-columns: 1fr 1fr; }
  .cc-reco-course__head { flex-wrap: wrap; }
  .cc-reco-course__lessons { margin-left: auto; }
  .cc-reco-checkout { max-width: none; }
}
@media (max-width: 400px) {
  .cc-reco-answers__grid { grid-template-columns: 1fr; }
}

/* =========================================================
   CHECKOUT / ORDERS / PAY
   ========================================================= */
.cc-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}
.cc-order-lines {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.cc-order-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cc-line-soft);
  font-size: 14px;
}
.cc-order-summary {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--cc-muted);
  margin-bottom: 8px;
}
.cc-pay-methods { display: grid; gap: 10px; margin: 12px 0 18px; }
.cc-success {
  padding: 20px;
  border-radius: var(--cc-radius);
  background: var(--cc-brand-soft);
  color: var(--cc-brand-deep);
  font-weight: 600;
  border: 1px solid #b8e6cc;
}
.cc-pay-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--cc-canvas);
  border-radius: var(--cc-radius-sm);
  text-align: center;
}
.cc-qrcode {
  max-width: 100%;
  word-break: break-all;
  font-size: 12px;
  color: var(--cc-muted);
}
.cc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--cc-radius);
  background: #fff;
  box-shadow: var(--cc-shadow-sm);
}
.cc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
.cc-table th,
.cc-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--cc-line-soft);
  font-size: 13px;
}
.cc-table th {
  background: var(--cc-canvas);
  font-size: 12px;
  font-weight: 700;
  color: var(--cc-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.cc-table tr:last-child td { border-bottom: 0; }
.cc-table tr:hover td { background: var(--cc-brand-mist); }
.cc-pay-return {
  max-width: 480px;
  margin: 40px auto;
  text-align: center;
  padding: 40px 28px;
  animation: cc-fade-up .5s var(--cc-ease) both;
}
.cc-pay-return h1 {
  margin: 0 0 12px;
  font-family: var(--cc-font-display);
  font-size: 1.6rem;
}
.cc-pay-return__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cc-brand-soft);
  color: var(--cc-brand-deep);
  font-size: 28px;
  font-weight: 700;
}

/* ---- Loading skeleton ---- */
.cc-loading {
  padding: 32px;
  text-align: center;
  color: var(--cc-faint);
  font-size: 14px;
}
.cc-loading::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border: 2px solid var(--cc-line);
  border-top-color: var(--cc-brand);
  border-radius: 50%;
  vertical-align: -3px;
  animation: cc-spin .7s linear infinite;
}

/* ---- Motion ---- */
@keyframes cc-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cc-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cc-app *,
  .cc-app *::before,
  .cc-app *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .cc-select-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'main'
      'cart';
  }
  .cc-select-cart {
    position: static;
    max-height: none;
  }
  .cc-group-children {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .cc-detail-layout,
  .cc-checkout-layout { grid-template-columns: 1fr; }
  .cc-buy-box { position: static; }
}

@media (max-width: 768px) {
  .cc-shell { padding: 0 12px 36px; margin: 0; }
  .cc-topnav { flex-direction: column; align-items: stretch; gap: 12px; }
  .cc-topnav__links {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cc-topnav__links::-webkit-scrollbar { display: none; }
  .cc-topnav__link {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    padding: 8px 6px;
    font-size: 13px;
  }
  .cc-topnav__label--full { display: none; }
  .cc-topnav__label--short { display: inline; }
  .cc-pathways { grid-template-columns: 1fr; }
  .cc-package-grid { grid-template-columns: 1fr; }
  .cc-select-filters {
    position: static;
    padding: 12px 14px;
  }
  .cc-select-filters__actions {
    margin-left: 0;
    width: 100%;
  }
  .cc-select-filters__actions .cc-btn { flex: 1; }
  .cc-select-cats { padding: 8px 10px; }
  .cc-select-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'main'
      'cart';
    gap: 14px;
  }
  .cc-select-cart { position: static; max-height: none; }
  .cc-group-children { grid-template-columns: 1fr; }
  .cc-select-main { padding: 12px; }
  .cc-hero { padding: 26px 14px 30px; margin-bottom: 20px; }
  .cc-hero__inner { gap: 18px 24px; }
  .cc-hero__copy { max-width: none; }
  .cc-hero__actions {
    width: 100%;
    gap: 12px;
    margin-left: 0;
  }
  .cc-hero__cta {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    min-height: 48px;
    padding: 12px 18px;
    font-size: 15px;
  }
  .cc-home-heading { gap: 12px; }
  .cc-home-heading__icon { width: 40px; height: 40px; border-radius: 12px; }
  .cc-home-heading__icon svg { width: 18px; height: 18px; }
  .cc-home-heading__main { gap: 6px 10px; }
  .cc-home-heading__rule { display: none; }
  .cc-home-heading__sub {
    width: 100%;
    white-space: normal;
    letter-spacing: 0.03em;
    font-size: 12px;
  }
  .cc-quiz-page { padding: 18px 14px 16px; }
  .cc-page-title { font-size: 1.55rem; }
  .cc-btn-lg { width: 100%; }
}

/* Ultra-narrow phones (≤360): slightly tighter type */
@media (max-width: 360px) {
  .cc-topnav__link { padding: 8px 4px; font-size: 12px; }
}
