:root {
  --bg:          #F5F0EC;
  --bg-warm:     #EDE8E3;
  --white:       #FFFFFF;
  --burgundy:    #5C1A1B;
  --burgundy-hover: #7A2526;
  --rose:        #B05E4E;
  --text:        #1A1A1A;
  --text-light:  #6B6B6B;
  --muted:       #9E9A96;
  --border:      #E2DCD6;
  --serif:       'Cormorant Garamond', Georgia, serif;
  --sans:        'Inter', system-ui, sans-serif;
  --r:           0px;
  --r-sm:        2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html { scroll-padding-top: 80px; }
html, body { height: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
body.sidebar-open {
  overflow: hidden;
  touch-action: none;
}
body.page-fade-out {
  opacity: 0;
  transform: translateY(-10px);
}
main {
  flex: 1 0 auto;
  animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 300; line-height: 1.12; letter-spacing: .01em; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 48px; }

/* ─── HEADER ─── */
.site-header {
  background: rgba(245, 240, 236, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(226, 220, 214, 0.6);
  position: sticky; top: 0; z-index: 100;
  transition: background 0.3s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: clamp(12px, 2vw, 32px);
  flex-wrap: nowrap;
  min-width: 0;
  position: relative;
}
.hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  transition: color .2s;
  flex-shrink: 0;
  z-index: 101;
}
.hamburger-btn:hover { color: var(--burgundy); }
.brand { display: flex; flex-direction: column; gap: 0; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-name { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--text); letter-spacing: .1em; text-transform: uppercase; line-height: 1; }
.brand-divider {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, var(--burgundy), transparent);
  flex-shrink: 0;
}
.brand-tagline { font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-light); font-weight: 600; line-height: 1.45; font-style: italic; }
.nav {
  display: none;
}
.nav-link {
  padding: 6px 10px; font-size: .82rem; font-weight: 700;
  color: var(--text-light); transition: color .3s ease; letter-spacing: .08em; text-transform: uppercase;
  position: relative; white-space: nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 16px; right: 16px;
  height: 1px;
  background: var(--burgundy);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover { color: var(--burgundy); }
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.header-actions { display: none; }

.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.site-avatar {
  display: grid; place-items: center; flex: 0 0 auto; overflow: hidden;
  border-radius: 50%; background: linear-gradient(145deg, var(--burgundy), var(--rose));
  color: #fff; font-family: var(--serif); font-weight: 600; text-transform: uppercase;
}
.site-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.site-avatar > span { display: block !important; color: inherit; font: inherit; line-height: 1; }
.header-avatar-link {
  position: relative; display: inline-grid; place-items: center; padding: 3px;
  border: 1px solid transparent; border-radius: 50%; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.site-avatar-header { width: 38px; height: 38px; font-size: 1rem; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.header-avatar-link:hover { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(176,94,78,.1); transform: translateY(-1px); }
.header-avatar-link.active { border-color: var(--burgundy); }

.language-switcher { display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:.68rem;font-weight:600;letter-spacing:.1em;white-space:nowrap; }
.language-option { color:var(--muted);padding:6px 2px;text-decoration:none;transition:color .2s ease; }
.language-option:hover,.language-option.active { color:var(--burgundy); }
.language-option.active { text-decoration:underline;text-underline-offset:4px; }
.language-switcher-mobile { font-size:.78rem;align-self:flex-start; }

.value-section { background:#fff; }
.value-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px; }
.value-card { border:1px solid var(--border);padding:clamp(24px,3vw,38px);background:var(--white);min-height:220px; }
.value-card-num { display:block;color:var(--rose);font-size:.7rem;letter-spacing:.16em;margin-bottom:26px; }
.value-card h3 { font-family:var(--serif);font-size:1.45rem;font-weight:400;margin-bottom:12px; }
.value-card p { color:var(--text-light);line-height:1.7;font-size:.9rem; }
.fit-check { margin-top:26px;display:flex;flex-wrap:wrap;justify-content:center;gap:10px; }
.fit-check span { border:1px solid var(--border);border-radius:999px;padding:9px 14px;background:rgba(255,255,255,.7);color:var(--text-light);font-size:.78rem; }
.payment-trust { display:grid;grid-template-columns:1fr 1.45fr;gap:24px;align-items:start;margin-top:20px;padding:22px;border:1px solid var(--border);background:var(--bg); }
.payment-trust strong { display:block;margin-bottom:6px; }
.payment-trust p { color:var(--text-light);line-height:1.55;font-size:.8rem;margin:0; }
.payment-methods { display:flex;flex-wrap:wrap;gap:8px; }
.payment-chip { border:1px solid var(--border);background:#fff;padding:8px 11px;font-size:.72rem;font-weight:600; }

/* ─── SIDEBAR OVERLAY ─── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ─── SIDEBAR DRAWER ─── */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90vw;
  height: 100vh;
  background: var(--white);
  z-index: 201;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: .06em;
}
.sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
  line-height: 1;
}
.sidebar-close:hover { color: var(--text); }
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}
.sidebar-link {
  display: block;
  padding: 14px 24px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, color .15s;
  letter-spacing: .04em;
}
.sidebar-link:hover {
  background: var(--bg);
  color: var(--burgundy);
}
.sidebar-actions {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.sidebar-actions .btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 2px solid var(--text);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: all .3s ease;
  width: 100%;
}
.sidebar-actions .btn-login:hover {
  background: var(--text);
  color: var(--bg);
}
.sidebar-actions .theme-switcher {
  margin-right: 0;
  align-self: flex-start;
}
.sidebar-actions .notif-bell {
  align-self: flex-start;
}
.sidebar-actions .notif-dropdown {
  right: 0;
  left: auto;
}
.sidebar-account-link {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
  text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.sidebar-account-link:hover { border-color: var(--rose); box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.site-avatar-sidebar { width: 44px; height: 44px; font-size: 1.05rem; }
.sidebar-account-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.sidebar-account-copy strong { overflow: hidden; color: var(--text); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-copy small { overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-arrow { color: var(--burgundy); font-size: 1rem; }

.beta-notice {
  border-bottom: 1px solid var(--border);
  background: #fff8f4;
}
.beta-notice-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
  color: var(--text-light);
  font-size: .82rem;
  line-height: 1.45;
}
.beta-notice strong {
  color: var(--burgundy);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .header-inner {
    justify-items: center;
    gap: 12px;
    padding: 16px 0;
    height: auto;
  }
  .brand { order: 1; }
  .hamburger-btn { order: 0; }
}

@media (min-width: 1921px) {
  .hamburger-btn { display: none; }
  .sidebar-overlay { display: none !important; }
  .sidebar { display: none !important; }
  .nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    gap: 3px;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
  }
  .header-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 42px; border-radius: var(--r);
  font-size: .9rem; font-weight: 600; line-height: 1;
  transition: all .4s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; cursor: pointer;
  letter-spacing: .12em; text-transform: uppercase;
}
.btn-primary { 
  background: var(--burgundy); 
  color: #fff; 
  border: 1px solid var(--burgundy); 
  box-shadow: 0 4px 16px rgba(92, 26, 27, 0.1);
}
.btn-primary:hover { 
  background: var(--burgundy-hover); 
  border-color: var(--burgundy-hover); 
  box-shadow: 0 8px 24px rgba(92, 26, 27, 0.25);
  transform: translateY(-2px);
}
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--text); }
.btn-outline:hover { 
  background: var(--text); 
  color: var(--bg); 
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.1);
}
.btn-ghost  { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-danger { background: var(--burgundy); color: #fff; border: 1px solid var(--burgundy); }
.btn-danger:hover { background: #4A1516; }
.btn-sm { padding: 10px 22px; font-size: .68rem; }
.btn-full { width: 100%; justify-content: center; }

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.hero-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--bg);
  overflow: hidden;
}
.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image-desktop);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  margin: -6px;
  opacity: 0;
  object-fit: contain;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  mix-blend-mode: multiply;
  -webkit-filter: blur(2px) saturate(.96);
  filter: blur(2px) saturate(.96);
}

@media (max-width: 600px) {
  .beta-notice-inner {
    align-items: flex-start;
    gap: 5px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: .68rem;
    line-height: 1.35;
  }
  .beta-notice strong {
    font-size: .58rem;
    letter-spacing: .05em;
    padding-top: 1px;
  }
  .nav-link { padding-left: 9px; padding-right: 9px; font-size: .78rem; }
}

.hero-video-loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--text);
  background: rgba(245, 240, 236, .96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .55s ease, visibility .55s ease;
}
.hero.is-video-loading .hero-video-loader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.hero-video-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hero-video-loader-mark {
  font-family: var(--serif, serif);
  font-size: 3.5rem;
  font-style: italic;
  color: var(--rose);
}
.hero-video-loader p {
  margin: 0;
  font-family: var(--serif, serif);
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: .04em;
}
.hero-video-loader span {
  width: 150px;
  height: 2px;
  overflow: hidden;
  background: rgba(176, 94, 78, .18);
}
.hero-video-loader span::after {
  content: '';
  display: block;
  width: 45%;
  height: 100%;
  background: var(--rose);
  animation: hero-video-loading 1s ease-in-out infinite alternate;
}
@keyframes hero-video-loading {
  from { transform: translateX(-15%); }
  to { transform: translateX(135%); }
}
.hero-video-wrap.has-video .hero-bg-slide {
  opacity: 0;
}
.hero-video-wrap.has-video .hero-bg-video {
  opacity: 1;
}


.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245,240,236,0.85) 0%, rgba(245,240,236,0.7) 50%, transparent 100%);
  z-index: 2;
}
.hero-fashion-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  background: url('/static/uploads/hero-mannequin-organza.png') center center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .58;
  filter: blur(.35px);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  html,
  body,
  a,
  button,
  input,
  textarea,
  select,
  label,
  [role="button"] {
    cursor: url('/static/uploads/hero-sewing-orbit/cursor-main-visible.svg') 3 3, auto !important;
  }
  a[href],
  button,
  [role="button"],
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  label[for],
  summary {
    cursor: url('/static/uploads/hero-sewing-orbit/cursor-click.svg') 3 3, pointer !important;
  }
}

@media (min-width: 961px) and (max-width: 1920px) {
  .header-inner {
    gap: 14px;
  }
  .hamburger-btn {
    order: 3;
    width: 38px;
    height: 38px;
  }
  .brand {
    order: 0;
    flex-shrink: 1;
  }
  .brand-logo-container {
    gap: 11px;
  }
  .brand-name {
    font-size: 1.55rem;
  }
  .brand-tagline {
    font-size: .56rem;
    letter-spacing: .14em;
  }
  .brand-divider {
    height: 28px;
  }
  .nav {
    display: none !important;
  }
  .header-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    min-width: 0;
  }
  .btn-login {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
.hero-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 84px);
  padding: 120px 48px 80px;
  max-width: 1280px;
  margin: 0 auto;
}
.hero-text h1 {
  font-size: clamp(3.6rem, 8vw, 6rem);
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  line-height: 1.02;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}
.hero-text h1 em {
  display: block;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  color: var(--rose);
  margin-top: 8px;
}
.hero-desc {
  font-size: 1.4rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-actions .btn {
  padding: 22px 50px;
  font-size: 1rem;
  letter-spacing: .14em;
}

@media (max-width: 960px) {
  .hero-content {
    padding: 80px 24px 60px;
    align-items: center;
    text-align: center;
  }
  .hero-text h1 {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
  }
  .hero-desc {
    font-size: 1.1rem;
    max-width: 100%;
  }
  .hero-fashion-atmosphere { background-position: 45% center; opacity: .48; }
}
@media (max-width: 600px) {
  .hero-actions .btn {
    padding: 18px 32px;
    font-size: .85rem;
  }
}

/* ─── SECTION UTILITIES ─── */
.section { padding: 140px 0; }
.section-header { text-align: center; max-width: 800px; margin: 0 auto 80px; }
.section-label { font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--rose); font-weight: 600; margin-bottom: 18px; display: block; }
.section-title { font-size: clamp(2.4rem, 5vw, 3.8rem); color: var(--text); margin-bottom: 24px; font-weight: 300; line-height: 1.1; }
.section-sub { font-size: 1.15rem; color: var(--text-light); line-height: 1.75; font-weight: 300; }

/* ─── ABOUT SECTION ─── */
.about-section { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: center; }
.about-img-wrap { position: relative; overflow: hidden; min-height: 600px; }
.about-img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.about-content { padding: 80px 80px 80px 60px; position: relative; }
.about-content .section-label { text-align: left; margin-bottom: 20px; }
.about-content .section-title { text-align: left; font-size: clamp(2.2rem, 3.5vw, 3.2rem); font-weight: 300; line-height: 1.15; margin-bottom: 32px; }
.about-text { font-size: 1.25rem; color: var(--text-light); line-height: 1.85; margin-top: 30px; max-width: 520px; }
.about-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 32px;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text);
  border-bottom: 1px solid var(--text); padding-bottom: 4px; transition: color .2s, border-color .2s; }
.about-link:hover { color: var(--burgundy); border-color: var(--burgundy); }
.about-deco {
  position: absolute; right: -20px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: 28rem; font-weight: 300; color: rgba(0,0,0,.03);
  line-height: 1; pointer-events: none; user-select: none;
}

/* ─── CATEGORY / COURSES GRID ─── */
.category-section { background: var(--bg-warm); }
.category-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 48px; }
.category-header .section-label { text-align: left; margin-bottom: 10px; }
.category-header .section-title { text-align: left; margin-bottom: 0; font-size: clamp(1.6rem, 2.5vw, 2.4rem); }
.category-link { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-light);
  border-bottom: 1px solid var(--border); padding-bottom: 3px; transition: color .2s, border-color .2s; }
.category-link:hover { color: var(--burgundy); border-color: var(--burgundy); }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Scroll-Reveal Base Class */
.reveal-item {
  opacity: 0;
  transform: translateY(50px) scale(0.97);
  filter: blur(4px);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
  overflow: hidden;
  position: relative;
}
.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(92, 26, 27, 0.08);
  border-color: rgba(92, 26, 27, 0.15);
}
.category-card-img {
  height: 240px;
  overflow: hidden;
  position: relative;
}
.category-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(26,26,26,0.12) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.category-card:hover .category-card-img::after {
  opacity: 1;
}
.category-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.category-card:hover .category-card-img img {
  transform: scale(1.05);
}
.category-card-body {
  padding: 30px 24px 28px;
  position: relative;
  background: var(--white);
  z-index: 2;
}
.category-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 300;
  color: rgba(92, 26, 27, 0.12);
  position: absolute;
  top: 14px; right: 24px;
  line-height: 1;
  transition: color 0.4s ease, transform 0.4s ease;
}
.category-card:hover .category-num {
  color: rgba(92, 26, 27, 0.25);
  transform: translateY(-3px);
}
.category-card-body h3 {
  font-size: .85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
  color: var(--text);
  transition: color 0.3s ease;
}
.category-card:hover .category-card-body h3 {
  color: var(--burgundy);
}
.category-card-body p {
  font-size: .76rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 90%;
}
.category-arrow {
  font-size: 1rem;
  color: var(--burgundy);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}
.category-card:hover .category-arrow {
  transform: translateX(5px);
}

/* ─── FEATURE CARDS ─── */
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.feature-card { background: var(--white); padding: 40px 32px; border: 1px solid var(--border); }
.feature-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.05); }
.feature-icon {
  width: 36px; height: 36px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; margin-bottom: 20px; color: var(--burgundy);
}
.feature-card h3 { font-size: 1.05rem; font-weight: 400; margin-bottom: 10px; font-family: var(--serif); }
.feature-card p { font-size: .82rem; color: var(--text-light); line-height: 1.7; font-weight: 300; }

