:root {
  color-scheme: light;
  --bg: #fbf5ea;
  --bg-soft: #fffaf1;
  --panel: rgba(255, 252, 245, 0.92);
  --panel-strong: #fff8ec;
  --text: #3c2d23;
  --muted: #8c7462;
  --line: #ead9c2;
  --primary: #b7793f;
  --primary-dark: #8f592b;
  --primary-soft: #f5dfc4;
  --danger: #a44333;
  --ok: #587a3c;
  --warn: #9a6a1c;
  --shadow: 0 18px 50px rgba(118, 76, 34, 0.12);
  --shadow-soft: 0 10px 28px rgba(118, 76, 34, 0.09);
  --case-image-size: 174px;
  --case-vertical-width: 97.88px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 231, 193, 0.8), transparent 34rem),
    linear-gradient(135deg, #fffaf1 0%, var(--bg) 48%, #f8ead7 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 34px clamp(18px, 4vw, 54px);
  background:
    linear-gradient(115deg, rgba(255, 252, 245, 0.96), rgba(250, 231, 205, 0.9)),
    var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 36px rgba(118, 76, 34, 0.08);
  position: relative;
  overflow: hidden;
}

.topbar::after {
  background: rgba(255, 246, 226, 0.76);
  border: 1px solid rgba(234, 217, 194, 0.8);
  border-radius: 999px;
  content: "";
  height: 170px;
  position: absolute;
  right: clamp(22px, 8vw, 140px);
  top: -74px;
  width: 170px;
}

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

.hero-banner {
  background: #f7ebdc;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 36px rgba(118, 76, 34, 0.08);
  overflow: hidden;
}

.hero-banner img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 850;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.tagline {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 520px;
}

.status {
  flex: 0 0 auto;
  background: rgba(255, 252, 245, 0.82);
  border: 1px solid rgba(215, 187, 151, 0.9);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(118, 76, 34, 0.08);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 750;
  padding: 10px 14px;
}

.status.ok {
  background: #f4f8eb;
  border-color: #d8e6bf;
  color: var(--ok);
}

.status.warn {
  background: #fff7df;
  border-color: #f2d89c;
  color: var(--warn);
}

.header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.pill-link {
  align-items: center;
  background: #fff3df;
  border: 1px solid #ead2b0;
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
}

.pill-link:hover {
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.layout {
  display: grid;
  gap: 20px;
  padding: 28px clamp(18px, 4vw, 54px) 52px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 20px;
}

.viewer-layout {
  gap: 24px;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  position: sticky;
  top: 12px;
  z-index: 20;
}

.nav-menu {
  margin-left: auto;
  position: relative;
}

.menu-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  display: grid;
  gap: 6px;
  height: 44px;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  width: 44px;
}

.menu-button span {
  background: var(--primary-dark);
  border-radius: 999px;
  display: block;
  height: 3px;
  width: 26px;
}

.nav-actions {
  align-items: stretch;
  background: rgba(255, 252, 245, 0.98);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: none;
  gap: 10px;
  min-width: 190px;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 40;
}

.nav-menu.open .nav-actions {
  display: grid;
}

.nav-link,
.primary-link,
.secondary-link,
.floating-cta a {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nav-actions .nav-link {
  width: 100%;
}

.nav-link,
.primary-link,
.floating-cta a:first-child {
  background: linear-gradient(180deg, #c88a4f, var(--primary));
  box-shadow: 0 10px 22px rgba(143, 89, 43, 0.2);
  color: #ffffff;
}

.nav-link.ghost,
.secondary-link,
.floating-cta a:last-child {
  background: #fff3df;
  border: 1px solid #ead2b0;
  box-shadow: none;
  color: var(--primary-dark);
}

.nav-link:hover,
.primary-link:hover,
.secondary-link:hover,
.floating-cta a:hover {
  transform: translateY(-2px);
}

.home-section {
  scroll-margin-top: 110px;
}

.editorial-title h2 {
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: 0;
}

.editorial-title p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.75;
  margin-top: 8px;
  max-width: 760px;
}

.featured-video {
  background:
    linear-gradient(135deg, rgba(72, 50, 37, 0.94), rgba(128, 86, 47, 0.86)),
    #3c2d23;
  border: 1px solid rgba(255, 240, 218, 0.5);
  border-radius: 26px;
  box-shadow: var(--shadow);
  color: #fff8ec;
  display: grid;
  gap: 18px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 30px);
}