/* ─── COURSE CARDS (courses page) ─── */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 24px; }
.course-card {
  background: var(--white); overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow .4s ease, border-color .4s ease, transform .3s ease;
  display: flex; flex-direction: column;
}
.course-card:hover {
  box-shadow: 0 30px 80px rgba(92,26,27,.2);
  border-color: rgba(92,26,27,.3);
  z-index: 10;
}
.course-card-img { aspect-ratio: 3 / 4; position: relative; overflow: hidden; }
.course-card-img-bg {
  width: 100%; height: 100%;
  background-color: #F5F0EC;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Crect width='100%25' height='100%25' fill='%23F5F0EC'/%3E%3Cg transform='translate(150, 150)' stroke='%23B05E4E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Cpath d='M0,-50 C-15,-50 -25,-35 0,-20 C25,-35 15,-50 0,-50 Z'/%3E%3Cline x1='0' y1='-20' x2='0' y2='60' stroke-width='3'/%3E%3Cpath d='M-35, -5 C-15, -10 15, -10 35, -5 C25, 20 20, 35 15, 55 C-15, 55 -20, 35 -25, 20 Z' fill='%23ffffff' stroke-width='2.5'/%3E%3Cline x1='0' y1='60' x2='0' y2='110' stroke-width='4' stroke='%235C1A1B'/%3E%3Cpath d='M-30, 130 L0, 110 L30, 130' stroke-width='3' stroke='%235C1A1B'/%3E%3Cpath d='M-18, -25 L18, -25 M-15,-25 C-15,-15 -2,-15 -2,-25 M15,-25 C15,-15 2,-15 2,-25' fill='%235C1A1B' stroke='%235C1A1B' stroke-width='2'/%3E%3Cpath d='M-45,-45 C-10,-65 10,-65 45,-45 C60,-45 40,-35 0,-35 C-40,-35 -60,-45 -45,-45 Z' fill='%23EDE8E3' stroke='%23B05E4E' stroke-width='2'/%3E%3Cpath d='M-20,-48 C-10,-70 10,-70 20,-48' fill='%23B05E4E' opacity='0.3'/%3E%3C/g%3E%3Cg transform='translate(225, 220)' stroke='%23B05E4E' stroke-width='2' stroke-linecap='round' fill='none'%3E%3Cpath d='M-10,0 L10,0 L15,25 L-15,25 Z' fill='%23ffffff'/%3E%3Cpath d='M-12,8 L12,8 L13,18 L-13,18 Z' fill='%23B05E4E'/%3E%3Cline x1='0' y1='-10' x2='12' y2='-25'/%3E%3C/g%3E%3Ctext x='50%25' y='305' font-family='Inter, sans-serif' font-size='13' font-weight='700' fill='%235C1A1B' text-anchor='middle' letter-spacing='0.5'%3E%D0%A4%D0%9E%D0%A2%D0%9E%20%D0%A1%D0%9A%D0%9E%D0%A0%D0%9E!%3C/text%3E%3Ctext x='50%25' y='328' font-family='Inter, sans-serif' font-size='10.5' font-weight='500' fill='%236B6B6B' text-anchor='middle'%3E%D0%9C%D0%B0%D0%BD%D0%B5%D0%BA%D0%B5%D0%BD%D0%B8%20%D0%B2%D0%BB%D0%B0%D1%88%D1%82%D1%83%D0%B2%D0%B0%D0%BB%D0%B8%20%D0%B1%D1%83%D0%BD%D1%82%2C%20%D0%B2%D1%96%D0%B4%D0%BC%D0%BE%D0%B2%D0%B8%D0%BB%D0%B8%D1%81%D1%8F%3C/text%3E%3Ctext x='50%25' y='346' font-family='Inter, sans-serif' font-size='10.5' font-weight='500' fill='%236B6B6B' text-anchor='middle'%3E%D0%BF%D0%BE%D0%B7%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D0%B1%D0%B5%D0%B7%20%D0%BA%D0%B0%D0%B2%D0%B8%20%D1%82%D0%B0%20%D0%BF%D1%96%D1%88%D0%BB%D0%B8%20%D0%BD%D0%B0%20%D0%BF%D0%BB%D1%8F%D0%B6.%3C/text%3E%3C/svg%3E");
  background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.course-card:hover .course-card-img-bg { transform: scale(1.04); }
.course-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.93); backdrop-filter: blur(8px);
  padding: 4px 12px; font-size: .62rem; font-weight: 500;
  color: var(--burgundy); letter-spacing: .06em; text-transform: uppercase;
}
.course-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.course-card-body h3 { font-size: 1rem; font-weight: 400; margin-bottom: 8px; font-family: var(--serif); }
.course-card-body p { font-size: .8rem; color: var(--text-light); line-height: 1.65; flex: 1; margin-bottom: 18px; }
.course-card-footer { display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; color: var(--text); }
.price-free { color: var(--burgundy); }

/* ─── CATEGORY FILTER BUTTONS (mobile) ─── */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: -10px 0 44px;
}
.filter-btn {
  padding: 10px 22px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 30px;
  cursor: pointer;
  transition: all .3s ease;
  white-space: nowrap;
  font-family: inherit;
}
.filter-btn:hover {
  color: var(--burgundy);
  border-color: var(--burgundy);
}
.filter-btn.active {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
  box-shadow: 0 4px 14px rgba(92, 26, 27, 0.2);
}

/* ─── CATEGORY TABS (desktop) ─── */
.category-tabs-desktop {
  display: none;
  position: relative;
  gap: 4px;
  background: rgba(226, 220, 214, 0.35);
  padding: 5px;
  border-radius: 40px;
  border: 1px solid rgba(226, 220, 214, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: fit-content;
  max-width: 100%;
  margin: -10px auto 44px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-tabs-desktop::-webkit-scrollbar { display: none; }
.tab-slider {
  position: absolute;
  top: 5px;
  left: 5px;
  height: calc(100% - 10px);
  background: var(--burgundy);
  border-radius: 30px;
  z-index: 0;
  transition: left 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(92, 26, 27, 0.2);
}
.tab-link {
  position: relative;
  z-index: 1;
  padding: 10px 24px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  border-radius: 30px;
  transition: color 0.35s ease;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.tab-link:hover { color: var(--burgundy); }
.tab-link.active {
  color: var(--white);
  background: var(--burgundy);
}

@media (min-width: 961px) {
  .category-filters { display: none; }
  .category-tabs-desktop { display: flex; }
}

/* ─── PAGE HEADER ─── */
.page-hero { padding: 56px 0 44px; margin-bottom: 40px; border-bottom: 1px solid var(--border); }
.page-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 300; margin-bottom: 10px;
  transition: opacity 0.2s ease, transform 0.3s ease;
}
.page-hero p { color: var(--text-light); font-size: .9rem; }

/* ─── COURSE DETAIL ─── */
.course-detail-wrap {
  display: grid; grid-template-columns: minmax(0, 1.25fr) 360px;
  gap: 44px; padding: 48px 0 64px; align-items: start;
}
.course-hero { padding: 24px 0 48px; }
.course-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, 1fr);
  gap: 48px; align-items: start;
}
.course-hero-media { min-width: 0; max-width: 100%; }
.course-hero-side { display: flex; flex-direction: column; gap: 18px; padding-top: 10px; }
.course-media-column { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.course-hero-main { width: 100%; }
.course-hero-main { position: relative; }
.course-hero-image {
  width: 100%; display: block; overflow: hidden;
  border: 1px solid #ece7de; border-radius: 2px;
  box-shadow: none; background: var(--white);
}
.course-hero-image img { width: 100%; height: auto; display: block; }
.course-hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid #e6dfd4;
  background: rgba(255,255,255,.96); color: var(--text); display: flex;
  align-items: center; justify-content: center; font-size: 24px; line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.08); cursor: pointer; z-index: 2;
}
.course-hero-nav:hover { background: #fff; }
.course-hero-nav-prev { left: 12px; }
.course-hero-nav-next { right: 12px; }

@media (max-width: 768px) {
  .course-hero-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
  }
  .course-hero-main {
    min-height: auto;
  }
  .course-hero-nav {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }
  .course-hero-nav-prev { left: 8px; }
  .course-hero-nav-next { right: 8px; }
}
.course-intro-card {
  background: transparent; border: 0; padding: 0; border-radius: 0; box-shadow: none;
}
.course-intro-card h1 {
  font-size: clamp(1.9rem, 3.2vw, 3.1rem); line-height: 1.03; margin-bottom: 16px;
  font-weight: 600; letter-spacing: -0.02em; max-width: 100%;
}
.course-price-line { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.course-price-main { font-family: var(--serif); font-size: clamp(1.8rem, 2.8vw, 2.5rem); font-weight: 300; color: var(--burgundy); }
.course-lead {
  font-size: 1rem; line-height: 1.9; color: var(--text-light);
  margin-top: 8px; white-space: pre-line; max-width: 440px;
}
.course-intro-card .course-meta { margin-top: 16px; }
.course-intro-card .course-description { margin-top: 14px; font-size: 1rem; }
.course-meta { display: flex; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.course-meta-item { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--text-light); }
.buy-box {
  background: transparent; border: 0; padding: 0; height: fit-content;
  position: sticky; top: 90px; box-shadow: none; margin-top: 22px;
}
.buy-box-price { font-family: var(--serif); font-size: 1.55rem; font-weight: 300; margin-bottom: 14px; }
.buy-box-note { font-size: .72rem; color: var(--muted); text-align: left; margin-top: 10px; }
.buy-box-start { font-size: .82rem; color: var(--text); margin-bottom: 12px; }

/* Course description preserves line breaks/paragraphs */
.course-description {
  color: var(--text-light); font-size: 1.02rem; line-height: 1.8;
  white-space: pre-line; margin-top: 6px;
}

/* ─── COURSE GALLERY (thumbnail strip) ─── */
.course-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 8px; margin: 14px 0 0; width: 100%;
}
.course-gallery-item {
  cursor: pointer; border: 0; padding: 0; background: transparent; aspect-ratio: 1 / 1;
}
.course-gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 3px; border: 1px solid #ece7de; box-shadow: none;
  transition: opacity .2s ease, transform .2s ease;
}
.course-gallery-item.is-active img {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 1px var(--burgundy);
}
.course-gallery-item:hover img {
  transform: translateY(-1px); opacity: .9;
}
 .course-lessons-table { display: grid; gap: 10px; }

/* Sidebar Course Program Box */
.course-program-box {
  background: var(--white); border: 1px solid var(--border);
  padding: 24px; border-radius: var(--r); margin-top: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.03);
}
.course-program-box .lesson-module-title {
  font-size: .88rem; font-weight: 600; color: var(--text);
  margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.course-program-box .lesson-module-title:first-of-type { margin-top: 0; }
.course-program-box .lessons-list { gap: 6px; }
.course-program-box .lesson-item {
  padding: 10px 12px; gap: 10px; border-radius: 4px;
}
.course-program-box .lesson-num {
  width: 22px; height: 22px; font-size: .65rem;
}
.course-program-box .lesson-title {
  font-size: .82rem; font-weight: 500; line-height: 1.3;
}
.course-program-box .lesson-desc {
  font-size: .72rem; margin-top: 2px;
}
.course-program-box .btn-sm {
  padding: 4px 8px; font-size: .7rem;
}
.course-program-box .locked-badge {
  font-size: .7rem; padding: 2px 6px;
}

/* Fullscreen Lightbox */
.lightbox {
  display: none; position: fixed; z-index: 99999;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(18, 12, 12, 0.95); align-items: center;
  justify-content: center; cursor: pointer;
}
.lightbox-content {
  max-width: 90%; max-height: 90%; object-fit: contain;
  border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.6);
  animation: zoomIn .25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zoomIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lightbox-close {
  position: absolute; top: 24px; right: 30px;
  color: #fff; font-size: 44px; font-weight: 300;
  transition: color .2s;
}
.lightbox:hover .lightbox-close { color: var(--burgundy); }

/* Lesson module/category headings */
.lesson-module-title {
  font-size: 1.05rem; font-weight: 600; color: var(--text);
  margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
  letter-spacing: .02em;
}
.lessons-list + .lesson-module-title { margin-top: 32px; }

/* Pricing tiers in buy box */
.tier-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.tier-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .9rem; padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.tier-row:last-child { border-bottom: none; }
.tier-name { color: var(--text-light); }
.tier-price { font-weight: 600; color: var(--text); }

/* Tier selection on checkout */
.tier-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.tier-option {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px;
  transition: border-color .2s, background .2s;
}
.tier-option:hover { border-color: var(--burgundy); }
.tier-option:has(input:checked) { border-color: var(--burgundy); background: var(--bg); }
.tier-option input { accent-color: var(--burgundy); }
.tier-option-name { flex: 1; font-size: .9rem; color: var(--text); }
.tier-option-price { font-weight: 600; color: var(--text); }

/* Admin: course image management grid */
.course-images-admin {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.course-image-admin { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; position: relative; background: var(--white); }
.course-image-admin[draggable="true"] { cursor: grab; }
.course-image-admin.is-dragging { opacity: .6; cursor: grabbing; }
.course-image-admin.drag-over { border-color: var(--burgundy); box-shadow: 0 0 0 2px rgba(92,26,27,.18); }
.course-image-drag-handle {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: rgba(0,0,0,.52); color: #fff;
  font-size: 1rem; line-height: 1; cursor: grab; user-select: none;
}
.course-image-admin img { width: 100%; height: 110px; object-fit: cover; display: block; }
.course-image-admin form { padding: 8px; }
.course-image-admin .btn { width: 100%; justify-content: center; }
.course-upload-status { margin-top: 14px; padding: 14px; border: 1px solid rgba(92,26,27,.18); background: rgba(92,26,27,.045); color: var(--text); display: grid; gap: 8px; font-size: .84rem; }
.course-upload-status[hidden] { display: none; }
.course-upload-status strong { font-size: .9rem; }
.course-upload-status span { color: var(--text-light); line-height: 1.5; }
.course-upload-bar { height: 8px; overflow: hidden; background: rgba(92,26,27,.12); }
.course-upload-bar span { display: block; width: 0; height: 100%; background: var(--burgundy); transition: width .2s ease; }

/* Course card start-date badge */
.course-start-badge {
  display: inline-block; font-size: .7rem; letter-spacing: .04em;
  color: var(--burgundy); background: rgba(106,27,28,.07);
  padding: 4px 10px; border-radius: 999px; margin-top: 8px;
}

.lessons-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lesson-item {
  background: var(--white); border: 1px solid var(--border);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; transition: border-color .2s, box-shadow .2s;
}
.lesson-item:hover { border-color: rgba(92,26,27,.2); box-shadow: 0 2px 10px rgba(0,0,0,.03); }
.lesson-item-left { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.lesson-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.lesson-num {
  width: 28px; height: 28px;
  background: var(--bg-warm); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 600; flex-shrink: 0;
}
.lesson-title { font-weight: 500; font-size: .88rem; margin-bottom: 2px; }
.lesson-desc  { font-size: .75rem; color: var(--muted); }
.locked-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #F3F4F6; color: #9CA3AF;
  padding: 5px 12px; font-size: .7rem; font-weight: 500;
}

/* ─── LESSON PAGE ─── */
.lesson-container-classic { max-width: 1720px; }
.lesson-interface-toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding-top: 20px; margin-bottom: -14px;
}
.lesson-interface-toolbar span {
  color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
}
.lesson-interface-toggle {
  border: 1px solid var(--border); background: var(--white); color: var(--text);
  padding: 8px 12px; font-size: .74rem; font-weight: 600; cursor: pointer;
}
.lesson-heading-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin: 8px 0 18px; flex-wrap: wrap;
}
.lesson-edit-btn { white-space: nowrap; }
.lesson-interface-toggle[aria-pressed="true"] {
  border-color: var(--burgundy); color: var(--burgundy); background: var(--bg-warm);
}
.lesson-layout {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 28px; padding: 32px 0 64px; align-items: start;
}
.lesson-main { min-width: 0; }
.lesson-heading { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 300; margin: 8px 0 18px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .75rem; margin-bottom: 4px; transition: color .2s; }
.back-link:hover { color: var(--burgundy); }
.video-wrap { overflow: hidden; background: #000; aspect-ratio: 16/9; min-height: 220px; box-shadow: 0 16px 48px rgba(0,0,0,.14); }
.video-wrap iframe,
.video-wrap video { width: 100%; height: 100%; border: none; display: block; }
.video-wrap video { object-fit: contain; position: relative; z-index: 2; pointer-events: auto; }
.video-fallback { margin-top: 10px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.video-fallback a { color: var(--burgundy); font-weight: 700; }

.lesson-complete-panel {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  margin: 12px 0; padding: 0; background: transparent; border: 0;
}
.lesson-complete-panel > div { text-align: right; }
.lesson-complete-panel strong { display: none; }
.lesson-complete-panel p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.lesson-complete-btn { flex: 0 0 auto; min-width: 0; padding: 9px 14px; font-size: .62rem; }
.lesson-complete-btn.is-complete,
.lesson-complete-btn.is-complete:disabled {
  border-color: #15803d; background: #15803d; color: #fff; opacity: 1; cursor: default;
}

.lesson-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 20px 0; padding: 16px; background: var(--white);
  border: 1px solid var(--border);
}
.lesson-nav .btn { font-size: .68rem; padding: 10px 18px; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-nav-count { font-size: .72rem; color: var(--muted); white-space: nowrap; font-weight: 500; }

.lesson-desc-box {
  background: var(--white); border: 1px solid var(--border);
  padding: 22px; margin-top: 4px;
}
.lesson-desc-box-no-image {
  padding: 32px 22px;
  text-align: center;
}
.lesson-desc-box-no-image p {
  max-width: 500px;
  margin: 0 auto 16px auto;
}
.lesson-desc-box h3 { font-size: .85rem; margin-bottom: 10px; font-weight: 400; }
.lesson-desc-box p { font-size: .82rem; color: var(--text-light); line-height: 1.75; }

.lesson-info-box {
  background: var(--white); border: 1px solid var(--border);
  padding: 32px;
}
.lesson-info-text {
  font-size: .9rem; color: var(--text-light); line-height: 1.8;
  white-space: pre-line;
}
.lesson-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.lesson-gallery-item img {
  width: 100%; height: auto; border-radius: 8px;
  border: 1px solid var(--border); display: block;
}
.lesson-info-image { width: min(100%, 520px); margin: 0 0 16px; cursor: pointer; }
.lesson-info-image img { display: block; width: 100%; border-radius: 8px; }
.lesson-lightbox { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; background: rgba(0, 0, 0, .9); }
.lesson-lightbox-close { position: absolute; top: 20px; right: 24px; z-index: 1; padding: 4px; border: 0; background: none; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.lesson-lightbox-body { display: flex; align-items: center; gap: 24px; max-width: 96vw; }
.lesson-lightbox-image { max-width: 80vw; max-height: 84vh; border-radius: 2px; object-fit: contain; }
.lesson-lightbox-download { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--burgundy); color: #fff; cursor: pointer; font-size: 1.2rem; }

.lesson-sidebar {
  background: var(--white); border: 1px solid var(--border);
  overflow: hidden; position: sticky; top: 90px;
  max-height: calc(100vh - 110px); display: flex; flex-direction: column;
}
.lesson-module-header {
  padding: 14px 16px 6px; font-size: .58rem; font-weight: 600;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); background: var(--bg-warm);
}
.lesson-sidebar-title {
  padding: 16px 18px; font-size: .68rem; font-weight: 500;
  border-bottom: 1px solid var(--border); color: var(--text);
  background: var(--bg); letter-spacing: .08em; text-transform: uppercase;
}
.lesson-sidebar-list { list-style: none; overflow-y: auto; flex: 1; }
.lesson-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: .78rem; color: var(--text-light);
  border-bottom: 1px solid var(--border); transition: background .15s;
  text-decoration: none;
}
.lesson-sidebar-item:last-child { border-bottom: none; }
.lesson-sidebar-item:hover { background: var(--bg); color: var(--text); }
.lesson-sidebar-item.active { background: var(--bg-warm); color: var(--burgundy); font-weight: 500; }
.lesson-sidebar-num {
  width: 22px; height: 22px; flex-shrink: 0;
  background: var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700;
}
.lesson-type-icon {
  width: 14px; height: 14px; display: block; fill: none;
  stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.lesson-sidebar-icon { display: none; }
.lesson-sidebar-item.active .lesson-sidebar-num { background: var(--burgundy); color: #fff; }
.lesson-sidebar-name { flex: 1; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.lesson-sidebar-dot { width: 6px; height: 6px; background: var(--burgundy); flex-shrink: 0; }
.lesson-sidebar-check {
  color: #22c55e;
  font-size: .9rem;
  font-weight: 700;
  margin-left: 8px;
}

/* ─── SIDEBAR v2 (scrollable, with progress) ─── */
.lesson-sidebar-header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.lesson-sidebar-progress {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 12px; background: var(--bg);
}
.lesson-sidebar-progress-bar {
  flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.lesson-sidebar-progress-fill {
  height: 100%; background: var(--burgundy); border-radius: 2px; transition: width .4s ease;
}
.lesson-sidebar-progress-text {
  font-size: .65rem; color: var(--muted); font-weight: 600; white-space: nowrap; letter-spacing: .06em;
}
.lesson-sidebar-scroll {
  width: 100%; overflow-x: hidden; overflow-y: auto; flex: 1; overscroll-behavior: contain;
  overscroll-behavior-x: none; touch-action: pan-y;
  scroll-behavior: smooth;
}
.lesson-sidebar-scroll::-webkit-scrollbar { width: 4px; }
.lesson-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.lesson-sidebar-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.lesson-sidebar-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.lesson-sidebar-item.viewed { opacity: .75; }
.lesson-sidebar-item.viewed .lesson-sidebar-num { background: #dcfce7; color: #15803d; }
.lesson-sidebar-status { flex-shrink: 0; width: 16px; display: flex; align-items: center; justify-content: center; }
.lesson-module-header {
  padding: 10px 16px 8px; font-size: .58rem; font-weight: 600;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase;
  background: var(--bg-warm); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1;
}
.lesson-module-header:first-child { border-top: none; }
.lesson-layout-classic {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
}
.lesson-layout-classic .lesson-sidebar {
  grid-column: 1;
  grid-row: 1;
  border-color: rgba(92,26,27,.18);
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
}
.lesson-layout-classic .lesson-main {
  grid-column: 2;
  grid-row: 1;
  padding-right: 14px;
}
.lesson-layout-classic .lesson-heading {
  font-size: clamp(1.35rem, 1.8vw, 2rem);
}
.lesson-layout-classic .video-wrap {
  width: 100%;
  box-shadow: 0 18px 58px rgba(0,0,0,.18);
}
.lesson-layout-classic .lesson-info-box {
  min-height: 64vh;
}
.lesson-layout-classic .lesson-module-header {
  margin: 12px 10px 6px;
  border: 1px solid rgba(92,26,27,.16);
  background: #f1e7e2;
  color: var(--burgundy);
  position: sticky;
  top: 0;
}
.lesson-layout-classic .lesson-module-header span {
  display: block;
  overflow-wrap: anywhere;
}
.lesson-layout-classic .lesson-sidebar-item {
  margin: 0 10px 6px;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
  padding: 10px 10px;
}
.lesson-layout-classic .lesson-sidebar-item.active {
  border-color: rgba(92,26,27,.24);
  background: #fff;
  box-shadow: inset 3px 0 0 var(--burgundy);
}
.lesson-layout-classic .lesson-sidebar-index { display: none; }
.lesson-layout-classic .lesson-sidebar-icon { display: block; }

/* ─── AUTH ─── */
.auth-wrap { min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center; padding: 60px 0; }
.auth-card {
  background: var(--white); border: 1px solid var(--border);
  padding: 48px; width: 100%; max-width: 400px;
  box-shadow: 0 8px 40px rgba(0,0,0,.04);
}
.auth-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: 6px; font-weight: 300; }
.auth-subtitle { text-align: center; color: var(--text-light); font-size: .85rem; margin-bottom: 32px; }
.btn-google {
  min-height: 46px; justify-content: center;
  background: #fff; color: #2f3033; border: 1px solid #d6d9de;
  gap: 11px; text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600;
  box-shadow: 0 3px 12px rgba(24, 32, 48, .08);
}
.btn-google svg { flex: 0 0 19px; width: 19px; height: 19px; }
.btn-google:hover {
  background: #fff; border-color: #aeb4bd; color: #161719;
  box-shadow: 0 7px 20px rgba(24, 32, 48, .14); transform: translateY(-2px);
}
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: .72rem; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--border); }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-label { font-size: .68rem; font-weight: 500; color: var(--text); letter-spacing: .06em; text-transform: uppercase; }
.form-control {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border);
  font-family: inherit; font-size: .85rem;
  background: var(--bg); color: var(--text);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(92,26,27,.06); background: #fff; }
textarea.form-control { resize: vertical; }
.form-hint { margin-top: 2px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.form-footer { text-align: center; margin-top: 20px; font-size: .82rem; color: var(--muted); }
.form-footer a { color: var(--burgundy); font-weight: 500; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: .85rem; cursor: pointer; }
.inline-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--burgundy); }

/* ─── WELCOME OVERLAY ─── */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(26,26,26,.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: welcomeFadeIn .4s ease-out forwards;
}
@keyframes welcomeFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes welcomePop {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.welcome-card {
  max-width: 560px; width: 100%;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 4px; box-shadow: 0 32px 80px rgba(0,0,0,.25);
  padding: 44px 40px 36px; position: relative;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(.97); opacity: 0;
  animation: welcomePop .55s cubic-bezier(0.16,1,0.3,1) .08s forwards;
}
.welcome-x {
  position: absolute; top: 14px; right: 18px;
  font-size: 1.6rem; color: var(--muted); cursor: pointer;
  line-height: 1; padding: 4px; transition: color .2s;
}
.welcome-x:hover { color: var(--text); }
.welcome-header { text-align: center; margin-bottom: 28px; }
.welcome-kicker {
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--rose); font-weight: 600; margin-bottom: 14px; display: block;
}
.welcome-title {
  font-family: var(--serif); font-size: 2rem; line-height: 1.15;
  margin-bottom: 14px; font-weight: 300;
}
.welcome-title em { color: var(--rose); font-style: italic; }
.welcome-text {
  font-size: .92rem; line-height: 1.7; color: var(--text-light);
  max-width: 440px; margin: 0 auto;
}
.welcome-courses {
  margin: 0 0 28px; padding: 18px 20px;
  background: var(--bg); border-radius: 6px; border: 1px solid var(--border);
}
.welcome-courses-title {
  font-size: .75rem; font-weight: 600; color: var(--burgundy);
  margin-bottom: 14px; letter-spacing: .12em; text-transform: uppercase;
}
.welcome-course-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.welcome-course-item:last-child { border-bottom: none; padding-bottom: 0; }
.welcome-course-item:first-child { padding-top: 0; }
.welcome-course-info { flex: 1; }
.welcome-course-name { font-size: .92rem; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.welcome-course-tier { font-size: .8rem; color: var(--text-light); margin-bottom: 1px; }
.welcome-course-curator { font-size: .75rem; color: var(--muted); }
.welcome-course-days { font-size: .8rem; color: var(--rose); font-weight: 500; white-space: nowrap; margin-left: 12px; }
.welcome-tips { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.welcome-tip {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; background: var(--bg); border-radius: 6px;
  border: 1px solid var(--border);
}
.welcome-tip-icon { font-size: 1.4rem; line-height: 1.4; flex-shrink: 0; }
.welcome-tip h3 { font-size: 1rem; font-weight: 500; margin-bottom: 4px; color: var(--text); }
.welcome-tip p { font-size: .85rem; line-height: 1.6; color: var(--text-light); margin: 0; }
.welcome-tip p a { color: var(--burgundy); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.welcome-tip p a:hover { color: var(--burgundy-hover); }
.welcome-bottom { text-align: center; }
.welcome-bottom .btn { padding: 13px 32px; font-size: .8rem; }

@media (max-width: 600px) {
  .welcome-card { padding: 36px 24px 28px; }
  .welcome-title { font-size: 1.6rem; }
  .welcome-tip { padding: 14px; }
}

/* ─── PROFILE ─── */
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; }
.profile-identity { display: flex; align-items: center; gap: 18px; }
.profile-avatar {
  width: 82px; height: 82px; flex: 0 0 82px; overflow: hidden; border-radius: 50%;
  display: grid; place-items: center; background: var(--burgundy); color: #fff;
  border: 3px solid var(--white); box-shadow: 0 0 0 1px var(--border), 0 5px 18px rgba(0,0,0,.08);
  font-family: var(--serif); font-size: 2rem;
}
.profile-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-email { margin-top: 4px; color: var(--text-light); font-size: .82rem; }
.profile-settings {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
  margin: -14px 0 38px;
}
.profile-setting-block {
  padding: 24px; background: var(--white); border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(45, 34, 30, .045);
}
.profile-setting-block h2 { margin-bottom: 6px; font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.profile-setting-block p { margin-bottom: 15px; color: var(--text-light); font-size: .82rem; line-height: 1.55; }
.profile-avatar-form { display: flex; align-items: center; gap: 10px; }
.profile-avatar-form .form-control { min-width: 0; padding: 6px; background: var(--bg); }
.profile-avatar-form input[type=file]::file-selector-button {
  margin-right: 10px; padding: 9px 13px; border: 0; background: var(--text); color: var(--bg);
  font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer;
}
.profile-avatar-form .btn { flex-shrink: 0; }
.profile-text-action { margin-top: 12px; padding: 0; border: 0; background: none; color: var(--burgundy); font: inherit; font-size: .78rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.profile-setting-block .google-linked {
  display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0;
  padding: 10px 13px; color: #166534; background: #ecfdf3;
  border: 1px solid #bbf7d0; font-weight: 600;
}
.empty-state { grid-column: 1/-1; text-align: center; padding: 64px 20px; }
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h2 { font-size: 1.3rem; margin-bottom: 10px; font-weight: 300; }
.empty-state p { color: var(--text-light); margin-bottom: 26px; }

/* ─── CHECKOUT ─── */
.checkout-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 48px; padding: 48px 0 72px; }
.checkout-includes { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.checkout-includes li { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.check-icon { color: var(--burgundy); font-size: 1rem; }
.checkout-box {
  background: var(--white); border: 1px solid var(--border);
  padding: 32px; height: fit-content; box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.checkout-row { background: var(--bg); padding: 16px; margin-bottom: 22px;
  display: flex; justify-content: space-between; align-items: center; }
.checkout-row span { font-size: .82rem; color: var(--text-light); }
.checkout-row strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.payment-status-wrap { min-height: calc(100vh - 180px); display: flex; align-items: center; justify-content: center; padding: 48px 0 72px; }
.payment-status-panel { width: min(100%, 560px); background: var(--white); border: 1px solid var(--border); padding: 40px; box-shadow: 0 2px 18px rgba(0,0,0,.05); }
.payment-status-panel h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 10px 0 12px; }
.payment-status-panel p { color: var(--text-light); line-height: 1.65; margin: 0 0 24px; }
.payment-status-panel::before { content: ""; display: block; width: 54px; height: 4px; margin-bottom: 22px; background: var(--burgundy); }
.payment-status-success::before { background: #15803D; }
.payment-status-error::before { background: #B91C1C; }
.payment-status-pending::before { background: #B7791F; }
.payment-status-animation { position: relative; height: 58px; margin: 2px 0 24px; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.payment-status-thread { position: absolute; left: 0; right: 0; top: 29px; height: 1px; background: linear-gradient(90deg, transparent, rgba(92,26,27,.18), rgba(183,121,31,.72), rgba(92,26,27,.18), transparent); }
.payment-status-needle { position: absolute; top: 16px; left: -64px; width: 64px; height: 26px; animation: paymentNeedle 3s ease-in-out infinite; }
.payment-status-needle::before { content: ""; position: absolute; left: 8px; top: 11px; width: 44px; height: 3px; background: var(--burgundy); box-shadow: 0 0 0 1px rgba(92,26,27,.05); }
.payment-status-needle::after { content: ""; position: absolute; right: 4px; top: 8px; width: 9px; height: 9px; border: 2px solid var(--burgundy); border-radius: 50%; background: var(--white); }
.payment-status-dot { position: absolute; top: 25px; width: 8px; height: 8px; border-radius: 50%; background: #B7791F; opacity: .25; animation: paymentPulse 1.5s ease-in-out infinite; }
.payment-status-dot-a { left: 36%; }
.payment-status-dot-b { left: 48%; animation-delay: .18s; }
.payment-status-dot-c { left: 60%; animation-delay: .36s; }
.payment-status-live { color: var(--muted); font-size: .78rem; margin: -10px 0 20px; text-align: center; }
.payment-status-course { display: grid; gap: 6px; padding: 16px; background: var(--bg); border: 1px solid var(--border); margin-bottom: 14px; }
.payment-status-course span { color: var(--text-light); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.payment-status-course strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.payment-status-meta { display: grid; gap: 6px; color: var(--muted); font-size: .78rem; margin-bottom: 24px; overflow-wrap: anywhere; }
.payment-status-test-form { margin: 0 0 14px; }
.payment-status-test-form p { font-size: .74rem; margin: 8px 0 0; color: var(--muted); text-align: center; }
.payment-status-test-btn { padding: 15px; font-size: .95rem; background: #8A5A12; border-color: #8A5A12; color: #fff; }
.payment-status-main-btn { padding: 17px; font-size: 1rem; }
.payment-status-secondary-btn { margin-top: 10px; padding: 13px; font-size: .82rem; }
.payment-status-action-disabled { opacity: .42; pointer-events: none; cursor: wait; filter: saturate(.35); }
@keyframes paymentNeedle {
  0% { left: -64px; opacity: .2; }
  12% { opacity: 1; }
  50% { left: calc(100% + 8px); opacity: 1; }
  88% { opacity: 1; }
  100% { left: -64px; opacity: .2; }
}
@keyframes paymentPulse {
  0%, 100% { transform: scale(.8); opacity: .22; }
  50% { transform: scale(1.2); opacity: .85; }
}
@media (prefers-reduced-motion: reduce) {
  .payment-status-needle,
  .payment-status-dot { animation: none; }
}

/* ─── ADMIN ─── */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); width: 100%; }
.curator-edit-layout { grid-template-columns: 1fr; }
.curator-edit-layout .admin-sidebar { display: none; }
.admin-lessons-panel { grid-template-columns: minmax(320px, 360px) minmax(0, 1fr); align-items: start; }
.admin-lessons-sidebar {
  display: grid;
  gap: 24px;
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding-right: 4px;
}
.admin-lessons-sidebar .admin-box { min-width: 0; }
.admin-sidebar {
  background: #1C1917; padding: 28px 0;
  border-right: 1px solid rgba(255,255,255,.06);
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
}
.admin-sidebar-brand { padding: 0 20px 24px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.admin-sidebar-brand span { font-family: var(--serif); color: #fff; font-size: 1.1rem; }
.admin-sidebar-brand small { display: block; color: rgba(255,255,255,.35); font-size: .65rem; margin-top: 2px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: rgba(255,255,255,.5);
  font-size: .82rem; font-weight: 500; transition: all .2s;
  border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-nav-item.active { color: #fff; border-left-color: var(--rose); background: rgba(176,94,78,.12); }
.admin-nav-label { padding: 16px 20px 6px; font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.2); }
.admin-main { padding: 36px 40px 64px; background: var(--bg); }
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-page-header h1 { font-size: 1.4rem; font-weight: 300; }
.admin-top { display: flex; align-items: flex-end; justify-content: space-between; padding: 44px 0 32px; }
.admin-panel { display: grid; grid-template-columns: 360px 1fr; gap: 24px; }
.admin-panel.is-full { grid-template-columns: 1fr; }
.admin-dashboard-stats { display:grid; grid-template-columns: repeat(5, 1fr); gap:20px; margin-bottom:28px; }
.admin-dashboard-grid { display:grid; grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.4fr); gap:20px; margin-bottom:28px; }
.admin-box {
  background: var(--white); border: 1px solid var(--border); padding: 28px;
}
.admin-box-wide { grid-column: 1 / -1; }
.admin-box h2 { font-size: .82rem; font-weight: 500; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--border); letter-spacing: .06em; text-transform: uppercase; }
.admin-form { display: flex; flex-direction: column; gap: 14px; }
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.table th { padding: 10px 14px; text-align: left; font-size: .6rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--border); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg); }
.table-actions { display: flex; gap: 8px; align-items: center; }
.user-row-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.user-row-buttons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.js-send-invite-form { display: inline; }
.js-send-invite-form .btn:disabled {
  opacity: .68;
  cursor: wait;
}
.invite-inline-status {
  min-height: 1em;
  font-size: .68rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: right;
  transition: color .18s ease, opacity .18s ease;
}
.invite-inline-status.is-success { color: #15803D; }
.invite-inline-status.is-error { color: #991B1B; }
.activity-list { display:grid; gap:10px; }
.activity-item { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; padding:12px; border:1px solid var(--border); color:var(--text); background:var(--bg); }
.activity-item:hover { border-color:var(--rose); background:#fff; }
.activity-item strong { display:block; font-size:.86rem; font-weight:600; margin-bottom:2px; }
.activity-item small { display:block; color:var(--muted); font-size:.75rem; line-height:1.35; }
.activity-item em { color:var(--muted); font-size:.72rem; font-style:normal; white-space:nowrap; }
.activity-dot { width:8px; height:8px; border-radius:50%; background:#16A34A; box-shadow:0 0 0 5px rgba(22,163,74,.12); }
.activity-card-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap:14px; }
.activity-card { border:1px solid var(--border); background:var(--bg); padding:16px; display:grid; gap:12px; }
.activity-card-head { display:flex; gap:12px; align-items:flex-start; }
.activity-card-head strong { display:block; font-size:.92rem; margin-bottom:3px; }
.activity-card-head small { display:block; color:var(--muted); font-size:.74rem; line-height:1.35; }
.activity-card-line { display:grid; grid-template-columns:72px minmax(0, 1fr); gap:10px; align-items:start; font-size:.82rem; }
.activity-card-line span,
.activity-courses > span { color:var(--muted); font-size:.64rem; text-transform:uppercase; letter-spacing:.08em; font-weight:700; }
.activity-card-line code { font-size:.72rem; color:var(--text-light); white-space:normal; overflow-wrap:anywhere; }
.activity-card-line a,
.activity-card-line strong { color:var(--text); font-weight:600; line-height:1.35; }
.activity-courses { display:grid; gap:8px; }
.activity-course-row { background:#fff; border:1px solid var(--border); padding:9px 10px; }
.activity-course-row strong { display:block; font-size:.8rem; margin-bottom:2px; }
.activity-course-row small,
.activity-courses em { color:var(--muted); font-size:.72rem; font-style:normal; }
.notification-targets { display:flex; gap:10px; flex-wrap:wrap; }
.notification-targets label { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--border); background:#fff; cursor:pointer; font-size:.86rem; }
.notification-targets input { accent-color:var(--burgundy); }
.status-pill { display: inline-block; padding: 3px 11px; font-size: .65rem; font-weight: 600; }
.status-published { background: #ECFDF5; color: #15803D; }
.status-draft     { background: #F3F4F6; color: #6B7280; }
.empty-row td { text-align: center; padding: 36px; color: var(--muted); font-size: .85rem; }

.tier-visibility-table { font-size: .82rem; }
.tier-visibility-table th,
.tier-visibility-table td { padding: 8px 12px; vertical-align: middle; }
.tier-visibility-table thead th { position: sticky; top: 0; background: var(--white); z-index: 1; }
.tier-module-row td { background: #FAFAF9; border-top: 2px solid var(--border); padding-top: 12px; padding-bottom: 6px; }
.tier-visibility-table-wrap { max-height: 70vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r); }

.sortable-ghost { opacity: 0.4; background: var(--rose) !important; }
.sortable-drag { background: var(--white) !important; box-shadow: 0 4px 20px rgba(0,0,0,.12); }

@media (max-width: 1280px) {
  .admin-dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { padding: 24px 20px; }
  .admin-panel { grid-template-columns: 1fr; }
  .admin-dashboard-stats,
  .admin-dashboard-grid { grid-template-columns: 1fr; }
}

/* ─── FLASH MESSAGES ─── */
.flash { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; }
.flash-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: .82rem; }
.flash-item.success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.flash-item.error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ─── FOOTER ─── */
.site-footer { background: var(--text); color: rgba(255,255,255,.55); padding: 56px 0 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-brand-name { font-family: var(--serif); color: #fff; font-size: 1.4rem; margin-bottom: 10px; font-weight: 400; letter-spacing: .06em; }
.footer-brand-text { font-size: .95rem; line-height: 1.75; max-width: 280px; font-weight: 300; }
.footer-col h4 { color: rgba(255,255,255,.7); font-size: .85rem; text-transform: uppercase; letter-spacing: .18em; margin-bottom: 16px; font-weight: 500; }
.footer-col a { display: block; font-size: .95rem; padding: 4px 0; transition: color .2s; }
.footer-col a:hover { color: var(--rose); }
.footer-col .footer-account-link { display: flex; align-items: center; gap: 9px; width: fit-content; }
.site-avatar-footer { width: 28px; height: 28px; font-size: .72rem; border: 1px solid rgba(255,255,255,.35); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; font-size: .85rem; }

/* ─── LEGAL PAGES ─── */
.legal-page { padding: 48px 0 72px; max-width: 920px; }
.legal-page h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 300; margin: 8px 0 12px; }
.legal-intro { color: var(--text-light); line-height: 1.7; margin-bottom: 24px; }
.legal-card { background: var(--white); border: 1px solid var(--border); padding: 32px; display: grid; gap: 16px; }
.legal-card h2 { color: var(--burgundy); font-size: 1rem; margin-top: 10px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { color: var(--text-light); font-size: .92rem; line-height: 1.75; white-space: pre-line; }
.legal-consent { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 4px; color: var(--text-light); font-size: .78rem; line-height: 1.45; }
.legal-consent input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--burgundy); }
.legal-consent a { color: var(--burgundy); font-weight: 600; }

/* ─── HELPERS ─── */
.divider { height: 1px; background: var(--border); margin: 40px 0; }
.text-muted   { color: var(--muted); }
.text-rose    { color: var(--rose); }
.text-center  { text-align: center; }
.text-serif   { font-family: var(--serif); }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ─── CTA BANNER ─── */
.cta-banner { background: var(--text); padding: 80px 0; }
.cta-banner h2 { font-family: var(--serif); color: #fff; font-size: clamp(1.6rem,3vw,2.4rem); margin-bottom: 14px; font-weight: 300; }
.cta-banner p { color: rgba(255,255,255,.5); max-width: 480px; margin: 0 auto 30px; font-size: .9rem; font-weight: 300; }

/* ─── GALLERY SECTION ─── */
.gallery-section { background: var(--bg-warm); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 150px;
  gap: 12px;
}
.gallery-grid.size-s { grid-auto-rows: 120px; }
.gallery-grid.size-m { grid-auto-rows: 150px; }
.gallery-grid.size-l { grid-auto-rows: 190px; }
.gallery-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(92, 26, 27, 0.1);
}
.gallery-img {
  width: 100%; height: 100%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-color: var(--border);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-card:hover .gallery-img { transform: scale(1.05); }
.gallery-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 20px 18px;
  background: linear-gradient(to top, rgba(26,26,26,.85) 0%, transparent 100%);
  color: #fff;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.gallery-card:hover .gallery-info {
  transform: translateY(0);
  opacity: 1;
}
.gallery-num {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.5;
  display: block;
  margin-bottom: 4px;
}
.gallery-info h4 {
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.gallery-info p {
  font-size: .7rem;
  opacity: 0.7;
  line-height: 1.5;
}

/* ─── REVIEWS SECTION ─── */
.reviews-section { background: var(--bg); }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 36px 28px 28px;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}
.review-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.06);
}
.review-quote {
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 1;
  color: rgba(92, 26, 27, 0.1);
  position: absolute;
  top: 12px; left: 24px;
}
.review-text {
  font-size: .85rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 24px;
  font-style: italic;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.review-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border);
}
.review-btn {
  display: inline-block; margin-top: 16px;
  font-size: .75rem;
}
.author-info strong {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.author-info span {
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ─── BLOG ARTICLE ─── */
.blog-article { max-width: 780px; margin: 0 auto; padding: 56px 0 80px; }
.blog-article .back-link { margin-bottom: 16px; }
.blog-article-header { margin: 14px 0 32px; }
.blog-article-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1;
  margin: 12px 0 18px;
}
.blog-article-excerpt {
  font-size: 1rem; color: var(--text-light); line-height: 1.75;
  font-style: italic; max-width: 640px;
}
.blog-article-cover {
  width: 100%; aspect-ratio: 16/9;
  background-size: cover; background-position: center;
  margin: 28px 0 36px;
  border: 1px solid var(--border);
}
.blog-article-body p {
  font-size: 1rem; color: var(--text); line-height: 1.85; margin-bottom: 22px;
}

/* ─── COURSE CARD FILTER TRANSITION ─── */
.course-card {
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1020px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid  { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 130px; }
  .gallery-grid.size-s { grid-auto-rows: 110px; }
  .gallery-grid.size-l { grid-auto-rows: 170px; }
  .reviews-grid  { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-img-wrap { min-height: 300px; }
  .about-deco { display: none; }
  .nav { position: static; transform: none; display: none; }
  .course-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .value-grid { grid-template-columns:1fr; }
  .value-card { min-height:0; }
  .payment-trust { grid-template-columns:1fr; }
}
@media (max-width: 960px) {
  .container { padding: 0 24px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .course-detail-wrap { grid-template-columns: 1fr; }
  .course-hero-grid { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  .checkout-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-layout-classic { grid-template-columns: 1fr; }
  .lesson-layout-classic .lesson-main,
  .lesson-layout-classic .lesson-sidebar { grid-column: auto; grid-row: auto; }
  .lesson-sidebar { position: static; max-height: 280px; }
  .lesson-interface-toolbar { justify-content: flex-start; margin-bottom: 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .courses-grid  { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; }
  .gallery-grid  { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-grid.size-s { grid-auto-rows: 130px; }
  .gallery-grid.size-l { grid-auto-rows: 190px; }
  .reviews-grid  { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .auth-card { padding: 32px 22px; }
  .admin-form-row { grid-template-columns: 1fr; }
  .profile-top { flex-direction: column; align-items: flex-start; gap: 16px; }
  .profile-settings { grid-template-columns: 1fr; margin-top: 0; }
  .profile-avatar-form { align-items: stretch; flex-direction: column; }
  .course-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .course-gallery-item img { width: 100%; height: 100%; }
}

/* ─── MODAL BASE ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--white); border: 1px solid var(--border);
  padding: 40px 36px; width: 100%; max-width: 460px;
  position: relative; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.18);
  animation: modal-in .22s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 1.4rem;
  cursor: pointer; color: var(--muted); padding: 4px 8px;
  line-height: 1; transition: color .15s;
}
.modal-close:hover { color: var(--text); }

/* ─── BUG REPORT BUTTON ─── */
.bug-report-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; cursor: pointer;
  background: none; border: 1px solid var(--border);
  color: var(--text-light); transition: all .2s; font-family: inherit;
}
.bug-report-btn:hover {
  border-color: var(--rose); color: var(--rose);
  background: rgba(220,38,127,.04);
}
.bug-report-floating {
  position: fixed; right: 18px; bottom: 18px; z-index: 950;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--rose); border-radius: 999px;
  background: var(--white); color: var(--rose); box-shadow: 0 8px 24px rgba(0,0,0,.14);
  font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.bug-report-floating:hover { transform: translateY(-2px); background: var(--bg-warm); box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.bug-report-floating span { font-size: 1rem; line-height: 1; }

/* ─── BUG MODAL ─── */
.bug-modal-card { max-width: 500px; }
.bug-modal-kicker {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 8px;
}
.bug-modal-title {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 300;
  margin-bottom: 8px; line-height: 1.25;
}
.bug-modal-subtitle { font-size: .85rem; color: var(--text-light); margin-bottom: 20px; }
.bug-back-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: .75rem; color: var(--text-light); margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 4px; font-family: inherit;
  letter-spacing: .06em; text-transform: uppercase;
}
.bug-back-btn:hover { color: var(--text); }
.bug-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bug-type-card {
  border: 1.5px solid var(--border); padding: 20px 16px;
  cursor: pointer; transition: all .18s; display: block;
  text-align: center; background: var(--bg);
}
.bug-type-card input[type="radio"] { display: none; }
.bug-type-card:hover { border-color: var(--rose); background: rgba(220,38,127,.03); }
.bug-type-card.selected {
  border-color: var(--rose); background: rgba(220,38,127,.06);
}
.bug-type-icon { margin-bottom: 10px; color: var(--text-light); }
.bug-type-card.selected .bug-type-icon { color: var(--rose); }
.bug-type-label { font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.bug-type-desc { font-size: .72rem; color: var(--muted); line-height: 1.5; }
.bug-form-group { margin-bottom: 18px; }
.bug-form-label { display: block; font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text); margin-bottom: 6px; }
.bug-form-textarea {
  width: 100%; border: 1px solid var(--border); padding: 12px 14px;
  font-family: inherit; font-size: .85rem; color: var(--text);
  background: var(--bg); resize: vertical; outline: none;
  transition: border-color .18s;
}
.bug-form-textarea:focus { border-color: var(--burgundy); }
.bug-photo-upload {
  border: 1.5px dashed var(--border); padding: 24px;
  cursor: pointer; transition: border-color .18s; text-align: center;
  background: var(--bg);
}
.bug-photo-upload:hover, .bug-photo-upload.drag-over {
  border-color: var(--rose); background: rgba(220,38,127,.03);
}
.bug-photo-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted); font-size: .78rem;
}
.bug-reward-notice {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-warm); border: 1px solid var(--border);
  padding: 14px 16px; font-size: .8rem; color: var(--text-light); line-height: 1.55;
}
.bug-reward-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }

/* ─── REWARD MODAL ─── */
.reward-modal-card { max-width: 520px; }
.reward-theme-preview {
  border: 1px solid var(--border); padding: 20px;
  background: linear-gradient(135deg, #0f0f11 0%, #1e0d20 100%);
  color: #e8e3f0; text-align: center; margin-bottom: 4px;
}
.reward-theme-icon { font-size: 2rem; margin-bottom: 8px; }
.reward-theme-name {
  font-size: .85rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #e040a0; margin-bottom: 6px;
}
.reward-theme-desc { font-size: .8rem; color: #a09ab5; line-height: 1.5; }
.reward-swatch {
  width: 48px; height: 48px; margin: 0 auto 12px; border: 2px solid rgba(255,255,255,.2);
  border-radius: 50%; box-shadow: 0 0 16px rgba(0,0,0,.2);
}

/* ─── THEME SWITCHER ─── */
.theme-switcher {
  position: relative; display: inline-block; margin-right: 6px;
}
.theme-switcher-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; background: none; border: 1px solid var(--border);
  cursor: pointer; color: var(--text-light); transition: all .2s;
  font-family: inherit;
}
.theme-switcher-btn:hover { border-color: var(--burgundy); color: var(--burgundy); }
.theme-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border: 1px solid var(--border);
  min-width: 170px; z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  animation: modal-in .15s ease;
}
.theme-dropdown.open { display: block; }
.theme-dropdown-title {
  font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding: 10px 14px 6px; border-bottom: 1px solid var(--border);
}
.theme-option {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 14px; background: none; border: none;
  cursor: pointer; font-family: inherit; font-size: .8rem;
  color: var(--text-light); transition: background .15s;
  text-align: left;
}
.theme-option:hover { background: var(--bg-warm); color: var(--text); }
.theme-option.active { color: var(--burgundy); font-weight: 500; }
.theme-option.active::after {
  content: '✓'; color: var(--burgundy); font-size: .85rem; font-weight: 700; margin-left: auto;
}
.theme-swatch {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.12); display: inline-block;
}
.theme-option-label { flex: 1; }
/* ─── BUG FAB ─── */
.bug-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 150;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--border);
  cursor: pointer; color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  transition: all .2s; font-family: inherit;
}
.bug-fab:hover {
  border-color: var(--rose); color: var(--rose);
  box-shadow: 0 6px 24px rgba(0,0,0,.15); transform: translateY(-2px);
}
@media (max-width: 768px) { .bug-fab { bottom: 16px; right: 16px; width: 42px; height: 42px; } }

.theme-hint {
  font-size: .68rem; color: var(--muted); padding: 8px 14px 10px;
  border-top: 1px solid var(--border); line-height: 1.5;
}

/* ─── NOTIFICATION BELL ─── */
.notif-bell { position: relative; }
.notif-bell-btn {
  position: relative; background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--text); transition: color .2s;
  display: flex; align-items: center; justify-content: center;
  transform-origin: top center;
}
.notif-bell-btn:hover { color: var(--burgundy); }
.notif-bell.has-unread .notif-bell-btn {
  color: var(--burgundy);
  animation: notif-bell-ring 1.25s ease-in-out infinite;
}
.notif-bell.has-unread .notif-bell-btn::after {
  content: '';
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(176,94,78,.42);
  border-radius: 50%;
  animation: notif-bell-pulse 1.25s ease-out infinite;
}
.notif-badge {
  position: absolute; top: 0; right: 0;
  background: var(--rose); color: #fff;
  font-size: .6rem; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
}
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; max-width: calc(100vw - 32px);
  background: var(--white); border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
  z-index: 1000; display: none; max-height: 420px;
  flex-direction: column;
}
.notif-dropdown.open { display: flex; }
.notif-dropdown-header {
  padding: 14px 18px; font-size: .72rem; font-weight: 600;
  color: var(--burgundy); letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.notif-dropdown-list { overflow-y: auto; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; }
.notif-empty {
  padding: 32px 18px; text-align: center;
  color: var(--muted); font-size: .85rem;
}
.notif-item {
  display: block; padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background .15s; text-decoration: none;
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: rgba(176,94,78,.04); }
.notif-item a { text-decoration: none; color: inherit; }
.notif-item-title { font-size: .85rem; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.notif-item-body { font-size: .78rem; color: var(--text-light); line-height: 1.5; }
.notif-item-time { font-size: .68rem; color: var(--muted); margin-top: 5px; }
.notif-item.unread .notif-item-title::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  background: var(--rose); border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
@keyframes notif-bell-ring {
  0%, 100% { transform: rotate(0deg) scale(1); }
  8% { transform: rotate(0deg) scale(1.24); }
  18% { transform: rotate(13deg) scale(1.18); }
  30% { transform: rotate(-11deg) scale(1.18); }
  42% { transform: rotate(8deg) scale(1.12); }
  54% { transform: rotate(-5deg) scale(1.08); }
  68% { transform: rotate(0deg) scale(1); }
}
@keyframes notif-bell-pulse {
  0% { opacity: .65; transform: scale(.72); }
  70% { opacity: 0; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(1.5); }
}

@media (max-width: 600px) {
  .notif-dropdown { width: 300px; right: -40px; }
}

/* ─── IMPORTANT FULLSCREEN NOTICE ─── */
body.important-notice-open { overflow: hidden; }
.important-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(176, 94, 78, .28), transparent 28%),
    radial-gradient(circle at 84% 78%, rgba(92, 26, 27, .24), transparent 30%),
    linear-gradient(135deg, rgba(26, 26, 26, .94), rgba(92, 26, 27, .9));
  opacity: 0;
  transition: opacity .36s ease;
}
.important-notice-overlay[hidden] { display: none; }
.important-notice-overlay.show { opacity: 1; }
.important-notice-weave {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: rotate(-8deg) scale(1.1);
  animation: important-weave 12s linear infinite;
}
.important-notice-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(82vh, 720px);
  overflow-y: auto;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 34px 100px rgba(0,0,0,.34);
  padding: clamp(28px, 5vw, 56px);
  transform: translateY(22px) scale(.96);
  opacity: 0;
  transition: transform .46s cubic-bezier(.18,.82,.22,1), opacity .36s ease;
}
.important-notice-overlay.show .important-notice-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.important-notice-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--burgundy), var(--rose), #d8b68f, var(--burgundy));
  background-size: 220% 100%;
  animation: important-shine 3.8s ease-in-out infinite;
}
.important-notice-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.important-notice-close:hover {
  color: var(--burgundy);
  border-color: var(--rose);
}
.important-notice-kicker {
  margin-bottom: 14px;
  color: var(--rose);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.important-notice-title {
  margin: 0 34px 18px 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4.3rem);
  font-weight: 300;
  line-height: .98;
}
.important-notice-body {
  margin: 0;
  color: var(--text-light);
  font-size: clamp(.98rem, 1.7vw, 1.14rem);
  line-height: 1.8;
  white-space: pre-line;
}
.important-notice-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.important-notice-actions .btn {
  min-width: 150px;
  justify-content: center;
}
@keyframes important-weave {
  0% { transform: rotate(-8deg) translate3d(0,0,0) scale(1.1); }
  100% { transform: rotate(-8deg) translate3d(46px,46px,0) scale(1.1); }
}
@keyframes important-shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (max-width: 600px) {
  .important-notice-overlay { padding: 14px; align-items: stretch; }
  .important-notice-panel { max-height: none; padding: 34px 22px 24px; }
  .important-notice-actions { flex-direction: column; }
  .important-notice-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .notif-bell.has-unread .notif-bell-btn,
  .notif-bell.has-unread .notif-bell-btn::after,
  .important-notice-weave,
  .important-notice-panel::before {
    animation: none;
  }
  .notif-bell.has-unread .notif-bell-btn::after { display: none; }
}

/* ─── COURSE PROGRESS BAR ─── */
.course-progress-box {
  margin-bottom: 16px; padding: 14px 16px;
  background: var(--bg); border-radius: 6px; border: 1px solid var(--border);
}
.course-progress-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.course-progress-label {
  font-size: .72rem; font-weight: 600; color: var(--burgundy);
  letter-spacing: .1em; text-transform: uppercase;
}
.course-progress-count { font-size: .78rem; color: var(--text-light); font-weight: 500; }
.course-progress-bar {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.course-progress-fill {
  height: 100%; background: var(--burgundy); border-radius: 3px;
  transition: width .4s ease;
}
.course-progress-done {
  display: block; margin-top: 8px; font-size: .78rem;
  color: #22c55e; font-weight: 500;
}

img.lazy-load {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

img.lazy-load.loaded {
  opacity: 1;
}

.progressive-image,
.progressive-bg {
  filter: blur(10px);
  transform: scale(1.035);
  transition: filter .65s ease, transform .65s ease, opacity .45s ease;
}
.progressive-image.is-high-quality,
.progressive-bg.is-high-quality {
  filter: blur(0);
  transform: scale(1);
}
.course-card:hover .progressive-bg.is-high-quality {
  transform: scale(1.04);
}

/* English course availability and lesson voiceover */
.translation-switch {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.translation-switch span { display: grid; gap: 3px; }
.translation-switch small,
.admin-help { display: block; color: var(--muted); font-size: .73rem; line-height: 1.45; margin-top: 4px; }
.translation-status {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eee8e3;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: middle;
}
.translation-status.is-ready { background: #dcfce7; color: #166534; }
.translation-unavailable {
  align-self: flex-start;
  margin: 0 0 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff4e5;
  color: #8a4b08;
  font-size: .68rem;
  font-weight: 600;
}
.translation-notice {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-left: 3px solid #d99a45;
  background: #fff8ed;
  color: #75410a;
  font-size: .78rem;
  line-height: 1.5;
}
.checkout-currency-note { margin: -2px 0 12px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.admin-audio-current { display: grid; gap: 8px; margin-top: 10px; }
.admin-audio-current audio { width: 100%; }
.voiceover-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(92, 26, 27, .18);
  border-radius: 10px;
  background: #fbf7f3;
}
.voiceover-bar div { display: grid; gap: 2px; }
.voiceover-bar strong { color: var(--burgundy); font-size: .82rem; }
.voiceover-bar span { color: var(--muted); font-size: .72rem; line-height: 1.4; }
@media (max-width: 640px) {
  .voiceover-bar { align-items: stretch; flex-direction: column; }
  .voiceover-bar .btn { width: 100%; }
}
.media-loading {
  position: relative;
  overflow: hidden;
  background: #eee8e2;
}
.media-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.58) 48%, transparent 66%);
  transform: translateX(-110%);
  animation: image-loading-shimmer 1.25s ease-in-out infinite;
  transition: opacity .35s ease;
}
@keyframes image-loading-shimmer {
  to { transform: translateX(110%); }
}

.course-card-img-bg,
.lesson-gallery-item img,
.course-gallery-item img,
.course-hero-image img {
  transition: opacity 0.3s ease-in;
}

/* ═══ MOBILE WARNING ═══ */
.mobile-warning {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.mobile-warning.show {
  display: flex;
}

.mobile-warning-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-warning-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.mobile-warning-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--burgundy);
}

.mobile-warning-card p {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ═══ MOBILE IMPROVEMENTS ═══ */
@media (max-width: 960px) {
  .header-inner {
    justify-items: center;
    gap: 12px;
    padding: 16px 0;
    height: auto;
  }
  .brand { order: 1; }
  .hamburger-btn { order: 0; }
}

@media (max-width: 768px) {
  /* Header improvements */
  .site-header {
    padding: 10px 0;
  }

  .header-inner {
    padding: 0 16px;
  }

  .brand-name {
    font-size: 1.3rem;
  }

  .brand-tagline {
    font-size: 0.5rem;
  }

  .btn-login {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  /* Hero improvements */
  .hero-content {
    padding: 80px 20px 60px;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Course page improvements */
  .course-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .course-info {
    padding: 20px;
  }

  .course-title {
    font-size: 2rem;
  }

  .course-desc {
    font-size: 0.95rem;
  }

  /* Tier list improvements */
  .course-tier-list {
    max-height: none;
    padding: 16px;
  }

  .tier-row {
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tier-name {
    font-size: 0.95rem;
  }

  .tier-price {
    font-size: 1.1rem;
  }

  .tier-features {
    font-size: 0.8rem;
    padding-left: 0;
    width: 100%;
  }

  /* Button improvements */
  .btn-full {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
  }

  /* Course cards improvements */
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }

  .course-card-img {
    height: 200px;
  }

  .course-card-body {
    padding: 16px;
  }

  .course-card-title {
    font-size: 1.3rem;
  }

  .course-card-desc {
    font-size: 0.9rem;
  }

  /* Checkout page improvements */
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .checkout-main,
  .checkout-sidebar {
    padding: 20px;
  }

  .tier-option {
    padding: 16px;
  }

  .tier-option-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tier-price {
    font-size: 1.3rem;
  }

  /* Form improvements */
  .form-group label {
    font-size: 0.9rem;
  }

  .form-control {
    font-size: 1rem;
    padding: 12px;
  }

  /* Lesson page improvements */
  .lesson-video-container {
    height: auto;
    aspect-ratio: 16/9;
  }

  .lesson-content {
    padding: 20px 16px;
  }

  .lesson-title {
    font-size: 1.8rem;
  }

  .lesson-image-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Profile improvements */
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .profile-sidebar {
    order: -1;
  }

  /* Footer improvements */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Modal improvements */
  .modal-card {
    max-width: 95%;
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Flash messages */
  .flash {
    margin: 16px;
  }

  .flash-item {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  /* Sidebar mobile */
  .sidebar {
    width: 100%;
    max-width: 100vw;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.1rem;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .course-title {
    font-size: 1.6rem;
  }
  
  .course-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .course-gallery-item img {
    width: 100%;
    height: 100%;
  }
  .hero-fashion-atmosphere { background-position: 42% center; opacity: .42; }
}

/* Mobile polish: preserve the STADNIK identity while improving touch use. */
.mobile-app-nav {
  display: none;
}

.landscape-app-nav-trigger {
  display: none;
}

.course-hero-placeholder {
  min-height: 400px;
}

@media (max-width: 768px),
       (orientation: landscape) and (hover: none) and (pointer: coarse) {
  html {
    height: auto;
    min-height: 100%;
    scroll-padding-top: 66px;
    overflow-y: auto;
    background: var(--bg);
  }

  body {
    height: auto;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: visible;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-tap-highlight-color: rgba(92, 26, 27, .1);
  }

  main {
    animation: none;
  }

  body.page-fade-out {
    opacity: 1;
    transform: none;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 950;
    padding: 0;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 5px 18px rgba(26, 26, 26, .045);
  }

  .header-inner {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 4px;
    height: 58px;
    min-height: 58px;
    padding: 0 10px;
  }

  .hamburger-btn {
    order: 0;
    width: 42px;
    height: 42px;
    color: var(--text);
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .brand {
    order: 1;
    justify-self: center;
    min-width: 0;
  }

  .brand-logo-container {
    justify-content: center;
    gap: 9px;
  }

  .brand-name {
    font-family: var(--serif);
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: .1em;
  }

  .brand-divider {
    height: 25px;
  }

  .brand-tagline {
    max-width: 116px;
    white-space: normal;
    font-size: .42rem;
    line-height: 1.25;
    letter-spacing: .11em;
  }

  .sidebar-overlay {
    z-index: 900;
    background: rgba(26, 26, 26, .48);
    backdrop-filter: blur(3px);
  }

  .sidebar {
    inset: 0 0 0 auto;
    z-index: 910;
    width: min(88vw, 360px);
    max-width: 88vw;
    height: 100dvh;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: var(--white);
    transform: translateX(100%);
    box-shadow: -16px 0 45px rgba(26, 26, 26, .14);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header {
    padding: calc(16px + env(safe-area-inset-top)) 18px 14px;
  }

  .sidebar-title {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 400;
  }

  .sidebar-nav {
    padding: 10px 0;
  }

  .sidebar-link {
    margin: 0;
    padding: 13px 20px;
    border-radius: 0;
    font-size: .92rem;
    font-weight: 500;
    letter-spacing: .025em;
  }

  .sidebar-actions {
    padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
  }

  .sidebar-actions .notif-bell,
  .sidebar-actions .theme-switcher {
    width: 100%;
  }

  .sidebar-actions .notif-dropdown,
  .sidebar-actions .theme-dropdown {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 8px;
    box-shadow: 0 8px 24px rgba(26, 26, 26, .08);
  }

  .sidebar-actions .notif-bell-btn,
  .sidebar-actions .theme-switcher-btn {
    width: 42px;
    height: 42px;
  }

  .beta-notice-inner {
    align-items: flex-start;
    gap: 8px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: .68rem;
    line-height: 1.35;
  }

  .beta-notice strong {
    padding-top: 1px;
    font-size: .61rem;
  }

  .mobile-app-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 850;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 0;
    background: color-mix(in srgb, var(--white) 74%, transparent);
    box-shadow: 0 -8px 26px rgba(26, 26, 26, .1), inset 0 1px 0 rgba(255, 255, 255, .86);
    backdrop-filter: blur(22px) saturate(155%);
    -webkit-backdrop-filter: blur(22px) saturate(155%);
  }

  .bug-report-floating {
    right: 14px;
    bottom: calc(74px + env(safe-area-inset-bottom));
  }

  /* A filtered ancestor traps a fixed notification sheet inside the dock. */
  .mobile-app-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .mobile-app-nav-item {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 3px 2px;
    border-radius: 7px;
    color: var(--muted);
    font-size: .62rem;
    font-weight: 600;
    line-height: 1;
  }

  .mobile-app-nav-item::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 30%;
    right: 30%;
    height: 2px;
    background: transparent;
  }

  .mobile-app-nav-item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-app-nav-item.active {
    background: rgba(255, 255, 255, .58);
    color: var(--burgundy);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
  }

  .mobile-app-nav-item.active::before {
    background: var(--burgundy);
  }

  .mobile-app-nav-item:active {
    background: rgba(237, 232, 227, .82);
    transform: scale(.96);
  }

  .mobile-app-notifications {
    position: relative;
    min-width: 0;
  }

  .mobile-app-notifications .notif-bell-btn {
    width: 100%;
    min-height: 52px;
    padding: 3px 2px;
    border-radius: 7px;
    color: var(--muted);
    font-family: inherit;
  }

  .mobile-app-notifications .notif-bell-btn svg {
    width: 20px;
    height: 20px;
  }

  .mobile-app-notifications .notif-badge {
    top: 3px;
    right: calc(50% - 15px);
    z-index: 1;
  }

  .mobile-notification-sheet {
    position: fixed;
    z-index: 1300;
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: none;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(26, 26, 26, .18);
  }

  .mobile-notification-sheet.open {
    display: flex;
    animation: mobile-sheet-enter .24s cubic-bezier(.22, .8, .24, 1) both;
  }

  .mobile-notification-sheet .notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-right: 12px;
  }

  .mobile-notification-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--burgundy);
    background: rgba(92, 26, 27, .08);
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
  }

  .mobile-notification-close:active {
    transform: scale(.96);
    background: rgba(92, 26, 27, .14);
  }

  body.mobile-notifications-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.mobile-notifications-open .mobile-app-nav,
  body.mobile-notifications-open .landscape-app-nav-trigger {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-navigation-pending .mobile-app-nav {
    filter: saturate(1.12);
  }

  .mobile-navigation-pending .mobile-app-nav-item.is-pending {
    background: rgba(255, 255, 255, .72);
    color: var(--burgundy);
    transform: scale(.96);
  }

  .hero-bg-slide {
    background-image: var(--hero-image-mobile);
  }

  .mobile-warning,
  .slow-loader-quote {
    display: none !important;
  }

  .btn,
  .btn-full,
  .btn-sm,
  .btn-login,
  .filter-btn,
  .tab-link,
  .form-control {
    border-radius: 6px;
  }

  .btn,
  .btn-full,
  .btn-sm {
    min-height: 46px;
    justify-content: center;
    padding: 13px 16px;
    white-space: normal;
    text-align: center;
    font-size: .78rem;
    line-height: 1.2;
  }

  .btn-primary {
    background: var(--burgundy);
    border-color: var(--burgundy);
    box-shadow: 0 7px 20px rgba(92, 26, 27, .14);
  }

  .btn:hover,
  .course-card:hover,
  .category-card:hover,
  .gallery-card:hover {
    transform: none;
  }

  .section {
    padding: 42px 0;
  }

  .section-header,
  .category-header {
    margin-bottom: 22px;
    text-align: left;
  }

  .section-label {
    margin-bottom: 8px;
    font-size: .64rem;
    letter-spacing: .16em;
  }

  .section-title,
  .category-header .section-title {
    margin-bottom: 10px;
    font-family: var(--serif);
    font-size: 1.95rem;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: .01em;
  }

  .section-sub,
  .about-text,
  .course-card p,
  .feature-card p,
  .value-card p,
  .category-card-body p {
    color: var(--text-light);
    font-size: .9rem;
    line-height: 1.6;
  }

  .hero {
    min-height: calc(100svh - 92px);
  }

  .hero-content {
    min-height: calc(100svh - 92px);
    align-items: flex-start;
    justify-content: flex-end;
    padding: clamp(190px, 32svh, 280px) 16px calc(100px + env(safe-area-inset-bottom));
    text-align: left;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(245, 240, 236, .04) 12%, rgba(245, 240, 236, .28) 46%, rgba(245, 240, 236, .96) 100%),
      linear-gradient(90deg, rgba(245, 240, 236, .3), transparent 70%);
  }

  .hero-fashion-atmosphere {
    opacity: .34;
    background-position: 46% center;
  }

  .hero-text h1 {
    max-width: 100%;
    margin-bottom: 13px;
    font-family: var(--serif);
    font-size: clamp(2.65rem, 13vw, 3.5rem);
    font-weight: 500;
    line-height: .88;
    letter-spacing: .01em;
  }

  .hero-text h1 em {
    margin-top: 6px;
    color: var(--rose);
    font-family: var(--serif);
    font-weight: 300;
    line-height: .95;
  }

  .hero-desc {
    max-width: 34rem;
    margin-bottom: 17px;
    color: var(--text-light);
    font-size: .93rem;
    line-height: 1.55;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .value-grid,
  .category-grid,
  .features-grid,
  .reviews-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 12px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .value-card,
  .category-card,
  .feature-card,
  .review-card {
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(26, 26, 26, .035);
  }

  .value-card,
  .feature-card,
  .review-card {
    padding: 22px 20px;
  }

  .value-card-num {
    margin-bottom: 13px;
  }

  .value-card h3,
  .feature-card h3,
  .category-card-body h3,
  .review-card h3 {
    font-family: var(--serif);
    font-size: 1.38rem;
    font-weight: 400;
  }

  .fit-check {
    justify-content: flex-start;
    gap: 7px;
    margin-top: 18px;
  }

  .fit-check span,
  .payment-chip {
    padding: 8px 11px;
    background: var(--white);
    color: var(--text-light);
    font-size: .72rem;
  }

  .category-header {
    display: block;
  }

  .category-card-img {
    height: 210px;
  }

  .category-card-body {
    min-height: 0;
    padding: 18px;
  }

  .about-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .about-img-wrap {
    min-height: 310px;
    width: 100%;
  }

  .about-content {
    padding: 24px 16px 0;
  }

  .about-deco {
    display: none;
  }

  .gallery-grid,
  .gallery-grid.size-s,
  .gallery-grid.size-m,
  .gallery-grid.size-l {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    grid-auto-rows: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .gallery-card {
    grid-column: auto !important;
    grid-row: auto !important;
    min-width: 0;
    height: 210px;
    border-radius: 8px;
  }

  .gallery-info {
    padding: 12px;
  }

  .cta-banner {
    margin: 0;
    padding: 30px 18px;
    border-radius: 0;
  }

  .cta-banner h2 {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 400;
  }

  .page-hero {
    margin-bottom: 18px;
    padding: 28px 0 18px;
  }

  .page-hero h1,
  .profile-top h1 {
    font-family: var(--serif);
    font-size: 2.15rem;
    font-weight: 400;
    line-height: 1.05;
  }

  .page-hero p {
    font-size: .9rem;
    line-height: 1.5;
  }

  .category-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin: 0 -16px 20px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .category-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 14px;
    font-size: .66rem;
  }

  .courses-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 14px;
    padding: 0;
  }

  .course-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: 164px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(26, 26, 26, .04);
  }

  .course-card-img {
    height: 100%;
    min-height: 164px;
    aspect-ratio: auto;
  }

  .course-badge {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 4px 7px;
    font-size: .51rem;
    line-height: 1.25;
  }

  .course-card-body {
    min-width: 0;
    padding: 14px;
  }

  .course-card-body h3,
  .course-card-title {
    margin-bottom: 6px;
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .course-card-body p {
    display: -webkit-box;
    margin-bottom: 9px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .78rem;
    line-height: 1.42;
  }

  .course-card-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .course-card-footer .btn {
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    font-size: .62rem;
  }

  .price {
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--burgundy);
  }

  .course-hero {
    padding: 14px 0 22px;
  }

  .course-hero-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .course-hero-media {
    order: 0;
    width: 100%;
  }

  .course-hero-side {
    order: 1;
    width: 100%;
    padding-top: 0;
  }

  .course-hero-main {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 11;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
  }

  .course-hero-placeholder {
    min-height: 0;
  }

  .course-hero-image,
  .course-hero-image img {
    width: 100%;
    height: 100%;
  }

  .course-hero-image img {
    object-fit: cover;
  }

  .course-gallery {
    display: flex !important;
    gap: 8px;
    margin: 9px -16px 0;
    padding: 0 16px 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .course-gallery::-webkit-scrollbar {
    display: none;
  }

  .course-gallery-item {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
  }

  .course-intro-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 28px rgba(26, 26, 26, .04);
  }

  .course-intro-card h1 {
    margin-bottom: 12px;
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: .01em;
    overflow-wrap: anywhere;
  }

  .course-price-line,
  .course-description,
  .course-lead {
    display: block !important;
  }

  .course-meta,
  .course-tier-list {
    display: flex !important;
  }

  .course-price-line {
    margin: 10px 0 12px;
    padding-bottom: 11px;
  }

  .course-price-main {
    font-family: var(--serif);
    font-size: 1.55rem;
    color: var(--burgundy);
  }

  .course-tier-list {
    max-height: none;
    flex-direction: column;
    gap: 0;
    margin: 8px 0 13px;
    padding: 0;
    overflow: visible;
  }

  .course-tier-list .tier-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
  }

  .course-tier-list .tier-name,
  .course-tier-list .tier-price {
    font-size: .86rem;
  }

  .course-description,
  .course-lead {
    margin: 10px 0 12px;
    color: var(--text-light);
    font-size: .9rem;
    line-height: 1.58;
  }

  .course-meta {
    flex-wrap: wrap;
    gap: 7px;
    margin: 10px 0 14px !important;
  }

  .course-meta-item {
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-size: .7rem;
  }

  .course-progress-box {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
  }

  .course-section {
    padding: 18px 0 34px;
  }

  .course-section .section-header {
    margin-bottom: 14px !important;
  }

  .course-section .section-title {
    font-family: var(--serif);
    font-size: 1.55rem !important;
    font-weight: 400;
  }

  .lesson-module-title {
    margin: 18px 0 8px;
    color: var(--burgundy);
    font-size: .7rem;
  }

  .lessons-list {
    gap: 8px;
  }

  .lesson-item {
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    box-shadow: none;
  }

  .lesson-num {
    border-radius: 4px;
  }

  .lesson-title {
    font-family: var(--sans);
    font-size: .94rem;
    font-weight: 600;
  }

  .lesson-more-action,
  .lesson-more-toggle,
  .lesson-extra-item {
    display: revert !important;
  }

  .checkout-wrap,
  .checkout-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 14px;
    padding: 24px 0 34px;
  }

  .checkout-box,
  .checkout-main,
  .checkout-sidebar {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 8px 28px rgba(26, 26, 26, .04);
  }

  .tier-option,
  .checkout-row {
    border-radius: 6px;
  }

  .payment-trust {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .form-control,
  input.form-control,
  textarea.form-control,
  select.form-control {
    width: 100%;
    min-height: 46px;
    padding: 12px 13px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 16px;
    line-height: 1.35;
  }

  .auth-wrap {
    min-height: calc(100svh - 124px);
    padding: 24px 0 36px;
    align-items: flex-start;
  }

  .auth-card,
  .modal-card,
  .legal-card {
    width: 100%;
    max-width: 100%;
    padding: 24px 18px;
    border-radius: 8px;
  }

  .auth-card h1 {
    font-family: var(--serif);
    font-size: 1.8rem;
  }

  .modal-overlay,
  .welcome-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .modal-card,
  .welcome-card {
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    border-radius: 8px 8px 0 0;
  }

  .welcome-tips {
    grid-template-columns: 1fr;
  }

  .lesson-layout,
  .lesson-layout-classic {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 20px 0 34px;
  }

  .lesson-main,
  .lesson-layout-classic .lesson-main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding-right: 0;
  }

  .lesson-sidebar,
  .lesson-layout-classic .lesson-sidebar {
    grid-column: 1;
    grid-row: 2;
    position: static;
    width: 100%;
    max-height: 380px;
    border-radius: 8px;
    box-shadow: none;
  }

  .lesson-interface-toolbar {
    justify-content: space-between;
    padding-top: 14px;
    margin-bottom: -4px;
  }

  .lesson-heading,
  .lesson-layout-classic .lesson-heading {
    font-family: var(--serif);
    font-size: 1.65rem;
    line-height: 1.08;
  }

  .video-wrap,
  .lesson-layout-classic .video-wrap {
    min-height: 0;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
  }

  .lesson-complete-panel {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    padding: 0;
  }

  .lesson-complete-btn {
    width: auto;
    min-width: 0;
    min-height: 36px;
    padding: 8px 12px;
    font-size: .6rem;
  }

  .lesson-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 7px;
    margin: 14px 0;
    padding: 10px;
    border-radius: 8px;
  }

  .lesson-nav .btn {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 10px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .6rem;
  }

  .lesson-nav-count {
    font-size: .66rem;
  }

  .lesson-info-box,
  .lesson-desc-box {
    padding: 18px;
    border-radius: 8px;
  }

  .lesson-image-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lesson-info-image {
    width: min(100%, 320px);
  }

  .lesson-sidebar-scroll {
    overflow-y: auto;
  }

  .lesson-sidebar-item,
  .lesson-layout-classic .lesson-sidebar-item {
    margin: 0;
    padding: 11px 13px;
  }

  .lesson-layout-classic .lesson-module-header {
    margin: 0;
  }

  .profile-top {
    align-items: flex-start;
    gap: 16px;
    margin: 28px 0 22px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .profile-top > div:last-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
    width: 100%;
  }

  .profile-top .btn {
    width: 100%;
    min-width: 0;
    padding: 11px 8px;
    font-size: .62rem;
  }

  .empty-state {
    padding: 34px 18px;
  }

  .bug-fab {
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 820;
    width: 42px;
    height: 42px;
  }

  .site-footer {
    margin-top: 18px;
    padding-bottom: 10px;
    border-radius: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 26px;
    padding-left: 0;
    padding-right: 0;
    text-align: left;
  }

  .footer-col {
    align-items: flex-start;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

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

  .admin-sidebar {
    display: none;
  }

  .admin-main {
    min-width: 0;
    padding: 22px 16px 36px;
  }

  .admin-page-header,
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .admin-panel,
  .admin-dashboard-stats,
  .admin-dashboard-grid,
  .admin-form-row {
    grid-template-columns: 1fr !important;
  }

  .admin-lessons-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .admin-box {
    min-width: 0;
    padding: 16px;
    overflow-x: auto;
  }

  table {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-tagline {
    max-width: 104px;
    font-size: .37rem;
  }

  .hero-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-text h1 {
    font-size: clamp(2.35rem, 13vw, 3rem);
  }

  .section-title,
  .category-header .section-title {
    font-size: 1.78rem;
  }

  .course-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .course-card-img {
    min-height: 156px;
  }

  .course-card-body {
    padding: 12px;
  }

  .course-card-body h3,
  .course-card-title {
    font-size: 1.08rem;
  }

  .course-intro-card h1 {
    font-size: 1.78rem;
  }

  .gallery-grid,
  .gallery-grid.size-s,
  .gallery-grid.size-m,
  .gallery-grid.size-l {
    grid-template-columns: 1fr;
  }

  .gallery-card {
    height: 280px;
  }

  .mobile-app-nav-item span {
    font-size: .58rem;
  }
}

@media (max-width: 360px) {
  .hero-content {
    padding-top: 160px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

  .hero-text,
  .hero-actions {
    transform: translateY(-50px);
  }

  .hero-desc {
    margin-bottom: 12px;
    font-size: .82rem;
    line-height: 1.45;
  }

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

  .hero-actions .btn {
    min-width: 0;
    min-height: 58px;
    padding: 9px 6px;
    overflow-wrap: anywhere;
    font-size: .58rem;
  }
}

/* Mobile home: quicker scanning, tactile paths, and more of the school's visual work. */
.hero-kicker {
  display: none;
}

@media (max-width: 768px),
       (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .hero {
    min-height: min(700px, calc(100svh - 58px));
  }

  .hero-content {
    min-height: min(700px, calc(100svh - 58px));
    padding-top: clamp(124px, 21svh, 170px);
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
    justify-content: center;
  }

  .hero-bg-slide {
    background-position: 58% center;
    transform: scale(1.02);
  }

  .hero-fashion-atmosphere {
    background-position: 50% center;
    opacity: .48;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(245, 240, 236, .1) 0%, rgba(245, 240, 236, .18) 28%, rgba(245, 240, 236, .92) 68%, rgba(245, 240, 236, .99) 100%),
      linear-gradient(90deg, rgba(245, 240, 236, .38), transparent 82%);
  }

  .hero-kicker {
    display: inline-flex;
    margin: 0 0 12px;
    padding: 6px 9px;
    border: 1px solid rgba(92, 26, 27, .24);
    color: var(--burgundy);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .hero-text h1 {
    max-width: 9ch;
    font-size: clamp(2.9rem, 14vw, 3.7rem);
  }

  .hero-desc {
    max-width: 31rem;
    font-size: .88rem;
  }

  .hero-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .hero-actions .btn {
    min-height: 52px;
    padding: 10px 9px;
    font-size: .66rem;
  }

  .value-section {
    padding-top: 34px;
  }

  .value-grid,
  .reviews-grid {
    display: flex !important;
    gap: 10px;
    margin-right: -16px;
    padding: 0 16px 7px 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .value-grid::-webkit-scrollbar,
  .reviews-grid::-webkit-scrollbar {
    display: none;
  }

  .value-card,
  .review-card {
    flex: 0 0 min(82vw, 320px);
    min-height: 238px;
    scroll-snap-align: start;
  }

  .fit-check {
    flex-wrap: nowrap;
    margin-right: -16px;
    padding-right: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .fit-check::-webkit-scrollbar {
    display: none;
  }

  .fit-check span {
    flex: 0 0 auto;
  }

  .category-section {
    padding-top: 38px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px;
  }

  .category-card {
    min-height: 228px;
    aspect-ratio: 4 / 5;
    border: 1px solid rgba(92, 26, 27, .12);
    border-radius: 6px;
    background: var(--bg-warm);
    box-shadow: 0 8px 22px rgba(92, 26, 27, .045);
  }

  .category-card-img {
    position: absolute;
    inset: 0;
    height: auto;
  }

  .category-card-img::after {
    opacity: 1;
    background: linear-gradient(180deg, rgba(245, 240, 236, .02) 24%, rgba(245, 240, 236, .28) 56%, rgba(245, 240, 236, .96) 100%);
  }

  .category-card-body {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 0;
    padding: 15px 13px 12px;
    background: transparent;
    color: var(--text);
  }

  .category-card-body h3 {
    max-width: 10ch;
    margin: 0;
    color: var(--text);
    font-family: var(--serif);
    font-size: 1.32rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: .98;
    text-transform: none;
  }

  .category-card-body p {
    display: none;
  }

  .category-num {
    top: 12px;
    right: 12px;
    color: var(--burgundy);
    font-size: 1.15rem;
  }

  .category-arrow {
    position: absolute;
    right: 13px;
    bottom: 12px;
    color: var(--burgundy);
  }

  .about-section {
    padding-top: 0;
    padding-bottom: 44px;
  }

  .about-img-wrap {
    min-height: 380px;
  }

  .about-content {
    margin-top: -32px;
    padding: 28px 20px 0;
    background: var(--bg);
  }

  .gallery-section {
    padding-top: 38px;
  }

  .gallery-grid,
  .gallery-grid.size-s,
  .gallery-grid.size-m,
  .gallery-grid.size-l {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .gallery-card,
  .gallery-grid.size-s .gallery-card,
  .gallery-grid.size-m .gallery-card,
  .gallery-grid.size-l .gallery-card {
    height: 184px;
    border-radius: 6px;
  }

  .gallery-card:nth-child(3n + 1) {
    height: 224px;
  }

  .gallery-info {
    padding: 10px;
  }

  .gallery-info h4 {
    font-size: .92rem;
  }

  .gallery-info p {
    display: none;
  }
}

@media (max-width: 360px) {
  .hero-content {
    padding-top: 104px;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .hero-text,
  .hero-actions {
    transform: none;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-kicker {
    margin-bottom: 8px;
    font-size: .5rem;
  }

  .hero-desc {
    margin-bottom: 11px;
    font-size: .78rem;
  }

  .hero-mobile-shortcuts {
    margin-top: -2px;
  }

  .hero-mobile-shortcuts a {
    min-height: 34px;
    padding: 5px 7px;
    font-size: .61rem;
  }
}

@media (max-width: 768px),
       (orientation: landscape) and (hover: none) and (pointer: coarse) {
  @media (prefers-reduced-motion: no-preference) {
    .sidebar,
    .sidebar-overlay,
    .mobile-contact-sheet-panel,
    .mobile-install-prompt,
    .btn,
    .mobile-app-nav-item,
    .category-card,
    .course-card,
    .gallery-card,
    .lesson-sidebar-item {
      transition-duration: .28s;
      transition-timing-function: cubic-bezier(.22, .8, .24, 1);
    }

    .category-card-img img,
    .gallery-img,
    .course-card-img-bg {
      transition: transform .42s cubic-bezier(.22, .8, .24, 1), opacity .35s ease;
    }

    .btn:active,
    .mobile-app-nav-item:active,
    .category-card:active,
    .course-card:active,
    .gallery-card:active {
      transform: scale(.985);
    }

    .lesson-sidebar-scroll,
    .lesson-sidebar-item {
      touch-action: pan-y;
    }

    .sidebar.open {
      transition-duration: .36s;
    }

    .mobile-contact-sheet:not([hidden]) .mobile-contact-sheet-panel {
      animation: mobile-sheet-enter .32s cubic-bezier(.22, .8, .24, 1) both;
    }

    .mobile-install-prompt:not([hidden]) {
      animation: mobile-prompt-enter .3s cubic-bezier(.22, .8, .24, 1) both;
    }
  }
}

@keyframes mobile-sheet-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mobile-prompt-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile contact actions stay available from every screen, not only the footer. */
.mobile-contact-sheet {
  display: none;
}

@media (max-width: 768px),
       (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .mobile-contact-trigger {
    border: 0;
    background: transparent;
    font-family: inherit;
  }

  .mobile-contact-sheet:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 980;
    display: grid;
    align-items: end;
  }

  .mobile-contact-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(26, 26, 26, .46);
  }

  .mobile-contact-sheet-panel {
    position: relative;
    z-index: 1;
    padding: 20px 16px calc(22px + env(safe-area-inset-bottom));
    border-radius: 10px 10px 0 0;
    background: var(--white);
    box-shadow: 0 -16px 42px rgba(26, 26, 26, .18);
  }

  .mobile-contact-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
  }

  .mobile-contact-sheet-head span {
    display: block;
    margin-bottom: 5px;
    color: var(--rose);
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
  }

  .mobile-contact-sheet-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1;
  }

  .mobile-contact-sheet-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--white);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
  }

  .mobile-contact-sheet-actions {
    display: grid;
    gap: 8px;
  }

  .mobile-contact-sheet-actions a {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--burgundy);
    border-radius: 6px;
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
  }

  .mobile-contact-sheet-actions a span {
    overflow: hidden;
    color: var(--text-light);
    font-size: .7rem;
    font-weight: 500;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

body.mobile-contact-sheet-open {
    overflow: hidden;
  }
}

/* Phone landscape keeps the lesson list in reach without stealing the video. */
.mobile-install-prompt {
  display: none;
}

@media (max-width: 768px) {
  .mobile-install-prompt:not([hidden]) {
    position: fixed;
    z-index: 975;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 12px 13px 14px;
    border: 1px solid rgba(92, 26, 27, .2);
    border-left: 3px solid var(--burgundy);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 14px 36px rgba(26, 26, 26, .18);
  }

  .mobile-install-prompt-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .mobile-install-prompt-copy strong {
    color: var(--text);
    font-size: .76rem;
    line-height: 1.25;
  }

  .mobile-install-prompt-copy span {
    color: var(--text-light);
    font-size: .66rem;
    line-height: 1.35;
  }

  .mobile-install-ios-help {
    color: var(--burgundy) !important;
  }

  .mobile-install-prompt-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
  }

  .mobile-install-action,
  .mobile-install-close {
    min-height: 36px;
    border: 0;
    font-family: inherit;
    font-weight: 700;
  }

  .mobile-install-action {
    padding: 8px 10px;
    border-radius: 5px;
    background: var(--burgundy);
    color: #fff;
    font-size: .65rem;
  }

  .mobile-install-close {
    width: 30px;
    padding: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
  }
}

@media (orientation: landscape) and (hover: none) and (pointer: coarse) {
  body {
    padding-right: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bug-report-floating {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .beta-notice,
  .lesson-interface-toolbar,
  .mobile-install-prompt,
  .hamburger-btn,
  .sidebar,
  .sidebar-overlay {
    display: none !important;
  }

  body.sidebar-open {
    overflow: visible;
    touch-action: auto;
  }

  body:has(.lesson-container) .site-header {
    display: none;
  }

  .lesson-container,
  .lesson-container-classic {
    width: min(100% - 20px, 1040px);
  }

  .lesson-layout,
  .lesson-layout-classic {
    grid-template-columns: clamp(126px, 18vw, 190px) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0 20px;
    align-items: start;
  }

  .lesson-main,
  .lesson-layout-classic .lesson-main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 0;
  }

  .lesson-sidebar,
  .lesson-layout-classic .lesson-sidebar {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 8px;
    width: 100%;
    height: calc(100dvh - 78px);
    max-height: calc(100dvh - 78px);
    border-radius: 6px;
    box-shadow: none;
  }

  body:has(.lesson-container) .lesson-sidebar,
  body:has(.lesson-container) .lesson-layout-classic .lesson-sidebar {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .lesson-sidebar-header > div[style] {
    display: none;
  }

  .back-link {
    display: none;
  }

  .lesson-heading,
  .lesson-layout-classic .lesson-heading {
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 1.15rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .video-wrap,
  .lesson-layout-classic .video-wrap {
    min-height: 0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  }

  .lesson-complete-panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 8px 0;
    padding: 0;
  }

  .lesson-complete-panel p { display: none; }
  .lesson-complete-btn { width: auto; min-width: 0; min-height: 34px; padding: 7px 10px; font-size: .56rem; }

  .lesson-nav {
    gap: 6px;
    margin: 9px 0;
    padding: 7px;
    border-radius: 6px;
  }

  .lesson-nav .btn {
    min-height: 38px;
    padding: 8px 6px;
    font-size: .57rem;
  }

  .lesson-nav-count {
    font-size: .6rem;
  }

  .lesson-sidebar-title {
    padding: 9px 10px;
    font-size: .55rem;
  }

  .lesson-sidebar-progress {
    gap: 7px;
    padding: 6px 10px 8px;
  }

  .lesson-sidebar-progress-text {
    font-size: .55rem;
  }

  .lesson-module-header,
  .lesson-layout-classic .lesson-module-header {
    margin: 0;
    padding: 7px 10px;
    font-size: .5rem;
  }

  .lesson-sidebar-item,
  .lesson-layout-classic .lesson-sidebar-item {
    gap: 7px;
    margin: 0;
    padding: 8px 9px;
    font-size: .64rem;
  }

  .lesson-sidebar-num {
    width: 19px;
    height: 19px;
    font-size: .54rem;
  }

  .lesson-sidebar-status {
    width: 12px;
  }

  .lesson-info-box,
  .lesson-desc-box {
    padding: 14px;
  }

  .lesson-image-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .lesson-info-image {
    width: min(100%, 280px);
    margin-bottom: 10px;
  }

  .lesson-lightbox {
    padding: 8px;
  }

  .lesson-lightbox-close {
    top: 6px;
    right: 10px;
  }

  .lesson-lightbox-body {
    width: 100%;
    height: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 8px;
    padding-right: 40px;
  }

  .lesson-lightbox-image {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
  }

  .lesson-lightbox-download {
    width: 36px;
    height: 36px;
    align-self: center;
  }

  .mobile-app-nav {
    top: calc(50% - 83px);
    right: -52px;
    bottom: auto;
    left: auto;
    width: 44px;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 40px);
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 8px;
    background: color-mix(in srgb, var(--white) 72%, transparent);
    box-shadow: 0 10px 30px rgba(26, 26, 26, .13), inset 0 1px 0 rgba(255, 255, 255, .9);
    opacity: 0;
    pointer-events: none;
    z-index: 1100;
    animation: none !important;
    transition: right .26s cubic-bezier(.22, .8, .24, 1), opacity .18s ease;
  }

  .mobile-app-nav.landscape-open {
    right: 5px;
    opacity: 1;
    pointer-events: auto;
  }

  .landscape-app-nav-trigger {
    position: fixed;
    top: 50%;
    right: 6px;
    z-index: 1102;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 50%;
    background: color-mix(in srgb, var(--white) 76%, transparent);
    color: var(--burgundy);
    box-shadow: 0 7px 20px rgba(26, 26, 26, .14), inset 0 1px 0 rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition: right .26s cubic-bezier(.22, .8, .24, 1), transform .18s ease, background .18s ease;
  }

  .landscape-app-nav-trigger:active {
    transform: scale(.92);
  }

  .landscape-app-nav-trigger svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .landscape-nav-open .landscape-app-nav-trigger {
    right: 56px;
  }

  .mobile-app-nav-item {
    min-height: 40px;
    padding: 3px;
  }

  .mobile-app-notifications .notif-bell-btn {
    min-height: 40px;
    padding: 3px;
  }

  .mobile-app-nav-item svg,
  .mobile-app-notifications .notif-bell-btn svg {
    width: 18px;
    height: 18px;
  }

  .mobile-app-nav-item span {
    display: none;
  }

  .mobile-app-nav-item::before {
    top: 50%;
    right: auto;
    left: -3px;
    width: 2px;
    height: 16px;
    transform: translateY(-50%);
  }

  .mobile-notification-sheet {
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-height: none;
    z-index: 1300;
  }
}

@view-transition {
  navigation: auto;
}

@media (max-width: 768px),
       (orientation: landscape) and (hover: none) and (pointer: coarse) {
  @media (prefers-reduced-motion: no-preference) {
    main {
      animation: mobile-content-enter .34s cubic-bezier(.22, .8, .24, 1) both;
    }

    .mobile-app-nav {
      animation: mobile-dock-enter .38s cubic-bezier(.22, .8, .24, 1) both;
    }

    .mobile-app-nav-item,
    .mobile-app-notifications .notif-bell-btn {
      transition: transform .18s ease, background .28s ease, color .22s ease, box-shadow .28s ease;
    }

    .mobile-app-nav-item.active,
    .mobile-app-notifications .notif-bell-btn:active {
      animation: mobile-tab-selected .32s cubic-bezier(.22, .8, .24, 1) both;
    }

    ::view-transition-old(root) {
      animation: mobile-view-out .16s ease both;
    }

    ::view-transition-new(root) {
      animation: mobile-view-in .28s cubic-bezier(.22, .8, .24, 1) both;
    }
  }
}

@keyframes mobile-view-out {
  to { opacity: .35; transform: translateY(-5px); }
}

@keyframes mobile-view-in {
  from { opacity: .35; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mobile-content-enter {
  from { opacity: .45; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mobile-dock-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mobile-tab-selected {
  0% { transform: scale(.94); }
  65% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

/* Keep the account avatar visible in every compact navigation variant. */
.site-avatar-mobile {
  display: grid !important; width: 24px; height: 24px; flex: 0 0 24px;
  border: 1.5px solid rgba(92,26,27,.2); font-size: .66rem;
  box-shadow: 0 2px 7px rgba(0,0,0,.12);
}
.mobile-app-nav-item.active .site-avatar-mobile { border-color: var(--burgundy); box-shadow: 0 0 0 2px rgba(92,26,27,.1); }
.mobile-app-nav-item .site-avatar-mobile > span { display: block !important; font-size: .66rem; }

/* ─── PROFILE DASHBOARD V2 ─── */
.profile-dashboard { padding-top: 34px; padding-bottom: 72px; }
.profile-dashboard-card {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 28px 30px; background: var(--white); border: 1px solid var(--border);
  box-shadow: 0 12px 38px rgba(45,34,30,.055);
}
.profile-dashboard-card .profile-identity { min-width: 0; }
.profile-dashboard-card .profile-avatar { width: 76px; height: 76px; flex-basis: 76px; }
.profile-identity-copy { min-width: 0; }
.profile-identity-copy h1 { margin-top: 4px; font-size: clamp(1.65rem, 2.4vw, 2.2rem); line-height: 1; }
.profile-google-status {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 9px;
  color: #166534; font-size: .68rem; font-weight: 600;
}
.profile-quick-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 650px; }
.profile-action {
  display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 15px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: .69rem; font-weight: 650; letter-spacing: .045em; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s, transform .2s;
}
.profile-action:hover { border-color: var(--rose); background: var(--white); color: var(--burgundy); box-shadow: 0 5px 15px rgba(45,34,30,.07); transform: translateY(-1px); }
.profile-action-primary { border-color: var(--burgundy); background: var(--burgundy); color: #fff; }
.profile-action-primary:hover { border-color: var(--burgundy-hover); background: var(--burgundy-hover); color: #fff; }
.profile-action-muted { color: var(--muted); }

.profile-account-settings { margin: 14px 0 36px; border: 1px solid var(--border); background: rgba(255,255,255,.52); }
.profile-account-settings > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 18px; cursor: pointer; list-style: none; user-select: none;
}
.profile-account-settings > summary::-webkit-details-marker { display: none; }
.profile-account-settings > summary > span:first-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.profile-account-settings > summary strong { color: var(--text); font-size: .78rem; font-weight: 650; }
.profile-account-settings > summary small { color: var(--muted); font-size: .7rem; }
.profile-settings-chevron { color: var(--burgundy); font-size: 1.25rem; transition: transform .2s; }
.profile-account-settings[open] .profile-settings-chevron { transform: rotate(180deg); }
.profile-settings-content { display: grid; grid-template-columns: 1.15fr .85fr; border-top: 1px solid var(--border); }
.profile-settings-content .profile-setting-block { padding: 22px; border: 0; box-shadow: none; }
.profile-settings-content .profile-setting-block + .profile-setting-block { border-left: 1px solid var(--border); }

.profile-section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 16px; }
.profile-section-heading h2 { margin-top: 4px; font-size: clamp(1.55rem, 2.3vw, 2rem); }
.profile-course-count {
  display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%;
  background: var(--burgundy); color: #fff; font-size: .75rem; font-weight: 700;
}

.admin-user-identity { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.admin-user-avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--burgundy); color: #fff;
  border: 2px solid var(--white); box-shadow: 0 2px 9px rgba(30, 20, 18, .14);
  font-size: .78rem; font-weight: 600; text-transform: uppercase;
}
.admin-user-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.admin-user-identity-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-user-identity-copy strong { color: var(--text); font-size: .82rem; font-weight: 600; }
.admin-user-identity-copy > span { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }

.profile-courses-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); gap: 20px; }
.profile-courses-grid .profile-course-card {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 300px;
  box-shadow: 0 10px 30px rgba(45,34,30,.055);
}
.profile-courses-grid .profile-course-card .course-card-img { height: 100%; min-height: 300px; aspect-ratio: auto; }
.profile-courses-grid .profile-course-card .course-card-img-bg { background-position: center top; }
.profile-courses-grid .profile-course-card .course-card-body { min-width: 0; justify-content: center; padding: 28px 30px; }
.profile-courses-grid .profile-course-card .course-card-body h3 { margin-bottom: 10px; font-size: 1.5rem; line-height: 1.1; }
.profile-courses-grid .profile-course-card .course-card-body p { flex: 0 1 auto; margin-bottom: 14px; font-size: .84rem; }
.profile-courses-grid .profile-course-card .course-card-footer { justify-content: flex-start; gap: 10px; }

@media (max-width: 900px) {
  .profile-dashboard-card { align-items: flex-start; flex-direction: column; gap: 22px; }
  .profile-quick-actions { justify-content: flex-start; max-width: none; }
  .profile-settings-content { grid-template-columns: 1fr; }
  .profile-settings-content .profile-setting-block + .profile-setting-block { border-top: 1px solid var(--border); border-left: 0; }
}

@media (max-width: 640px) {
  .profile-dashboard { padding-top: 20px; padding-bottom: 48px; }
  .profile-dashboard-card { gap: 18px; padding: 20px; }
  .profile-dashboard-card .profile-avatar { width: 64px; height: 64px; flex-basis: 64px; }
  .profile-dashboard-card .profile-identity { align-items: center; gap: 14px; }
  .profile-identity-copy h1 { font-size: 1.55rem; }
  .profile-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .profile-action { width: 100%; min-height: 42px; padding: 9px 10px; text-align: center; }
  .profile-action-primary { grid-column: 1 / -1; }
  .profile-account-settings { margin-bottom: 28px; }
  .profile-account-settings > summary { padding: 13px 15px; }
  .profile-settings-content .profile-setting-block { padding: 18px; }
  .profile-courses-grid { display: grid; grid-template-columns: 1fr !important; gap: 14px; padding: 0; }
  .profile-courses-grid .profile-course-card {
    display: grid; grid-template-columns: 124px minmax(0, 1fr); min-height: 190px;
  }
  .profile-courses-grid .profile-course-card .course-card-img { height: 100%; min-height: 190px; }
  .profile-courses-grid .profile-course-card .course-card-body { justify-content: flex-start; padding: 15px; }
  .profile-courses-grid .profile-course-card .course-card-body h3 { margin-bottom: 6px; font-size: 1.15rem; }
  .profile-courses-grid .profile-course-card .course-card-body p {
    display: -webkit-box; margin-bottom: 8px; overflow: hidden; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; font-size: .74rem; line-height: 1.4;
  }
  .profile-courses-grid .profile-course-card .course-card-footer { align-items: stretch; flex-direction: column; gap: 7px; }
  .profile-courses-grid .profile-course-card .course-card-footer .btn { width: 100%; min-height: 38px; padding: 9px 8px; }
}

/* ═════════════════════════════════════════════════════════════════
   AVATAR WORKSHOP & PROFILE AVATAR FIXES
   ═════════════════════════════════════════════════════════════════ */
.profile-avatar-wrap {
  position: relative; width: 76px; height: 76px; flex: 0 0 76px;
  display: inline-flex; align-items: center; justify-content: center;
}
.profile-avatar-wrap .profile-avatar {
  width: 100%; height: 100%; flex: 1 1 100%;
}
.profile-avatar-workshop-badge {
  position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--burgundy); color: #fff; border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); display: grid; place-items: center;
  font-size: 13px; cursor: pointer; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background-color .2s;
  padding: 0; line-height: 1; z-index: 5;
}
.profile-avatar-workshop-badge:hover { transform: scale(1.18); background: #8b323c; }

.profile-workshop-prompt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; margin: 12px 0 16px;
  background: linear-gradient(135deg, rgba(114, 47, 55, .05) 0%, rgba(216, 125, 136, .09) 100%);
  border: 1px solid rgba(114, 47, 55, .16); border-radius: 8px; box-sizing: border-box;
}
.profile-workshop-prompt-info { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.profile-workshop-prompt-info .workshop-icon { font-size: 1.7rem; line-height: 1; flex-shrink: 0; }
.profile-workshop-prompt-info strong { display: block; font-size: .86rem; color: var(--text); font-weight: 650; }
.profile-workshop-prompt-info small { display: block; font-size: .74rem; color: var(--text-light); line-height: 1.4; margin-top: 3px; }
.profile-workshop-prompt .btn {
  flex-shrink: 0; font-size: .76rem; font-weight: 600; padding: 9px 15px;
  border-color: var(--burgundy); color: var(--burgundy); white-space: nowrap;
}
.profile-workshop-prompt .btn:hover { background: var(--burgundy); color: #fff; }

.profile-upload-divider {
  display: flex; align-items: center; text-align: center; margin: 16px 0 14px; color: var(--muted); font-size: .72rem;
}
.profile-upload-divider::before,
.profile-upload-divider::after { content: ''; flex: 1; border-bottom: 1px dashed var(--border); }
.profile-upload-divider span { padding: 0 10px; text-transform: lowercase; letter-spacing: .02em; }

/* Modal Container */
.avatar-workshop-overlay {
  position: fixed; inset: 0; z-index: 10000; background: rgba(22, 17, 16, .78);
  backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto; overflow-x: hidden; animation: awFadeIn .22s ease-out;
  box-sizing: border-box;
}
@keyframes awFadeIn { from { opacity: 0; } to { opacity: 1; } }

.avatar-workshop-card {
  width: 100%; max-width: 920px; background: var(--white); border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(28, 18, 16, .24); border-radius: 12px; overflow: hidden;
  max-height: min(92vh, 880px); display: flex; flex-direction: column;
  animation: awSlideUp .25s cubic-bezier(.16, 1, .3, 1);
  padding: 0 !important; margin: auto; box-sizing: border-box; position: relative;
}
@keyframes awSlideUp { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.avatar-workshop-header {
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
  padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--bg);
}
.avatar-workshop-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; margin: 2px 0 0; color: var(--text); }
.avatar-workshop-header .modal-close {
  background: none; border: 0; font-size: 1.7rem; line-height: 1; color: var(--muted);
  cursor: pointer; padding: 4px 10px; border-radius: 6px; transition: color .15s, background .15s;
  position: static;
}
.avatar-workshop-header .modal-close:hover { color: var(--burgundy); background: rgba(0,0,0,.06); }

.avatar-workshop-body {
  display: grid; grid-template-columns: 320px 1fr; min-height: 0; flex: 1;
  overflow: hidden; box-sizing: border-box;
}

/* Left preview pane */
.avatar-workshop-preview-pane {
  background: var(--bg); border-right: 1px solid var(--border);
  padding: 24px 22px; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; gap: 18px; overflow-y: auto; overflow-x: hidden;
  box-sizing: border-box;
}
.avatar-preview-display {
  display: flex; flex-direction: column; align-items: center; width: 100%;
}
.avatar-canvas-wrapper {
  width: 190px; height: 190px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 10px 32px rgba(45, 34, 30, .18), 0 0 0 4px var(--white), 0 0 0 5px var(--border);
  background: #2a2a2a; display: flex; align-items: center; justify-content: center; position: relative;
  flex-shrink: 0; box-sizing: border-box; transition: transform .2s ease;
}
.avatar-canvas-wrapper:hover { transform: scale(1.02); }
#avatar-canvas {
  width: 100% !important; height: 100% !important; max-width: 100% !important;
  display: block; border-radius: 50%; object-fit: contain;
}

.avatar-preview-sub {
  display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 8px 14px;
  background: var(--white); border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.03);
  max-width: 100%; box-sizing: border-box;
}
.avatar-preview-mini {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.15); flex-shrink: 0; background: #222;
}
#avatar-mini-canvas { width: 100% !important; height: 100% !important; display: block; border-radius: 50%; }
.avatar-preview-info { min-width: 0; display: flex; flex-direction: column; }
.avatar-preview-info strong {
  font-size: .78rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px;
}
.avatar-preview-info span { font-size: .68rem; color: var(--text-light); }

.avatar-workshop-quick-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%;
}
.avatar-workshop-quick-actions .btn { font-size: .72rem; padding: 8px 10px; white-space: nowrap; justify-content: center; }

.avatar-save-status {
  width: 100%; padding: 8px 12px; border-radius: 4px; font-size: .76rem; text-align: center;
  font-weight: 500; box-sizing: border-box;
}
.avatar-save-status.success { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.avatar-save-status.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.avatar-save-btn {
  width: 100%; padding: 12px 16px; font-size: .84rem; letter-spacing: .03em;
  box-shadow: 0 4px 14px rgba(114, 47, 55, .28); justify-content: center;
}
.avatar-save-btn:hover { box-shadow: 0 6px 20px rgba(114, 47, 55, .38); transform: translateY(-1px); }

/* Right controls pane */
.avatar-workshop-controls-pane {
  padding: 24px 28px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 22px;
  min-height: 0; box-sizing: border-box;
}
.workshop-control-group {
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.workshop-control-group:last-child { border-bottom: 0; padding-bottom: 0; }
.workshop-group-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.workshop-label {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 500; color: var(--text); margin: 0;
}
.sub-label {
  display: block; font-size: .74rem; font-weight: 600; color: var(--text-light); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em;
}

/* Segmented Control (Tabs) */
.workshop-segmented-control {
  display: inline-flex; background: var(--bg); padding: 3px; border: 1px solid var(--border); border-radius: 6px;
}
.segment-btn {
  padding: 5px 14px; border: 0; background: none; font: inherit; font-size: .74rem;
  font-weight: 600; color: var(--text-light); cursor: pointer; border-radius: 4px; transition: all .15s;
}
.segment-btn.active {
  background: var(--white); color: var(--burgundy); box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* Swatches & Presets */
.palette-swatches {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.palette-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,.15); cursor: pointer; transition: transform .15s, box-shadow .15s;
  padding: 0; flex-shrink: 0; position: relative;
}
.palette-dot:hover { transform: scale(1.15); }
.palette-dot.active { box-shadow: 0 0 0 2px var(--burgundy), 0 3px 8px rgba(0,0,0,.22); transform: scale(1.12); }

.gradient-presets-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin-bottom: 14px;
}
.gradient-preset-btn {
  height: 38px; border-radius: 6px; border: 2px solid var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,.14); cursor: pointer; transition: transform .15s, box-shadow .15s;
  padding: 0; position: relative;
}
.gradient-preset-btn:hover { transform: translateY(-2px); }
.gradient-preset-btn.active { box-shadow: 0 0 0 2.5px var(--burgundy), 0 4px 10px rgba(0,0,0,.2); }

.custom-color-row, .gradient-custom-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px;
}
.color-input-wrapper {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bg);
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px;
}
.color-input-wrapper input[type=color] {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 3px;
}
.color-input-wrapper input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input-wrapper input[type=color]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.color-input-wrapper span { font-size: .75rem; font-family: monospace; color: var(--text-light); }

.gradient-color-pick, .gradient-dir-pick {
  display: flex; flex-direction: column; gap: 4px;
}
.gradient-color-pick label, .gradient-dir-pick label { font-size: .72rem; color: var(--text-light); }

.workshop-subrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.workshop-subrow label { font-size: .78rem; font-weight: 600; color: var(--text); }
.workshop-subrow select { max-width: 240px; }

/* Symbol section */
.symbol-counter { font-size: .72rem; color: var(--muted); font-weight: 600; }
.symbol-input-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
#symbol-input {
  max-width: 110px; font-size: 1.4rem; text-align: center; font-weight: 700;
  letter-spacing: .1em; padding: 8px; height: 46px; text-transform: uppercase;
}
.symbol-quick-title { font-size: .75rem; color: var(--text-light); }
.symbol-quick-badges {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.symbol-badge {
  width: 38px; height: 38px; border-radius: 6px; background: var(--bg);
  border: 1px solid var(--border); font-size: 1.25rem; display: grid; place-items: center;
  cursor: pointer; transition: all .15s; padding: 0;
}
.symbol-badge:hover {
  background: var(--white); border-color: var(--burgundy); transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

/* Font & Style section */
.workshop-grid-2col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.symbol-color-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.symbol-color-swatches { display: flex; align-items: center; gap: 8px; }
.color-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border);
  cursor: pointer; padding: 0; transition: transform .15s, box-shadow .15s;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.active { box-shadow: 0 0 0 2px var(--burgundy); transform: scale(1.15); }
.custom-color-mini input[type=color] {
  width: 26px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%;
}
.custom-color-mini input[type=color]::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 50%; }

/* Sliders */
.slider-row { display: flex; flex-direction: column; gap: 4px; }
.slider-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.slider-label-row span:last-child { font-size: .72rem; color: var(--text-light); font-family: monospace; }
.workshop-slider {
  width: 100%; accent-color: var(--burgundy); height: 5px; cursor: pointer;
}

@media (max-width: 820px) {
  .avatar-workshop-overlay {
    padding: 10px; align-items: flex-end;
  }
  .avatar-workshop-card {
    max-height: calc(100dvh - 20px); border-radius: 12px 12px 0 0;
  }
  .avatar-workshop-body {
    grid-template-columns: 1fr; overflow-y: auto; overflow-x: hidden;
  }
  .avatar-workshop-preview-pane {
    border-right: 0; border-bottom: 1px solid var(--border); padding: 18px 16px;
    gap: 14px; overflow-y: visible;
  }
  .avatar-canvas-wrapper {
    width: 140px; height: 140px;
  }
  .avatar-workshop-controls-pane {
    padding: 18px 16px; overflow-y: visible;
  }
  .workshop-grid-2col {
    grid-template-columns: 1fr; gap: 10px;
  }
  .custom-color-row, .gradient-custom-row {
    flex-direction: column; align-items: flex-start;
  }
}

@media (max-width: 1080px) {
  .profile-workshop-prompt {
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .profile-workshop-prompt .btn {
    width: 100%; text-align: center; justify-content: center;
  }
}