.featured-copy {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.featured-copy .eyebrow,
.featured-copy .viewer-meta {
  color: #f8dfbd;
}

.featured-copy h2 {
  color: #fffaf1;
  font-size: clamp(24px, 3vw, 38px);
}

.featured-video video,
.featured-video img {
  border-color: rgba(255, 240, 218, 0.38);
  margin: 0;
  max-height: 62vh;
}

.media-frame {
  aspect-ratio: 9 / 16;
  background: #2d221a;
  border: 1px solid rgba(255, 240, 218, 0.38);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  justify-self: center;
  max-height: 70vh;
  width: min(420px, 100%);
}

.media-frame img,
.media-frame video,
.media-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

.media-frame img,
.media-frame video {
  object-fit: cover;
}

.media-frame iframe {
  background: #000;
}

.viewer-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

.case-list {
  display: grid;
  gap: 18px;
}

.case-row {
  background: rgba(255, 252, 245, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(118, 76, 34, 0.1);
  display: grid;
  gap: 14px;
  grid-template-columns: max-content minmax(360px, 1fr);
  padding: clamp(12px, 1.4vw, 18px);
}

.featured-case-row {
  background:
    linear-gradient(135deg, rgba(255, 252, 245, 0.96), rgba(255, 243, 223, 0.94)),
    #fffaf2;
  border-color: #e6cba8;
}

.gallery-case-row {
  grid-template-columns: 1fr;
}

.case-media-strip {
  align-items: stretch;
  display: flex;
  gap: 8px;
  justify-content: start;
  min-width: 0;
  overflow: visible;
  padding-bottom: 4px;
}

.phone-shell,
.profile-image-card {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 26px rgba(58, 37, 22, 0.12);
  flex: 0 0 var(--case-image-size);
  height: var(--case-image-size);
  overflow: hidden;
  width: var(--case-image-size);
}

.phone-shell img,
.profile-image-card img {
  width: 100%;
  height: 100%;
  display: block;
  background: #ffffff;
  object-fit: cover;
  object-position: center top;
}

.case-copy {
  display: grid;
  gap: 7px;
  align-content: center;
  justify-self: start;
  min-width: 0;
}

.case-type {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-copy h3 {
  color: var(--text);
  font-size: clamp(19px, 1.7vw, 26px);
  line-height: 1.18;
}

.case-description,
.case-result,
.case-service {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.case-result {
  color: var(--primary-dark);
  font-weight: 850;
}

.case-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.metric-card {
  background: #fff7e9;
  border: 1px solid #ead2b0;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 10px;
}

.metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.metric-card strong {
  color: var(--primary-dark);
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.case-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 8px;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-tags span {
  background: #fff3df;
  border: 1px solid #ead2b0;
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.viral-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.viral-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 13px;
  flex: 0 0 auto;
  height: var(--case-image-size);
  margin: 0;
  overflow: hidden;
  position: relative;
}

.partner-card {
  aspect-ratio: 3 / 4;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 13px;
  flex: 1 1 0;
  margin: 0;
  overflow: hidden;
}

.partner-card img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

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

.gallery-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  width: 100%;
}

.viral-top img {
  object-position: center top;
}

.viral-center img {
  object-position: center center;
}

.viral-bottom img {
  object-position: center bottom;
}

.viral-card figcaption {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(20, 12, 8, 0.7));
  bottom: 0;
  color: #ffffff;
  display: grid;
  gap: 3px;
  left: 0;
  padding: 28px 8px 8px;
  position: absolute;
  right: 0;
}

.viral-card figcaption span {
  display: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 800;
}

.viral-card figcaption strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.viewer-empty {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 12px;
  justify-items: center;
  min-height: 280px;
  text-align: center;
}

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

.service-grid,
.faq-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.faq-item,
.course-sales-card {
  background: rgba(255, 252, 245, 0.94);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.info-card {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.info-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.info-card h3,
.faq-item summary {
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.info-card p,
.faq-item p,
.course-sales-card p {
  color: var(--muted);
  line-height: 1.75;
}

#courseSalesDescription,
#trialCourseSuitable,
#trialCourseLearn,
#trialCourseIncludes,
.case-description,
.case-result,
.case-service,
.course-card-body p,
.course-detail-copy p {
  white-space: pre-line;
}

.price-original {
  color: #a9937a;
  font-size: 0.88em;
  font-weight: 800;
  margin-right: 10px;
  text-decoration: line-through;
}

.price-sale {
  color: var(--primary-dark);
  font-size: 1.22em;
  font-weight: 950;
  margin-right: 10px;
}

.testimonial-layout {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

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

.testimonial-video-card,
.chat-proof-card {
  background: rgba(255, 252, 245, 0.94);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  flex: 0 0 clamp(260px, 28vw, 360px);
  scroll-snap-align: start;
}

.testimonial-video-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.testimonial-video-placeholder {
  align-content: end;
  aspect-ratio: 9 / 16;
  background:
    linear-gradient(180deg, rgba(58, 37, 22, 0.08), rgba(58, 37, 22, 0.78)),
    linear-gradient(135deg, #fff8ec, #e6cba8);
  border: 1px solid #ead2b0;
  border-radius: 16px;
  color: #ffffff;
  display: grid;
  overflow: hidden;
  padding: 16px;
}

.testimonial-video-placeholder span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.testimonial-video-placeholder strong {
  font-size: 20px;
  line-height: 1.25;
}

.testimonial-video-card video,
.testimonial-video-card iframe,
.testimonial-video-card img,
.chat-proof-card img {
  background: #fff7e9;
  border: 1px solid #ead2b0;
  border-radius: 16px;
  display: block;
  overflow: hidden;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  width: 100%;
}

.testimonial-video-card video,
.testimonial-video-card iframe,
.testimonial-video-card img {
  margin-inline: auto;
}

.testimonial-video-card iframe {
  aspect-ratio: 9 / 16;
  border: 1px solid #ead2b0;
  max-height: 560px;
}

.chat-proof-card img {
  max-height: 360px;
}

.testimonial-video-card h3,
.chat-proof-card span {
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.testimonial-video-card p,
.chat-proof-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.testimonial-chat-grid {
  display: grid;
  gap: 14px;
}

.chat-proof-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 130px;
  padding: 18px;
}

.chat-proof-card::before {
  background: #fff3df;
  border: 1px solid #ead2b0;
  border-radius: 999px;
  color: var(--primary-dark);
  content: "可替換截圖";
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  justify-self: start;
  padding: 6px 10px;
}

.chat-proof-card.has-media::before {
  content: none;
}

.course-sales-card {
  align-items: stretch;
  display: grid;
  gap: 22px;
  justify-items: start;
  padding: clamp(22px, 3vw, 34px);
}

.trial-course-button {
  min-width: 260px;
  padding-inline: 28px;
  white-space: nowrap;
}

.booking-card {
  background:
    linear-gradient(135deg, rgba(255, 252, 245, 0.96), rgba(255, 243, 223, 0.92)),
    #fffaf2;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: clamp(18px, 3vw, 34px);
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  padding: clamp(22px, 3.2vw, 38px);
}

.booking-copy {
  align-content: start;
  display: grid;
  gap: 10px;
}

.booking-copy h2 {
  color: var(--text);
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.15;
}

.booking-copy p {
  color: var(--muted);
  line-height: 1.75;
}

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

.booking-form label {
  display: grid;
  gap: 7px;
}

.booking-form label span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #ead2b0;
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 11px 13px;
  width: 100%;
}

.booking-form textarea {
  resize: vertical;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(194, 128, 67, 0.18);
  outline: none;
}

.booking-message,
.booking-status,
.booking-submit {
  grid-column: 1 / -1;
}

.booking-status {
  color: var(--muted);
  font-size: 14px;
  min-height: 20px;
}

.booking-status.ok {
  color: var(--ok);
  font-weight: 850;
}

.booking-status.warn {
  color: var(--danger);
  font-weight: 850;
}

.booking-submit {
  border: 0;
  cursor: pointer;
  justify-self: start;
}

.course-benefit-grid {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
  padding: 16px 0;
}

.course-benefit-grid article {
  display: grid;
  gap: 6px;
}

.course-benefit-grid span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.course-sales-card h2 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
  margin-bottom: 10px;
}

.course-jump-button {
  flex: 0 0 auto;
}

.faq-item {
  padding: 18px 20px;
}

.faq-item summary {
  cursor: pointer;
}

.faq-item p {
  margin-top: 12px;
}

.floating-cta {
  bottom: 28px;
  display: grid;
  gap: 10px;
  position: fixed;
  right: 24px;
  z-index: 50;
}

.floating-cta a {
  box-shadow: 0 14px 28px rgba(143, 89, 43, 0.22);
  min-width: 112px;
}

.auth-layout {
  min-height: 100vh;
  place-items: center;
}

.auth-card,
.dashboard-hero {
  background: rgba(255, 252, 245, 0.94);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  max-width: 620px;
  padding: clamp(24px, 4vw, 42px);
  width: 100%;
}

.checkout-card {
  max-width: 760px;
}

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

.payment-method-card {
  align-items: flex-start;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 14px;
}

.payment-method-card:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(168, 103, 42, 0.14);
}

.payment-method-card input {
  margin-top: 5px;
}

.payment-method-card span {
  display: grid;
  gap: 4px;
}

.payment-method-card small {
  color: var(--muted);
  line-height: 1.5;
}

.bank-transfer-panel {
  background: #fff7e9;
  border: 1px solid var(--line);
  border-radius: 22px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.bank-transfer-panel h2 {
  font-size: 22px;
  margin: 0;
}

.bank-transfer-details {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bank-transfer-details div {
  background: rgba(255, 252, 245, 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.bank-transfer-details span {
  color: var(--muted);
  font-size: 13px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

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

.social-button {
  align-items: center;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  text-decoration: none;
}

.social-button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.divider-text {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
}

.divider-text::before,
.divider-text::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.small-note {
  color: var(--muted);
  font-size: 14px;
}

.small-note a {
  color: var(--primary-dark);
  font-weight: 850;
}

.legal-links,
.site-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-links {
  font-size: 13px;
  margin: 0;
}

.legal-links a,
.site-footer a {
  color: var(--primary-dark);
  font-weight: 850;
  text-decoration: none;
}

.legal-links a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.legal-footer {
  color: var(--muted);
  justify-content: center;
  padding: 10px 18px 30px;
}

.legal-layout {
  margin: 0 auto;
  max-width: 960px;
  min-height: 100vh;
}

.legal-card {
  background: rgba(255, 252, 245, 0.95);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  padding: clamp(24px, 5vw, 52px);
}

.legal-card h1 {
  font-size: clamp(42px, 7vw, 72px);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.legal-card h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 10px;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.legal-card section {
  display: grid;
  gap: 8px;
}

.legal-card ul {
  margin: 0;
  padding-left: 22px;
}

.member-layout {
  gap: 22px;
}

.dashboard-hero {
  max-width: none;
}

.dashboard-grid,
.course-player-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.course-player-layout {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mini-row {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  display: grid;
  gap: 4px;
  padding: 14px;
  text-align: left;
  text-decoration: none;
}

button.mini-row {
  box-shadow: none;
  min-height: 0;
}

.mini-row:hover {
  border-color: var(--primary);
}

.mini-row.is-active {
  border-color: var(--primary);
  box-shadow: 0 10px 26px rgba(149, 94, 45, 0.12);
}

.mini-row.is-locked {
  cursor: not-allowed;
  opacity: 0.58;
}

.mini-row span {
  color: var(--muted);
  font-size: 13px;
}

.mini-subtitle {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 8px;
  text-transform: uppercase;
}

.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 16px 0;
}

.summary-grid div {
  background: #fff7e9;
  border: 1px solid #ead2b0;
  border-radius: 16px;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-grid strong {
  color: var(--primary-dark);
  font-size: 20px;
}

.inline-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(140px, 0.4fr) minmax(180px, 1fr) auto;
}

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

.player-frame {
  aspect-ratio: 16 / 9;
  max-height: none;
  width: min(860px, 100%);
}

.free-course-watch-layout {
  max-width: 1160px;
}

.free-course-player-layout {
  display: grid;
  gap: 22px;
}

.free-course-player-heading {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.free-course-player-heading h2 {
  color: var(--text);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 950;
  line-height: 1.18;
}

.free-course-frame {
  justify-self: stretch;
  width: 100%;
}

.lesson-placeholder {
  align-items: center;
  align-content: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.5), transparent 36%),
    linear-gradient(135deg, rgba(255, 249, 239, 0.96), rgba(238, 218, 185, 0.9));
  border-radius: inherit;
  color: var(--text);
  display: grid;
  gap: 16px;
  justify-items: center;
  min-height: 100%;
  padding: clamp(28px, 5vw, 60px);
  text-align: center;
  width: 100%;
}

.lesson-placeholder strong {
  color: var(--primary-dark);
  display: block;
  font-size: clamp(46px, 7vw, 92px);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
}

.lesson-placeholder span {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 900;
  letter-spacing: 0.22em;
}

.lesson-placeholder small {
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 750;
  line-height: 1.7;
  max-width: 460px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 22px;
  backdrop-filter: blur(14px);
}

.upload-panel {
  display: grid;
  gap: 18px;
}

.upload-form,
.form-grid {
  display: grid;
  gap: 14px;
}

.upload-form {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.35fr) auto auto;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

input {
  width: 100%;
  background: #fffdf8;
  border: 1px solid #e6d2b8;
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 13px 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input[type="checkbox"] {
  accent-color: var(--primary);
  height: 18px;
  width: 18px;
}

input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(183, 121, 63, 0.14);
}

select {
  width: 100%;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--primary) 50%) right 16px center / 8px 8px no-repeat,
    #fffdf8;
  border: 1px solid #e6d2b8;
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 13px 40px 13px 14px;
}

select:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(183, 121, 63, 0.14);
}

.file-picker input {
  display: none;
}

.file-picker span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  background: #fff7e9;
  border: 1px dashed var(--primary);
  border-radius: 14px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  padding: 12px 16px;
  transition: background 150ms ease, transform 150ms ease;
}

.file-picker span:hover {
  background: #ffefd8;
  transform: translateY(-1px);
}

button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #c88a4f, var(--primary));
  box-shadow: 0 10px 22px rgba(143, 89, 43, 0.2);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 48px;
  padding: 12px 18px;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

button:hover {
  background: var(--primary-dark);
  box-shadow: 0 12px 26px rgba(143, 89, 43, 0.25);
  transform: translateY(-1px);
}

button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.secondary-button,
.ghost-button {
  background: #fff3df;
  box-shadow: none;
  color: var(--primary);
}

.secondary-button:hover,
.ghost-button:hover {
  background: var(--primary-soft);
  box-shadow: none;
}

.danger-button {
  background: #fff1ec;
  box-shadow: none;
  color: var(--danger);
}

.danger-button:hover {
  background: #fbded4;
  box-shadow: none;
}

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

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

.video-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf2;
  box-shadow: none;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 0;
  padding: 14px;
  text-align: left;
}

.video-card:hover,
.video-card.active {
  border-color: var(--primary);
  background: #fff1dc;
}

.video-card.active {
  box-shadow: inset 4px 0 0 var(--primary);
}

.video-card strong {
  overflow-wrap: anywhere;
}

.video-card span {
  color: var(--muted);
  font-size: 13px;
}

.empty,
.empty-editor {
  color: var(--muted);
  font-size: 15px;
}

.empty-editor {
  display: grid;
  gap: 8px;
  min-height: 360px;
  place-content: center;
  text-align: center;
}

video {
  width: 100%;
  max-height: 58vh;
  background: #2d221a;
  border: 1px solid #e4cfb3;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: block;
  margin-bottom: 18px;
}

.form-grid {
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.7fr) minmax(110px, 0.5fr);
}

.wide-field {
  grid-column: 1 / -1;
}

.settings-group {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.oauth-callback-grid,
.oauth-provider-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.oauth-provider-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.oauth-callback-grid button {
  align-self: end;
  min-height: 48px;
}

.checkbox-field {
  align-items: center;
  background: #fff7e9;
  border: 1px solid #ead2b0;
  border-radius: 14px;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
}

.case-admin-panel {
  display: grid;
  gap: 18px;
}

.admin-mvp-panel,
.admin-tab-panel {
  display: grid;
  gap: 18px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tab {
  background: #fff3df;
  box-shadow: none;
  color: var(--primary-dark);
  min-height: 40px;
  padding: 9px 13px;
}

.admin-tab.active,
.admin-tab:hover {
  background: linear-gradient(180deg, #c88a4f, var(--primary));
  color: #ffffff;
}

.case-admin-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
}

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

.case-admin-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.case-admin-card.active {
  border-color: var(--primary);
  box-shadow: inset 4px 0 0 var(--primary);
}

.case-admin-card strong {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.case-admin-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 4px;
}

.case-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-admin-actions button {
  min-height: 38px;
  padding: 8px 12px;
}

.case-form {
  display: grid;
  gap: 18px;
}

.case-form-grid {
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.45fr) minmax(90px, 0.25fr) minmax(130px, 0.3fr);
}

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

.image-upload-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.image-upload-card p {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 850;
}

.image-preview-frame {
  aspect-ratio: 9 / 16;
  background:
    linear-gradient(135deg, #fff7e9, #f4dfc2);
  border: 1px solid #ead2b0;
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
}

.profile-upload-card .image-preview-frame {
  aspect-ratio: 1 / 1;
}

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

.image-upload-card img {
  transform-origin: center;
}

.testimonial-upload-card {
  max-width: 520px;
}

.testimonial-media-preview {
  align-items: center;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fff7e9, #f4dfc2);
  border: 1px solid #ead2b0;
  border-radius: 14px;
  color: var(--muted);
  display: grid;
  font-weight: 800;
  justify-items: center;
  overflow: hidden;
  width: 100%;
}

.testimonial-media-preview img,
.testimonial-media-preview video,
.testimonial-media-preview iframe {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.testimonial-media-preview iframe {
  aspect-ratio: 9 / 16;
  border: 0;
}

.testimonial-url-field {
  margin-top: 14px;
  text-align: left;
  width: 100%;
}

.image-adjust-controls {
  background: rgba(255, 247, 233, 0.82);
  border: 1px solid #ead2b0;
  border-radius: 12px;
  display: grid;
  gap: 8px;
  padding: 9px;
}

.image-adjust-controls label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.image-adjust-controls input[type="range"] {
  accent-color: var(--primary);
  width: 100%;
}

.image-upload-card img.is-empty {
  opacity: 0.45;
}

.image-upload-card .file-picker span {
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
}

.dynamic-section {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}

.compact-title {
  margin-bottom: 12px;
}

.compact-title h3 {
  color: var(--text);
  font-size: 17px;
}

.compact-title button {
  min-height: 38px;
  padding: 8px 12px;
}

.dynamic-rows {
  display: grid;
  gap: 10px;
}

.dynamic-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.8fr) minmax(150px, 1fr) auto;
}

.service-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dynamic-row button {
  min-height: 48px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.message {
  color: var(--muted);
  min-height: 20px;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--ok);
}

.rendered {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
}

.rendered a {
  color: var(--primary);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.page-tabs {
  background: rgba(255, 252, 245, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 8px;
  padding: 8px;
  width: fit-content;
}

.tab-button {
  background: transparent;
  box-shadow: none;
  color: var(--primary-dark);
  min-height: 42px;
  padding: 10px 18px;
}

.tab-button:hover,
.tab-button.active {
  background: linear-gradient(180deg, #c88a4f, var(--primary));
  box-shadow: 0 10px 22px rgba(143, 89, 43, 0.18);
  color: #ffffff;
}

.viewer-page-panel {
  display: grid;
  gap: 18px;
}

.course-catalog-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-card {
  background: rgba(255, 252, 245, 0.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  display: grid;
  min-height: 430px;
  overflow: hidden;
}

.course-card-cover {
  background: #f5e5cf;
  display: block;
  overflow: hidden;
}

.course-card-cover img {
  aspect-ratio: 16 / 9;
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
  width: 100%;
}

.course-card:hover .course-card-cover img {
  transform: scale(1.03);
}

.course-card-body {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.course-card-body h3 {
  color: #241b16;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 950;
  line-height: 1.45;
}

.course-card-body h3 a {
  color: inherit;
  text-decoration: none;
}

.course-card-body h3 a:hover {
  color: var(--primary-dark);
}

.course-card-body p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.course-rating {
  align-items: center;
  color: #ffad18;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-weight: 900;
}

.course-rating em {
  color: #5f6268;
  font-style: normal;
  font-weight: 750;
}

.course-card-author {
  align-items: center;
  color: #5f6268;
  display: flex;
  gap: 10px;
  font-weight: 850;
}

.mentor-avatar {
  align-items: center;
  background: linear-gradient(135deg, #e8d0b1, #8f592b);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.course-card-footer {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: auto;
}

.course-price-label {
  color: #7c756d;
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.course-card-footer strong {
  color: #555962;
  display: block;
  font-size: 26px;
  font-weight: 950;
  line-height: 1.1;
}

.course-card-footer small {
  color: #96918c;
  display: block;
  font-size: 15px;
  font-weight: 800;
  text-decoration: line-through;
}

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

.course-detail-button {
  align-items: center;
  background: #050505;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 17px;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  text-decoration: none;
}

.course-detail-button:hover {
  background: var(--primary-dark);
}

.course-login-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  text-decoration: none;
}

.course-login-link:hover {
  background: var(--cream);
}

.course-detail-layout {
  display: grid;
  gap: 24px;
  justify-items: stretch;
  max-width: 1180px;
  min-height: auto;
  place-items: stretch;
  padding: 28px clamp(18px, 5vw, 72px) 54px;
  width: min(100%, 1180px);
}

.course-detail-hero,
.course-detail-section {
  background: rgba(255, 252, 245, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  width: 100%;
}

.course-detail-hero {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(260px, 520px) minmax(0, 1fr);
  padding: clamp(18px, 3vw, 34px);
}

.course-detail-cover {
  background: #f5e5cf;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.course-detail-cover img {
  aspect-ratio: 16 / 9;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.course-detail-copy {
  align-content: center;
  display: grid;
  gap: 16px;
}

.course-detail-copy h1 {
  font-size: clamp(32px, 4vw, 54px);
}

.course-detail-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.course-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-detail-meta div {
  background: #fff3df;
  border: 1px solid #ead2b0;
  border-radius: 22px;
  color: var(--primary-dark);
  display: grid;
  gap: 2px;
  font-weight: 850;
  min-width: 178px;
  padding: 16px 20px;
}

.course-detail-meta span,
.course-detail-meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.course-detail-meta strong {
  color: var(--primary-dark);
  font-size: 34px;
  font-weight: 950;
}

.course-detail-meta small {
  font-size: 18px;
  text-decoration: line-through;
}

.course-detail-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preorder-badge {
  align-items: center;
  background: #fff3df;
  border: 1px solid #ead2b0;
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 14px;
}

.text-link {
  align-items: center;
  color: var(--primary-dark);
  display: inline-flex;
  font-weight: 900;
  padding: 10px 0;
}

.course-detail-section {
  display: grid;
  gap: 18px;
  padding: clamp(26px, 4vw, 44px) 0 clamp(26px, 4vw, 44px);
}

.course-detail-section .section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 62px);
}

.course-content-summary {
  color: var(--muted);
  font-size: 16px;
  font-weight: 850;
}

.course-content-list {
  display: grid;
  gap: 16px;
  padding: 0 clamp(22px, 5vw, 62px);
  width: 100%;
}

.course-content-part {
  background: #fffaf2;
  border: 1px solid #ead2b0;
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(126, 84, 45, 0.1);
  overflow: hidden;
  width: 100%;
}

.course-content-part summary {
  align-items: center;
  background: linear-gradient(135deg, #fff4df 0%, #f5dfbd 100%);
  cursor: pointer;
  display: grid;
  gap: 16px;
  grid-template-columns: 20px 1fr auto;
  list-style: none;
  min-height: 78px;
  padding: 18px 28px;
}

.course-content-part summary::-webkit-details-marker {
  display: none;
}

.course-content-part summary span {
  color: var(--primary-dark);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.course-content-part summary strong {
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.course-content-part summary em {
  color: var(--primary-dark);
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.course-content-units {
  background: rgba(255, 252, 245, 0.96);
  display: grid;
}

.course-content-unit {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 18px 1fr auto auto;
  min-height: 64px;
  padding: 14px 30px;
}

.course-content-unit + .course-content-unit {
  border-top: 1px solid #f0dcc0;
}

.unit-play-dot {
  background: #d19a5a;
  border-radius: 50%;
  height: 12px;
  position: relative;
  width: 12px;
}

.unit-play-dot::after {
  border-bottom: 3px solid transparent;
  border-left: 4px solid #ffffff;
  border-top: 3px solid transparent;
  content: "";
  left: 5px;
  position: absolute;
  top: 3px;
}

.course-content-unit strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
}

.course-content-unit em {
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}

.preview-button {
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
  padding: 5px 10px;
  text-decoration: none;
}

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

.preview-button.is-disabled,
.preview-button.is-disabled:hover {
  background: #f6ead8;
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.course-lesson-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-lesson-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.course-lesson-card img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.course-lesson-card div {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.course-lesson-card span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-lesson-card h3 {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.4;
}

.course-lesson-card p {
  color: var(--muted);
  line-height: 1.65;
}

.course-layout {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.chapter-list {
  display: grid;
  gap: 12px;
  align-content: start;
}

.chapter-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: none;
  color: var(--text);
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  text-align: left;
}

.chapter-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 13px;
  display: block;
  object-fit: cover;
}

.chapter-card:hover {
  background: #fff1dc;
  border-color: var(--primary);
}

.chapter-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
}

.chapter-card strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.chapter-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .case-row {
    grid-template-columns: 1fr;
  }

  .case-media-strip {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .course-catalog-grid,
  .course-lesson-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .topbar,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace,
  .upload-form,
  .form-grid,
  .featured-copy,
  .course-layout,
  .case-admin-layout,
  .case-form-grid,
  .dynamic-row,
  .service-row,
  .payment-methods,
  .bank-transfer-details,
  .oauth-callback-grid,
  .oauth-provider-grid,
  .service-settings-grid,
  .social-auth {
    grid-template-columns: 1fr;
  }

  .site-nav {
    align-items: center;
    display: flex;
    justify-content: space-between;
    position: static;
  }

  .case-row {
    grid-template-columns: 1fr;
  }

  .case-copy {
    align-content: start;
  }

  .case-metrics {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .metric-card {
    min-width: 120px;
  }

  .service-grid,
  .faq-grid,
  .course-benefit-grid,
  .course-catalog-grid,
  .course-detail-hero,
  .course-lesson-grid,
  .dashboard-grid,
  .course-player-layout,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .course-sales-card {
    align-items: flex-start;
    display: grid;
  }

  .trial-course-button {
    min-width: min(100%, 280px);
  }

  .booking-card,
  .booking-form {
    grid-template-columns: 1fr;
  }

  .testimonial-layout {
    margin-left: -2px;
    margin-right: -2px;
  }

  .course-detail-section .section-title {
    align-items: flex-start;
  }

  .course-content-part summary {
    grid-template-columns: 18px 1fr;
    padding: 16px 18px;
  }

  .course-content-part summary em {
    grid-column: 2;
  }

  .course-content-unit {
    grid-template-columns: 16px 1fr auto;
    padding: 14px 18px;
  }

  .course-content-unit .preview-button {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .chat-proof-card,
  .testimonial-video-card {
    flex: 0 0 min(72vw, 320px);
  }

  .image-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-media-strip,
  .viral-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .case-media-strip .profile-image-card {
    flex: 0 0 var(--case-image-size);
    scroll-snap-align: start;
  }

  .viral-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .partner-card {
    flex: 0 0 min(72vw, 320px);
    max-width: none;
    scroll-snap-align: start;
  }

  .partner-card img {
    height: 100%;
  }

  .phone-shell,
  .profile-image-card {
    justify-self: start;
    max-width: none;
    width: var(--case-image-size);
  }

  .featured-copy {
    align-items: flex-start;
    display: grid;
  }

  .panel {
    border-radius: 18px;
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .image-upload-grid {
    grid-template-columns: 1fr;
  }

  body.viewer-page {
    padding-bottom: 92px;
  }

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

  .page-tabs {
    flex: 1 1 auto;
    width: auto;
  }

  .tab-button {
    flex: 1;
    padding-left: 12px;
    padding-right: 12px;
  }

  .case-row {
    border-radius: 20px;
    padding: 14px;
  }

  .case-metrics {
    grid-template-columns: repeat(3, 136px);
  }

  .floating-cta {
    bottom: 14px;
    right: 12px;
  }

  .floating-cta a {
    font-size: 13px;
    min-height: 42px;
    min-width: 92px;
    padding: 9px 12px;
  }
}
