@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@100;200;300;400;500;600;700;800;900&family=DM+Sans:wght@500;600;700&family=Nunito:ital,wght@0,200..1000&display=swap");
@import url("https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/light/style.css");
@import url("https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/fill/style.css");
@import url("https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/regular/style.css");

/*---------------------------------------
  CUSTOM PROPERTIES ( VARIABLES )
  Palette: #F7EFE5 #E2BFD9 #C8A1E0 #674188
  -----------------------------------------*/
:root {
  --white-color:                  #ffffff;
  --primary-color:                #FFD335;   /* deep plum */
  --secondary-color:              #6B34C4;   /* soft lavender */
  --section-bg-color:             #F7EFE5;   /* warm cream */
  --custom-btn-bg-color:          #FFD335;   /* button base */
  --custom-btn-bg-hover-color:    #36348E;   /* button hover */
  --dark-color:                   #0f172a;   /* headings (neutral for contrast) */
  --p-color:                      #374151;   /* body text */
  --border-color:                 #E2BFD9;   /* subtle border */
  --link-hover-color:             var(--secondary-color);
  --sidebar-accent:               #783dd2;
  --sidebar-accent-strong:        #783dd2;
  --sidebar-active-bg:            rgba(120, 61, 210, 0.12);
  --sidebar-hover-bg:             rgba(120, 61, 210, 0.08);
  --sidebar-text:                 #783dd2;
  --sidebar-text-muted:           #783dd2;
  --sidebar-gradient:             linear-gradient(180deg, #dff0ff 0%, #e9dcff 45%, #f9f5ff 100%);
  --sidebar-gradient-dark:        linear-gradient(180deg, #1b1430 0%, #120c23 100%);

  --body-font-family:             'Inter', sans-serif;
  --title-font-family:            'Nunito', sans-serif;
  --label-font-family:            'DM Sans', 'Inter', sans-serif;
  --display-font-family:          'Poppins', 'Inter', sans-serif;

  --h1-font-size:                 58px;
  --h2-font-size:                 46px;
  --h3-font-size:                 32px;
  --h4-font-size:                 28px;
  --h5-font-size:                 24px;
  --h6-font-size:                 22px;
  --p-font-size:                  20px;
  --menu-font-size:               14px;
  --btn-font-size:                18px;
  --copyright-font-size:          16px;

  --border-radius-large:          100px;
  --border-radius-medium:         20px;
  --border-radius-small:          10px;

  --font-weight-normal:           400;
  --font-weight-medium:           500;
  --font-weight-semibold:         600;
  --font-weight-bold:             700;

  /* ===== Centralized color tokens ===== */
  /* Gradients (hero/header/overlay) */
  --brand-gradient-start:         #A157FF;    /* deep plum */
  --brand-gradient-end:           #6B34C4;   /* button base */

  /* Lines / borders */
  --navbar-border-color:          rgba(200, 161, 224, 0.35); /* from #C8A1E0 */
  --tab-border-color:             #F7EFE5;

  /* Category badge colors (within palette) */
  --cat-design:                   #7763E5;
  --cat-graphic:                  #7763E5;
  --cat-advertising:              #7763E5;
  --cat-finance:                  #7763E5;
  --cat-music:                    #7763E5;
  --cat-education:                #7763E5;

  /* App shell layout */
  --app-shell-max:                1600px;
  --app-shell-pad:                32px;
  --app-shell-gap:                24px;
  --app-sidebar-width:            66px;
  --content-panel-pad:            32px;
  --content-panel-pad-top:        0;
  --content-panel-pad-bottom:     0;
  --content-bottom-gap:           30px;
  --main-layer-gap:               30px;
  --bottom-nav-height:            0px;

  /* Shadows */
  --shadow-weak:                  rgba(0,0,0,.08);
  --shadow-strong:                rgba(0,0,0,.12);
  --shadow-mid:                   rgba(0,0,0,.15);
  --shadow-dropdown:              rgba(0,0,0,.175);

  /* === Logo colors === */
  --logo-color:                   var(--white-color);     /* brand color on hero */
  --logo-hover-color:             var(--primary-color);
  --logo-sticky-color:            var(--primary-color);   /* when navbar becomes sticky */

  /* Footer logo */
  --logo-footer-color:            var(--primary-color);
  --logo-footer-hover-color:      var(--secondary-color);

  /* Section backgrounds */
  --benefits-rays: radial-gradient(ellipse at 50% 20%, #ffe25c 0%, #ffd335 45%, #ffbf2f 70%, #f7b127 100%), repeating-conic-gradient(from -90deg at 50% 20%, #ffd335 0deg 20deg, #ffcb42 20deg 40deg);
}

.material-symbols-rounded {
  display: none;
}

/* Tighter spacing for internal app pages */
html.app-layout,
body.app-layout {
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
}

body.app-layout {
  --app-shell-pad: 7px;
  --app-shell-gap: 4px;
}

body {
  margin: 0;
  background-color: var(--white-color);
  font-family: var(--body-font-family); 
}

/* App layout typography overrides */
.app-layout {
  --title-font-family: var(--display-font-family);
  --body-font-family: 'Inter', sans-serif;
  --label-font-family: 'DM Sans', 'Inter', sans-serif;
}

/* === Navbar (top) logo color === */
.navbar-brand{
  color: var(--logo-color);
}
.navbar-brand:hover,
.navbar-brand:focus,
.navbar-brand:active{
  color: var(--logo-hover-color);
}
/* when sticky (your JS/CSS adds .is-sticky on wrapper) */
.sticky-wrapper.is-sticky .navbar .navbar-brand{
  color: var(--logo-sticky-color);
}

/* Ensure both the icon and text follow the same color */
.navbar-brand .bi{ color: inherit; }
.navbar-brand span{ color: inherit; }

/* === Footer logo color === */
.site-footer .navbar-brand{
  color: var(--logo-footer-color);
}
.site-footer .navbar-brand:hover{
  color: var(--logo-footer-hover-color);
}



/*---------------------------------------
  TYPOGRAPHY               
-----------------------------------------*/

h2,
h3,
h4,
h5,
h6 {
  color: var(--dark-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--title-font-family); 
  font-weight: var(--font-weight-semibold);
}

h1 {
  font-size: var(--h1-font-size);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--h2-font-size);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--h3-font-size);
}

h4 {
  font-size: var(--h4-font-size);
}

h5 {
  font-size: var(--h5-font-size);
}

h6 {
  color: var(--primary-color);
  font-size: var(--h6-font-size);
}

p {
  color: var(--p-color);
  font-size: var(--p-font-size);
  font-weight: var(--font-weight-normal);
}

ul li {
  color: var(--p-color);
  font-size: var(--p-font-size);
  font-weight: var(--font-weight-normal);
}

a, 
button {
  touch-action: manipulation;
  transition: all 0.3s;
}

a {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover-color);
}

b,
strong {
  font-weight: var(--font-weight-bold);
}


/*---------------------------------------
  SECTION               
-----------------------------------------*/
.section-padding {
  padding-top: 100px;
  padding-bottom: 100px;
}

/*---------------------------------------
  SECTION DIVIDER (HERO → NEXT)
-----------------------------------------*/
.section-divider {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  line-height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 3;
}

.section-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

.section-divider.wavy {
  transform-origin: center;
  pointer-events: none;
}

.section-divider .wave-back,
.section-divider .wave-mid,
.section-divider .wave-front {
  transform-origin: center;
}

.section-divider .wave-back {
  opacity: 0.65;
}

.section-divider .wave-mid {
  opacity: 0.8;
}

.section-divider .wave-front {
  opacity: 1;
}

.section-divider.wave-footer {
  transform: rotate(180deg);
}

.section-divider.wavy::before,
.section-divider.wavy::after {
  content: "";
  position: absolute;
  top: -16px;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.14));
  pointer-events: none;
}

.section-divider.wavy::before {
  left: 12%;
}

.section-divider.wavy::after {
  right: 18%;
  width: 10px;
  height: 10px;
}

.explore-section {
  padding-top: 60px;
}

.section-bg {
  background-color: var(--section-bg-color);
}

.section-overlay {
  background-image: linear-gradient(15deg, var(--brand-gradient-start) 0%, var(--brand-gradient-end) 100%);
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.section-overlay + .container {
  position: relative;
}

/* Footer divider between benefits and footer */
.tab-content {
  background-color: var(--white-color);
  border-radius: var(--border-radius-medium);
}

.nav-tabs {
  border-bottom: 1px solid var(--tab-border-color);
  margin-bottom: 40px;
  justify-content: center;
}

.nav-tabs .nav-link {
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  color: var(--p-color);
  font-family: var(--title-font-family);
  font-size: var(--btn-font-size);
  font-weight: var(--font-weight-medium);
  padding: 15px 25px;
  transition: all 0.3s;
}

.nav-tabs .nav-link:first-child {
  margin-right: 20px;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active,
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
  border-bottom-color: var(--secondary-color);
  color: var(--secondary-color);
}

.tools-subnav {
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.tools-subnav .nav-link {
  background-color: transparent;
  border: 1px solid var(--tab-border-color);
  border-radius: var(--border-radius-large);
  color: var(--p-color);
  padding: 10px 22px;
  transition: all 0.3s;
}

.tools-subnav .nav-link.active,
.tools-subnav .nav-link:focus,
.tools-subnav .nav-link:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--white-color);
}

.tools-subtab-content {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
}


/*---------------------------------------
  CUSTOM ICON COLOR               
-----------------------------------------*/
.custom-icon {
  color: var(--secondary-color);
}


/*---------------------------------------
  CUSTOM BUTTON               
-----------------------------------------*/
.custom-btn {
  background: var(--custom-btn-bg-color);
  border: 2px solid transparent;
  border-radius: var(--border-radius-large);
  color: var(--white-color);
  font-size: var(--btn-font-size);
  font-weight: var(--font-weight-semibold);
  line-height: normal;
  transition: all 0.3s;
  padding: 10px 20px;
}

.custom-btn:hover {
  background: var(--custom-btn-bg-hover-color);
  color: var(--white-color);
}

.custom-border-btn {
  background: transparent;
  border: 2px solid var(--custom-btn-bg-color);
  color: var(--custom-btn-bg-color);
}

.custom-border-btn:hover {
  background: var(--custom-btn-bg-color);
  border-color: transparent;
  color: var(--white-color);
}

.custom-btn-bg-white {
  border-color: var(--white-color);
  color: var(--white-color);
}

.nav-auth .nav-auth-btn {
  padding: 8px 16px;
  border-radius: var(--border-radius-medium);
  font-size: 15px;
  line-height: 1.2;
  box-shadow: none;
  font-weight: var(--font-weight-bold);
}

.nav-auth .custom-border-btn {
  border-color: var(--custom-btn-bg-color);
  color: var(--custom-btn-bg-color);
}

.nav-auth .custom-border-btn:hover {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

.nav-auth .custom-btn {
  color: #000000;
}

.nav-auth .custom-btn:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

/* Clean header on login page (no shadow/border over yellow bar) */
.login-page .navbar {
  border-bottom: none;
  box-shadow: none;
  background: transparent;
}

/* Login page navbar contrast on yellow background */
.login-page .nav-auth .custom-border-btn {
  background: #ffffff;
  border-color: #6B34C4;
  color: #6B34C4;
  font-weight: 800;
}

.login-page .nav-auth .custom-border-btn:hover {
  background: #6B34C4;
  border-color: #6B34C4;
  color: #ffffff;
}

.login-page .nav-auth .custom-btn {
  background: #6B34C4;
  border-color: #6B34C4;
  color: #ffffff;
  font-weight: 800;
}

.login-page .nav-auth .custom-btn:hover {
  background: #4f2494;
  border-color: #4f2494;
  color: #ffffff;
}

.login-page .navbar-nav .nav-link {
  color: #6B34C4;
  font-weight: 800;
}

.login-page .navbar-nav .nav-link:hover,
.login-page .navbar-nav .nav-link:focus,
.login-page .navbar-nav .nav-link:active,
.login-page .navbar-nav .nav-link.active {
  color: #4f2494;
}

/* Auth state toggles */
[data-auth-hidden="true"] {
  display: none !important;
}
/*---------------------------------------
  SITE HEADER
-----------------------------------------*/
.site-header {
  background-image: linear-gradient(15deg, var(--brand-gradient-start) 0%, var(--brand-gradient-end) 100%);
  padding-top: 150px;
  padding-bottom: 80px;
}

.site-header .container {
  height: 100%;
}

.breadcrumb-item+.breadcrumb-item::before,
.breadcrumb-item a:hover,
.breadcrumb-item.active {
  color: var(--white-color);
}

.site-header .custom-icon {
  color: var(--white-color);
  font-size: var(--h4-font-size);
}

.site-header .custom-icon:hover {
  color: var(--primary-color);
}


/*---------------------------------------
  NAVIGATION              
-----------------------------------------*/
.sticky-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
}

.sticky-wrapper.is-sticky .navbar {
  background-color: var(--secondary-color);
}

.navbar {
  background: transparent;
  border-bottom: 1px solid var(--navbar-border-color);
  z-index: 9;
}

/* Profile dropdowns */
.profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 1040;
}

.profile-trigger {
  background: transparent;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
}

.profile-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 211, 53, 0.45);
  border-radius: 50%;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 8px 0;
  background: var(--white-color);
  color: var(--dark-color);
  border-radius: var(--border-radius-medium);
  box-shadow: 0 12px 28px var(--shadow-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1050;
}

.profile-menu:hover .profile-dropdown,
.profile-menu:focus-within .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-link {
  display: block;
  width: 100%;
  padding: 10px 14px;
  color: var(--dark-color);
  text-decoration: none;
  font-family: var(--title-font-family);
  font-size: var(--menu-font-size);
  font-weight: var(--font-weight-medium);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.profile-link:hover,
.profile-link:focus {
  background: transparent;
  color: var(--secondary-color);
}

.profile-link-action {
  border-top: 1px solid var(--border-color);
}

/* Center brand while keeping left/right controls aligned */
.navbar .container {
  position: relative;
}

.navbar-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  white-space: nowrap;
}

.navbar-brand,
.navbar-brand:hover {
  font-size: var(--h3-font-size);
  font-weight: var(--font-weight-bold);
  display: block;
}

.navbar-brand span {
  font-family: var(--title-font-family);
}

.navbar-brand .brand-logo {
  display: block;
  height: 120px;
  width: auto;
}

.navbar-expand-lg .navbar-nav .nav-link {
  border-radius: var(--border-radius-large);
  margin: 10px;
  padding: 10px;
}

.navbar-nav .nav-link {
  display: inline-block;
  color: var(--white-color);
  font-family: var(--title-font-family); 
  font-size: var(--menu-font-size);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding-top: 15px;
  padding-bottom: 15px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link:active,
.navbar-nav .nav-link.active {
  color: var(--primary-color);
}

.navbar .dropdown-menu {
  background: var(--white-color);
  box-shadow: 0 1rem 3rem var(--shadow-dropdown);
  border: 0;
  display: inherit;
  opacity: 0;
  min-width: 9rem;
  margin-top: 20px;
  padding: 13px 0 10px 0;
  transition: all 0.3s;
  pointer-events: none;
}

.navbar .dropdown-menu::before {
  /* Remove sharp pointer triangle on hover */
  display: none;
}

.navbar .dropdown-item {
  display: inline-block;
  color: var(--p-color);
  font-family: var(--title-font-family); 
  font-size: var(--menu-font-size);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.navbar .dropdown-item.active, 
.navbar .dropdown-item:active,
.navbar .dropdown-item:focus, 
.navbar .dropdown-item:hover {
  background: transparent;
  color: var(--primary-color);
}

.navbar .dropdown-toggle::after {
  content: "\f282";
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-size: var(--copyright-font-size);
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  left: 2px;
  border: 0;
}

@media screen and (min-width: 992px) {
  .navbar .dropdown:hover .dropdown-menu {
    opacity: 1;
    margin-top: 0;
    pointer-events: auto;
  }
}

.navbar-icon {
  background: var(--white-color);
  border-radius: var(--border-radius-large);
  display: inline-block;
  font-size: var(--h5-font-size);
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  transition: all 0.3s ease;
}

.navbar-icon:hover,
.navbar-icon:focus,
.navbar-icon:active {
  background: var(--primary-color);
  color: var(--white-color);
}

.navbar-toggler {
  border: 0;
  padding: 0;
  cursor: pointer;
  margin: 0;
  width: 30px;
  height: 35px;
  outline: none;
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: none;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
  background: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon:before,
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon:after {
  transition: top 300ms 50ms ease, -webkit-transform 300ms 350ms ease;
  transition: top 300ms 50ms ease, transform 300ms 350ms ease;
  transition: top 300ms 50ms ease, transform 300ms 350ms ease, -webkit-transform 300ms 350ms ease;
  top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon:before {
  transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon:after {
  transform: rotate(-45deg);
}

.navbar-toggler .navbar-toggler-icon {
  background: var(--white-color);
  transition: background 10ms 300ms ease;
  display: block;
  width: 30px;
  height: 2px;
  position: relative;
}

.navbar-toggler .navbar-toggler-icon:before,
.navbar-toggler .navbar-toggler-icon:after {
  transition: top 300ms 350ms ease, -webkit-transform 300ms 50ms ease;
  transition: top 300ms 350ms ease, transform 300ms 50ms ease;
  transition: top 300ms 350ms ease, transform 300ms 50ms ease, -webkit-transform 300ms 50ms ease;
  position: absolute;
  right: 0;
  left: 0;
  background: var(--white-color);
  width: 30px;
  height: 2px;
  content: '';
}

.navbar-toggler .navbar-toggler-icon::before {
  top: -8px;
}

.navbar-toggler .navbar-toggler-icon::after {
  top: 8px;
}


/*---------------------------------------
  HERO        
-----------------------------------------*/
.hero-section {
  background-image: linear-gradient(15deg, var(--brand-gradient-start) 0%, var(--brand-gradient-end) 100%);
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
  padding-top: 150px;
  padding-bottom: 150px;
}

.hero-section .hero-decoration {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s ease-out;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12));
  opacity: 0.95;
}

.hero-section .hero-decoration.hero-icon {
  z-index: 4;
}

.hero-icon {
  z-index: 4;
}

.hero-decoration-confetti1 {
  top: 32%;
  left: 6%;
  width: clamp(16px, 2vw, 28px);
}
.hero-decoration-confetti2 {
  top: 34%;
  left: 66%;
  width: clamp(24px, 3vw, 40px);
}

.hero-section .hero-decoration-star {
  top: 11%;
  left: 9%;
  width: clamp(38px, 4.5vw, 68px);
}

.hero-section .hero-decoration-controller {
  top: 18%;
  right: 24%;
  width: clamp(52px, 4.8vw, 92px);
}

.hero-section .hero-decoration-skateboard {
  top: 20%;
  right: 8%;
  width: clamp(180px, 15vw, 292px);
}

.hero-section .hero-decoration-basketball {
  top: 22%;
  left: 10%;
  width: clamp(156px, 14.72vw, 276px); /* ~8% smaller */
}

.hero-decoration-confetti1,
.hero-decoration-confetti2 {
  display: none;
}

@media (max-width: 991px) {
  .hero-section .hero-decoration {
    display: none;
  }
}

.hero-section .container {
  position: relative;
  z-index: 6;
  transform: translateY(-40px);
}

.login-page .hero-section .container {
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  margin-top: -40px;
}

.hero-foreground {
  transition: opacity 0.4s ease;
}

.hero-section .input-group {
  background-color: var(--white-color);
  border-radius: var(--border-radius-large);
  padding: 10px 15px;
}

.hero-section .input-group-text {
  background-color: transparent;
  border: 0;
}

.hero-section input[type="search"] {
  border: 0;
  box-shadow: none;
  margin-bottom: 0;
  padding-left: 0;
}


/*---------------------------------------
  SECTION DIVIDER
-----------------------------------------*/


/*---------------------------------------
  TOPICS              
-----------------------------------------*/

.custom-block {
  border-radius: var(--border-radius-medium);
  position: relative;
  overflow: hidden;
  padding: 30px;
  transition: all 0.3s ease;
  height: 100%;
}

.custom-block:hover {
  transform: translateY(-3px);
}

.custom-block > a {
  width: 100%;
}

.custom-block-image {
  display: block;
  width: 100%;
  max-width: none;
  height: 200px;
  object-fit: cover;
  margin-top: 35px;
}

.custom-block:not(.custom-block-topics-listing) .custom-block-image {
  width: calc(100% + 60px);
  margin-left: -30px;
  margin-right: -30px;
  margin-bottom: -30px;
}

.custom-block-topics-listing .custom-block-image {
  width: 200px;
  margin-top: 0;
}

.custom-block .rounded-pill {
  border-radius: 5px !important;
  display: flex;
  justify-content: center;
  text-align: center;
  width: 30px;
  height: 30px;
  line-height: 20px;
  background-color: #FA3E3E;
  color: #fff;
}

.custom-block-overlay {
  height: 100%;
  min-height: 350px;
  padding: 0;
}

.custom-block-overlay > a {
  height: 100%;
}

.custom-block-overlay .custom-block-image {
  border-radius: var(--border-radius-medium);
  display: block;
  height: 100%;
  margin-top: 0;
}

.custom-block-overlay-text {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  padding: 30px;
}

.social-share {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 2;
  padding: 20px 35px;
}

.social-share .bi-bookmark {
  color: var(--white-color);
  font-size: var(--h5-font-size);
}

.social-share .bi-bookmark:hover {
  color: var(--secondary-color);
}

.bg-design      { background-color: var(--cat-design); }
.bg-graphic     { background-color: var(--cat-graphic); }
.bg-advertising { background-color: var(--cat-advertising); }
.bg-finance     { background-color: var(--cat-finance); }
.bg-music       { background-color: var(--cat-music); }
.bg-education   { background-color: var(--cat-education); }

.testimonial-card {
  position: relative;
  padding-top: 80px;
  text-align: center;
  overflow: visible;
}

.testimonial-card .testimonial-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid var(--section-bg-color);
}

.testimonial-card .teacher-name-text {
  color: var(--primary-color);
  font-weight: var(--font-weight-bold);
}

.testimonial-card .teacher-location {
  color: var(--white-color);
  font-weight: var(--font-weight-normal);
}

.testimonial-card .testimonial-text {
  color: var(--white-color);
  margin-top: 15px;
}

#section_2 .custom-block:not(.custom-block-overlay) {
  border: 2px solid #1f1f1f;
  border-radius: var(--border-radius-medium);
  box-shadow: 4px 4px 0 #1f1f1f;
}

#section_2 .custom-block:not(.custom-block-overlay):hover {
  transform: translateY(-3px);
}

#section_2 .custom-block a,
#section_2 .custom-block a:hover,
#section_2 .custom-block h5,
#section_2 .custom-block p {
  color: #ffffff;
}


/*---------------------------------------
  TOPICS               
-----------------------------------------*/
.topics-detail-block {
  border-radius: var(--border-radius-medium);
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.topics-detail-block-image {
  display: block;
  border-radius: var(--border-radius-medium);
}

.site-header .topics-detail-block-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

blockquote {
  background-color: var(--section-bg-color);
  border-radius: var(--border-radius-small);
  font-family: var(--title-font-family);
  font-size: var(--h4-font-size);
  font-weight: var(--font-weight-bold);
  display: inline-block;
  text-align: center;
  margin: 30px;
  padding: 40px;
}

.topics-listing-page .site-header {
  padding-bottom: 65px;
}

.custom-block-topics-listing-info {
  margin: 30px 20px 20px 30px;
}

.custom-block-topics-listing {
  height: inherit;
}

.custom-block-topics-listing .custom-block-image {
  width: 200px;
}


/*---------------------------------------
  PAGINATION              
-----------------------------------------*/
.pagination {
  margin-top: 40px;
}

.page-link {
  border: 0;
  border-radius: var(--border-radius-small);
  color: var(--p-color);
  font-family: var(--title-font-family);
  margin: 0 5px;
  padding: 10px 20px;
}

.page-link:hover,
.page-item:first-child .page-link:hover,
.page-item:last-child .page-link:hover {
  background-color: var(--secondary-color);
  color: var(--white-color);
}

.page-item:first-child .page-link {
  margin-right: 10px;
}

.page-item:first-child .page-link,
.page-item:last-child .page-link {
  background-color: var(--section-bg-color);
  border-radius: var(--border-radius-small);
}

.active>.page-link, .page-link.active {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}


/*---------------------------------------
  TIMELINE              
-----------------------------------------*/
.timeline-section {
  background-image: url('../images/modernclassroom.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  position: relative;
}

.timeline-container .vertical-scrollable-timeline {
  list-style-type: none;
  position: relative;
  padding-left: 0;
}

.timeline-container .vertical-scrollable-timeline .list-progress {
  width: 8px;
  height: 87%;
  background-color: var(--primary-color);
  position: absolute;
  left: 52px;
  top: 0;
  overflow: hidden;
}

.timeline-container .vertical-scrollable-timeline .list-progress .inner {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  background-color: var(--secondary-color);
  width: 100%;
}

.timeline-container .vertical-scrollable-timeline li {
  position: relative;
  padding: 20px 0px 65px 145px;
}

.timeline-container .vertical-scrollable-timeline li:last-child {
  padding-bottom: 0;
}

.timeline-container .vertical-scrollable-timeline li p {
  line-height: 40px;
}

.timeline-container .vertical-scrollable-timeline li p:last-child {
  margin-bottom: 0;
}

.timeline-container .vertical-scrollable-timeline li .icon-holder {
  position: absolute;
  left: 0;
  top: 0;
  width: 104px;
  height: 104px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--secondary-color);
  border-radius: 50%;
  z-index: 1;
  transition: 0.4s all;
}

.timeline-container .vertical-scrollable-timeline li .icon-holder::before {
  content: "";
  width: 80px;
  height: 80px;
  border: 4px solid var(--white-color);
  position: absolute;
  background-color: var(--secondary-color);
  border-radius: 50%;
  z-index: -1;
  transition: 0.4s all;
}

.timeline-container .vertical-scrollable-timeline li .icon-holder i {
  font-size: 25px;
  color: var(--white-color);
}

.timeline-container .vertical-scrollable-timeline li::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 8px;
  background-color: transparent;
  left: 52px;
  z-index: 0;
}

.timeline-container .vertical-scrollable-timeline li.active .icon-holder {
  background-color: var(--primary-color);
}

.timeline-container .vertical-scrollable-timeline li.active .icon-holder::before {
  background-color: var(--primary-color);
}


/*---------------------------------------
  FAQs              
-----------------------------------------*/
.faq-section .accordion-item {
  border: 0;
}

.faq-section .accordion-button {
  font-size: var(--h6-font-size);
  font-weight: var(--font-weight-semibold);
}

.faq-section .accordion-item:first-of-type .accordion-button {
  border-radius: var(--border-radius-large);
}

.faq-section .accordion-button:not(.collapsed) {
  border-radius: var(--border-radius-large);
  box-shadow: none;
  color: var(--primary-color);
}

.faq-section .accordion-body {
  color: var(--p-color);
  font-size: var(--btn-font-size);
  line-height: 40px;
}

  /*---------------------------------------
    CONTACT
  -----------------------------------------*/
.google-map {
  border-radius: var(--border-radius-medium);
}

.contact-form .form-floating>textarea {
  border-radius: var(--border-radius-medium);
  height: 150px;
}


/*---------------------------------------
  SUBSCRIBE FORM               
-----------------------------------------*/
.subscribe-form-wrap {
  padding: 50px;
}

.subscribe-form {
  width: 95%;
}


/*---------------------------------------
  CUSTOM FORM               
-----------------------------------------*/
.custom-form .form-control {
  border-radius: var(--border-radius-large);
  color: var(--p-color);
  margin-bottom: 24px;
  padding-top: 13px;
  padding-bottom: 13px;
  padding-left: 20px;
  outline: none;
}

.form-floating>label {
  padding-left: 20px;
}

.custom-form button[type="submit"] {
  background: var(--custom-btn-bg-color);
  border: none;
  border-radius: var(--border-radius-large);
  color: var(--white-color);
  font-family: var(--title-font-family);
  font-size: var(--p-font-size);
  font-weight: var(--font-weight-semibold);
  transition: all 0.3s;
  margin-bottom: 0;
}

.custom-form button[type="submit"]:hover,
.custom-form button[type="submit"]:focus {
  background: var(--custom-btn-bg-hover-color);
  border-color: transparent;
}

/* Hero search button overrides */
.hero-section .custom-form button[type="submit"] {
  background: var(--primary-color);
  border: 2px solid #262626;
  border-radius: var(--border-radius-large) !important;
  color: #262626;
  max-width: 150px;
  box-shadow: 0 4px 0 #262626;
}

.hero-section .custom-form button[type="submit"]:hover {
  background: var(--white-color);
  border-color: #262626;
}


/*---------------------------------------
  SITE FOOTER              
-----------------------------------------*/
.site-footer {
  border-bottom: 10px solid var(--secondary-color);
  position: relative;
}

.site-footer::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 200px 200px;
  border-color: transparent transparent var(--secondary-color) transparent;
  pointer-events: none;
}

.site-footer-title {
  color: var(--primary-color); 
}

.site-footer .dropdown-menu {
  padding: 0;
}

.site-footer .dropdown-item {
  color: var(--p-color);
  font-size: var(--menu-font-size);
  font-weight: var(--font-weight-medium);
  padding: 4px 18px;
}

.site-footer .dropdown-item:hover {
  background-color: transparent;
  color: var(--primary-color);
}

.site-footer .dropdown-menu li:first-child .dropdown-item {
  padding-top: 10px;
}

.site-footer .dropdown-menu li:last-child .dropdown-item {
  padding-bottom: 12px;
}

.site-footer .dropdown-toggle {
  background-color: var(--secondary-color);
  border-color: var(--white-color);
}

.site-footer .dropdown-toggle:hover {
  background-color: var(--primary-color);
  border-color: transparent;
}

.site-footer-links {
  padding-left: 0;
}

.site-footer-link-item {
  display: block;
  list-style: none;
  line-height: normal;
}

.site-footer-link {
  color: var(--secondary-color);
  font-size: var(--copyright-font-size);
  font-weight: var(--font-weight-medium);
  line-height: normal;
}

.copyright-text {
  font-size: var(--copyright-font-size);
}


/*---------------------------------------
  SOCIAL ICON               
-----------------------------------------*/
.social-icon {
  margin: 0;
  padding: 0;
}

.social-icon-item {
  list-style: none;
  display: inline-block;
  vertical-align: top;
}

.social-icon-link {
  background: var(--secondary-color);
  border-radius: var(--border-radius-large);
  color: var(--white-color);
  font-size: var(--copyright-font-size);
  display: block;
  margin-right: 10px;
  text-align: center;
  width: 35px;
  height: 35px;
  line-height: 36px;
  transition: background 0.2s, color 0.2s;
}

.social-icon-link:hover {
  background: var(--primary-color);
  color: var(--white-color);
}


/*---------------------------------------
  RESPONSIVE STYLES               
-----------------------------------------*/
@media screen and (max-width: 991px) {
  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 36px;
  }

  h3 {
    font-size: 32px;
  }

  h4 {
    font-size: 28px;
  }

  h5 {
    font-size: 20px;
  }

  h6 {
    font-size: 18px;
  }

  .section-padding {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .explore-section {
    padding-top: 40px;
  }
  
  .navbar {
    background-color: var(--secondary-color);
  }

  .navbar-nav .dropdown-menu {
    position: relative;
    left: 10px;
    opacity: 1;
    pointer-events: auto;
    max-width: 155px;
    margin-top: 10px;
    margin-bottom: 15px;
  }

  .navbar-expand-lg .navbar-nav {
    padding-bottom: 20px;
  }

  .navbar-expand-lg .navbar-nav .nav-link {
    padding: 0;
  }

  .nav-tabs .nav-link:first-child {
    margin-right: 5px;
  }

  .nav-tabs .nav-link {
    font-size: var(--copyright-font-size);
    padding: 10px;
  }


  .custom-block-topics-listing .custom-block-image {
    width: auto;
  }

  .custom-block-topics-listing > .d-flex,
  .custom-block-topics-listing-info,
  .custom-block-topics-listing a {
    flex-direction: column;
  }

  .timeline-container .vertical-scrollable-timeline .list-progress {
    height: 75%;
  }

  .timeline-container .vertical-scrollable-timeline li {
    padding-left: 135px;
  }

  .subscribe-form-wrap {
    padding-top: 30px;
    padding-bottom: 0;
  }
}

@media screen and (max-width: 480px) {
  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 26px;
  }

  h4 {
    font-size: 22px;
  }

  h5 {
    font-size: 20px;
  }
}

/* ==================== Testimonials (snip1139) — CLEAN ==================== */
.snip1139{
  font-family: var(--body-font-family);
  position: relative;
  overflow: hidden;          /* keeps corners crisp */
  margin: 10px 0;
  width: 100%;
  color: var(--dark-color);
  text-align: left;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-medium);
  box-shadow: 0 10px 24px var(--shadow-weak);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;

  /* NEW: make content flow naturally (no reserved bottom space) */
  display: flex;
  flex-direction: column;
}

.snip1139:hover{
  transform: translateY(-2px);
  border-color: var(--secondary-color);
  box-shadow: 0 16px 36px var(--shadow-strong);
}

.snip1139 *{
  box-sizing: border-box;
  transition: all .25s cubic-bezier(.25,.5,.5,.9);
}

/* Quote bubble */
.snip1139 blockquote{
  position: relative;
  background-color: var(--white-color);
  padding: 25px 50px;
  margin: 0;
  font-size: .95rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.7;
  font-style: italic;
  color: var(--p-color);
}
.snip1139 blockquote::before,
.snip1139 blockquote::after{
  content: "“";
  position: absolute;
  font-family: var(--title-font-family);
  font-size: 48px;
  line-height: 1;
  opacity: .12;
  color: var(--primary-color);
  font-style: normal;
}
.snip1139 blockquote::before{ top: 18px; left: 18px; }
.snip1139 blockquote::after { content: "”"; right: 18px; bottom: -6px; }

/* little triangle under the quote panel */
.snip1139 .arrow{
  position: absolute;
  top: 100%;
  width: 0; height: 0;
  border-left: 0 solid transparent;
  border-right: 25px solid transparent;
  border-top: 25px solid var(--white-color);
  margin: 0;
}

/* Image fills the space; no “white strip” */
.snip1139 img{
  width: 100%;
  aspect-ratio: 3 / 2;   /* consistent card height; remove if you want natural ratios */
  object-fit: cover;
  display: block;
  margin: 0;
  vertical-align: middle;
}

/* Author bar sits in normal flow (no absolute), so no padding hack needed */
.snip1139 .author{
  position: static;
  width: 100%;
  padding: 10px 25px 12px;
  margin: 0;
  background-color: var(--white-color);
  color: var(--dark-color);
  text-transform: uppercase;
  border-top: 1px solid var(--border-color);
}
.snip1139 .author h5{
  margin: 0;
  font-family: var(--title-font-family);
  font-weight: var(--font-weight-bold);
  font-size: .95rem;
  color: var(--primary-color);
  letter-spacing: .2px;
  opacity: .95;
}
.snip1139 .author h5 span{
  display: inline-block;
  font-weight: var(--font-weight-medium);
  text-transform: none;
  padding-left: 6px;
  color: var(--p-color);
}

/* ================= TESTIMONIALS SLIDER — CLEAN ================= */

/* Tunables */
.reviews-viewport{
  --gap: 24px;                /* space between cards */
  --arrow-gutter: 96px;       /* side space reserved for arrows on desktop */
  position: relative;
  padding-left: var(--arrow-gutter);
  padding-right: var(--arrow-gutter);
  max-width: calc(1100px + 2 * var(--arrow-gutter));  /* 3 cards wide + gutters */
  margin: 0 auto;
  overflow: visible;          /* allows arrows to sit outside the track */
}

/* Track (flex-based, not grid) */
.reviews-track{
  display: flex;
  gap: var(--gap);
  padding: 2px;                              /* prevent box-shadow clipping */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  /* hide scrollbar but keep swipe */
  -ms-overflow-style: none;                  /* IE/Edge */
  scrollbar-width: none;                     /* Firefox */
}
.reviews-track::-webkit-scrollbar{ display: none; } /* Chrome/Safari */

/* 3 visible cards: 1/3 of width minus gaps */
.reviews-track > .snip1139{
  flex: 0 0 calc((100% - 2 * var(--gap)) / 3);
  scroll-snap-align: start;
}

/* Arrows */
.nav-btn{
  position: absolute;
  top: 58%;                                   /* slightly lower—aligns with photos */
  transform: translateY(-50%);
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white-color);
  border: 2px solid var(--white-color);
  box-shadow: 0 8px 18px var(--shadow-mid);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: .9;
  transition: transform .15s ease, background .15s ease, opacity .2s;
}
.nav-prev{ left: 24px; }
.nav-next{ right: 24px; }
.nav-prev:hover{ transform: translate(-2px,-50%) scale(1.05); }
.nav-next:hover{ transform: translate( 2px,-50%) scale(1.05); }

/* Ultra-wide: push arrows out a bit more */
@media (min-width: 1400px){
  .reviews-viewport{ --arrow-gutter: 120px; }
  .nav-prev{ left: 28px; }
  .nav-next{ right: 28px; }
}

/* Phones/Tablets: exactly 1 card per view, arrows still visible */
@media (max-width: 900px){
  .reviews-viewport{
    --arrow-gutter: 80px;               /* smaller gutters on mobile */
    max-width: 100%;
  }
  .reviews-track > .snip1139{
    flex-basis: 100%;                   /* show 1 card */
  }
  .nav-btn{
    width: 40px; height: 40px;
    top: 56%;
  }
  .nav-prev{ left: 8px; }
  .nav-next{ right: 8px; }
}
/* ================= /TESTIMONIALS SLIDER — CLEAN ================= */
/* Footer */
footer.mt-auto {
  background-color: #FFD9EF;
  color: #262626;
  padding: 200px 0 3rem;
  position: relative;
  overflow: hidden;
}

footer.mt-auto .container {
  position: relative;
  z-index: 1;
}

.footer-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
}

footer.simple-footer {
  padding: 3rem 0;
}

.footer-link {
  color: #262626;
  text-decoration: underline;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--secondary-color);
}

.social-icons a {
  font-size: 1.25rem;
  color: #262626;
  display: inline-block;
  transition: color 0.2s, transform 0.2s;
  text-decoration: none;
}

.social-icons a:hover {
  color: var(--secondary-color);
  transform: scale(1.2);
}

.share-wrapper {
  position: relative;
  display: inline-block;
}

.share-popup {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  background-color: var(--white-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  gap: 0.5rem;
  z-index: 1000;
}

.share-wrapper.show .share-popup {
  display: flex;
}

.share-popup a {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.share-popup a:hover {
  color: var(--secondary-color);
}

/* Video thumbnail hover titles */
.topics-detail-section .ratio a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.topics-detail-section .ratio a::after {
  content: attr(data-title);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white-color);
  padding: 4px 8px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  text-align: center;
}

.topics-detail-section .ratio a:hover::after {
  opacity: 1;
}

/*---------------------------------------
  MODALS
-----------------------------------------*/
.tool-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  backdrop-filter: blur(0px);
}

.tool-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(2px);
}

.tool-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 160ms ease;
}

.tool-modal.is-visible .tool-modal-overlay {
  opacity: 1;
}

.tool-modal-dialog {
  position: relative;
  width: min(1400px, 100%);
  height: min(750px, calc(100vh - 24px));
  max-width: 1400px;
  max-height: calc(100vh - 24px);
  background: #ffffff;
  border-radius: 22px;
  box-shadow:
    0 30px 120px rgba(0, 0, 0, 0.2),
    0 16px 50px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
}

#toolEmptyModal .tool-modal-dialog {
  background: #ffffff;
  box-shadow: none;
}

.tool-modal.is-visible .tool-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.tool-modal-close {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}

.tool-modal-close:hover,
.tool-modal-close:focus-visible {
  background: rgba(15, 23, 42, 0.12);
}

.tool-modal-close:active {
  transform: scale(0.97);
}

.tool-modal-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  height: 100%;
}

.tool-modal-layout {
  display: flex;
  flex: 1 1 auto;
  gap: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 16px;
  overflow: hidden;
  background: #f5f6fb;
}

#toolEmptyModal .tool-modal-layout {
  border: none;
  background: transparent;
}

.tool-modal-menu {
  width: 300px;
  background: linear-gradient(180deg, rgba(120, 61, 210, 0.06) 0%, rgba(120, 61, 210, 0.03) 100%);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  padding: 14px;
  overflow-y: auto;
}

.tool-modal-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.tool-modal-menu-item {
  width: 260px;
  min-width: 260px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
  transition: background-color 140ms ease, transform 120ms ease;
}

.tool-modal-menu-select {
  flex: 1;
  height: 36px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  color: inherit;
  font-weight: 600;
  font-family: var(--body-font-family);
  cursor: pointer;
}

.tool-modal-menu-item.is-active {
  background: rgba(120, 61, 210, 0.16);
  color: #4b1f9c;
}

.tool-modal-menu-item:hover:not(.is-active),
.tool-modal-menu-item:focus-visible:not(.is-active) {
  background: rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.tool-modal-save-btn.video-fav-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 0;
  margin-left: auto;
}

.tool-modal-save-btn.video-fav-btn i {
  font-size: 1.05rem;
}

.tool-modal-save-btn.video-fav-btn.is-fav {
  color: #6b34c4;
}

.tool-modal-save-btn.video-fav-btn.is-fav i {
  color: #6b34c4;
}

.tool-modal-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  padding: 24px;
  height: 100%;
}

.tool-modal-scroll {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding: 0;
  scroll-behavior: smooth;
  background: transparent;
  display: block;
  margin-top: auto;
  margin-bottom: auto;
  width: 100%;
  height: 100%;
}

.tool-modal-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.tool-modal-frame.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tool-modal-frame.is-loading {
  opacity: 0.7;
}

.tool-modal-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  display: block;
}

.tool-modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 246, 251, 0.92);
  z-index: 2;
}

.tool-modal-skeleton {
  width: min(720px, 90%);
  display: grid;
  gap: 12px;
}

.tool-modal-skeleton-bar {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.3), rgba(148, 163, 184, 0.45), rgba(203, 213, 225, 0.3));
  background-size: 200% 100%;
  animation: tool-skeleton 1.4s ease infinite;
}

.tool-modal-skeleton-bar.is-title {
  height: 18px;
  width: 60%;
}

.tool-modal-skeleton-bar.is-short {
  width: 40%;
}

html.profile-modal-open,
body.profile-modal-open {
  overflow: hidden;
  height: 100%;
}

.profile-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2000;
  overscroll-behavior: contain;
}

.profile-modal-card {
  background: var(--white-color);
  border-radius: 20px;
  padding: 18px 20px 20px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.profile-modal-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.profile-modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--p-color);
}

.profile-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--p-color);
}

.profile-field input,
.profile-field textarea,
.profile-field select {
  border-radius: 12px;
  border: 1px solid rgba(107, 52, 196, 0.25);
  padding: 10px 12px;
  font-size: 14px;
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 16px;
  background: #7c3aed;
  color: #fff;
  border: 1px solid transparent;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  font-size: 13px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.profile-action-btn:hover {
  background: #6d28d9;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.25);
  transform: translateY(-1px);
}

.profile-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.profile-modal-actions .profile-action-btn {
  background: #7c3aed;
  color: #ffffff;
  border: 1px solid transparent;
}

.profile-modal-actions .profile-action-btn:hover {
  background: #6d28d9;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.25);
}

.profile-report-submit {
  font-size: 13px;
  padding: 8px 14px;
}

body.dark-mode .profile-modal-card,
.play-body.dark-mode .profile-modal-card {
  background: #111827;
  color: #e2e8f0;
}

body.dark-mode .profile-modal-close,
.play-body.dark-mode .profile-modal-close {
  color: #e2e8f0;
}

@keyframes tool-skeleton {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

body.tool-modal-open .content-scroll {
  overflow: hidden;
}

.play-body.dark-mode .tool-modal-dialog,
body.dark-mode .tool-modal-dialog,
.play-body.dark-mode #toolEmptyModal .tool-modal-dialog,
body.dark-mode #toolEmptyModal .tool-modal-dialog {
  background: #0f172a;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.65),
    0 12px 30px rgba(0, 0, 0, 0.4);
}

.play-body.dark-mode .tool-modal-layout,
body.dark-mode .tool-modal-layout {
  border-color: rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.play-body.dark-mode .tool-modal-menu,
body.dark-mode .tool-modal-menu {
  background: rgba(12, 18, 30, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .tool-modal-menu-item,
body.dark-mode .tool-modal-menu-item {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.play-body.dark-mode .tool-modal-menu-item.is-active,
body.dark-mode .tool-modal-menu-item.is-active {
  background: rgba(139, 92, 246, 0.32);
  color: #f4f4f5;
}

.play-body.dark-mode .tool-modal-menu-item:hover:not(.is-active),
.play-body.dark-mode .tool-modal-menu-item:focus-visible:not(.is-active),
body.dark-mode .tool-modal-menu-item:hover:not(.is-active),
body.dark-mode .tool-modal-menu-item:focus-visible:not(.is-active) {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.play-body.dark-mode .tool-modal-main,
body.dark-mode .tool-modal-main {
  background: #0b1220;
}

.play-body.dark-mode .tool-modal-scroll,
body.dark-mode .tool-modal-scroll {
  background: #0b1220;
}

.play-body.dark-mode .tool-modal-save-btn.video-fav-btn,
body.dark-mode .tool-modal-save-btn.video-fav-btn {
  color: rgba(226, 232, 240, 0.75);
}

.play-body.dark-mode .tool-modal-save-btn.video-fav-btn:hover,
.play-body.dark-mode .tool-modal-save-btn.video-fav-btn:focus-visible,
body.dark-mode .tool-modal-save-btn.video-fav-btn:hover,
body.dark-mode .tool-modal-save-btn.video-fav-btn:focus-visible {
  color: #d8b4fe;
}

.play-body.dark-mode .tool-modal-close,
body.dark-mode .tool-modal-close {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.play-body.dark-mode .tool-modal-close:hover,
.play-body.dark-mode .tool-modal-close:focus-visible,
body.dark-mode .tool-modal-close:hover,
body.dark-mode .tool-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 1023px) {
  .tool-modal {
    align-items: stretch;
    padding: 0;
  }

  .tool-modal-dialog {
    width: 100%;
    max-width: none;
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
  }

  .tool-modal-body {
    padding: 12px;
  }

  .tool-modal-main {
    padding: 12px;
  }

  .tool-modal-scroll {
    max-height: calc(100vh - 72px);
  }

  .tool-modal-layout {
    flex-direction: column;
  }

  .tool-modal-menu {
    display: none;
  }

  .tool-modal-menu-list {
    display: none;
  }

  .tool-modal-menu-item {
    display: none;
  }
}

/*---------------------------------------
  HERO CTA
-----------------------------------------*/
.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 340px;
  padding: 22px 56px;
  border-radius: 999px;
  background: #ffd335;
  color: #262626;
  border: 2px solid #262626;
  box-shadow: 0 4px 0 #262626;
  font-family: var(--title-font-family);
  font-weight: var(--font-weight-bold);
  font-size: 30px;
  letter-spacing: 0.12px;
  line-height: 1.05;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
  animation: heroCtaIdle 4s ease-in-out infinite;
  will-change: transform, box-shadow;
}

.hero-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255, 211, 53, 0.45), rgba(255, 211, 53, 0));
  filter: blur(12px);
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
  animation: heroCtaGlow 4s ease-in-out infinite;
}

.hero-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0) 80%);
  transform: skewX(-15deg);
  opacity: 0;
  pointer-events: none;
  animation: heroCtaShine 3s ease-in-out infinite;
}

.hero-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 211, 53, 0.32), 0 10px 0 #262626;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #262626;
  color: #262626;
  background: #ffffff;
  animation-play-state: paused;
}

.hero-cta:hover::before,
.hero-cta:focus-visible::before {
  opacity: 0;
  animation: none;
}

.hero-cta:active {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #262626;
  color: #262626;
  background: #ffffff;
  animation-play-state: paused;
}

.hero-note {
  font-size: 0.95rem;
}

/*---------------------------------------
  BENEFITS STRIP
-----------------------------------------*/
.benefits-section {
  position: relative;
  z-index: 1;
  padding: 50px 0 120px;
  background-color: #ffd335;
}

.benefits-section.is-fading {
  opacity: 0;
  pointer-events: none;
}


.benefits-title {
  color: var(--secondary-color);
  font-size: 36px;
  margin-bottom: 10px;
}

.benefits-subtitle {
  color: var(--p-color);
  margin-bottom: 32px;
}

.benefit-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.benefit-item {
  padding: 10px;
}

.burst-badge {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  background: #ffd335;
  border: 2px solid #262626;
  border-radius: 50%;
  box-shadow: 0 6px 0 #262626, 0 18px 32px rgba(0, 0, 0, 0.14);
  animation: benefitFloat 4s ease-in-out infinite;
  will-change: transform;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.burst-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.burst-title {
  color: #3a2f74;
  font-size: 19px;
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  text-transform: none;
  max-width: 160px;
  }
.burst-desc {
}

.burst-icon {
  color: #262626;
  font-size: 38px;
  margin-bottom: 8px;
}

.burst-icon-img {
  display: block;
  width: 88px;
  height: auto;
  margin: 0 auto 10px auto;
  border-radius: 18px;
}

@media (max-width: 767.98px) {
  .burst-badge {
    width: 180px;
    height: 180px;
    border-width: 2px;
    border-radius: 50%;
  }

  .burst-title {
    font-size: 17px;
    max-width: 140px;
  }

  .burst-desc {
    font-size: 13px;
    max-width: 140px;
  }
}

.benefits-section .col-6:nth-child(2) .burst-badge { animation-delay: 0.15s; }
.benefits-section .col-6:nth-child(3) .burst-badge { animation-delay: 0.3s; }
.benefits-section .col-6:nth-child(4) .burst-badge { animation-delay: 0.45s; }

.burst-badge:hover,
.burst-badge:focus-visible {
  background: #ffffff;
  box-shadow: 0 8px 0 #262626, 0 22px 38px rgba(0, 0, 0, 0.16);
}

.benefit-link:focus-visible .burst-badge {
  background: #ffffff;
  box-shadow: 0 8px 0 #262626, 0 22px 38px rgba(0, 0, 0, 0.16);
}

@keyframes benefitFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes heroCtaIdle {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 4px 0 #262626;
  }
  50% {
    transform: translateY(-4px);
    box-shadow: 0 8px 0 #262626;
  }
}

@keyframes heroCtaGlow {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.06);
  }
}

@keyframes heroCtaShine {
  0% {
    left: -30%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  50% {
    left: 100%;
    opacity: 0;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/*---------------------------------------
  APP SHELL
-----------------------------------------*/
.app-shell {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
}

.app-main {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.app-sidebar {
  background: transparent;
  border: 0;
  border-radius: 0 18px 18px 0;
  padding: 12px 7px 10px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  align-items: stretch;
  position: fixed;
  top: var(--app-shell-pad);
  left: 0;
  height: calc(100vh - (var(--app-shell-pad) * 2));
  min-height: 0;
  width: var(--app-sidebar-width);
  z-index: 20;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: stretch;
}

.app-nav-link {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--sidebar-text);
  padding: 7px 4px;
  border-radius: 9px;
  font-weight: 300;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.app-nav-link:hover,
.app-nav-link:focus-visible {
  color: var(--sidebar-accent);
  outline: none;
  background: var(--sidebar-hover-bg);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.05);
}

.app-nav-link.active {
  color: var(--sidebar-accent-strong);
  background: var(--sidebar-active-bg);
  box-shadow: 0 6px 14px rgba(120, 61, 210, 0.12);
}

.app-nav-icon {
  font-family: 'Phosphor Icons', sans-serif;
  font-size: 21px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  line-height: 1;
}

.app-nav-label {
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.app-sidebar-system {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 13px;
}

.sidebar-hamburger {
  display: none;
}

.sidebar-create {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--sidebar-accent-strong);
  font-weight: 500;
  outline: none;
  gap: 8px;
}

.sidebar-create-circle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--sidebar-accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 24px rgba(120, 61, 210, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.sidebar-create:hover .sidebar-create-circle,
.sidebar-create:focus-visible .sidebar-create-circle {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px rgba(120, 61, 210, 0.32);
  outline: none;
  border: 0;
}

.sidebar-create:active .sidebar-create-circle {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 8px 18px rgba(120, 61, 210, 0.25);
}

.sidebar-create:focus-visible {
  box-shadow: 0 0 0 3px rgba(120, 61, 210, 0.35);
  border-radius: 14px;
}

.sidebar-create:focus-visible .sidebar-create-label {
  box-shadow: 0 0 0 3px rgba(120, 61, 210, 0.35);
  border-radius: 12px;
}

.sidebar-create-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--sidebar-accent-strong);
  white-space: nowrap;
  margin-top: 6px;
}

.sidebar-spacer {
  flex: 1 1 auto;
}

.sidebar-icon {
  font-family: 'Phosphor Icons', sans-serif;
  font-size: 22px;
  line-height: 1;
}

.sidebar-create-circle .sidebar-icon {
  font-size: 20px;
}

.sidebar-icon-btn .app-nav-icon,
.sidebar-icon-btn .sidebar-icon {
  font-size: 19px;
  width: 19px;
  height: 19px;
}

.sidebar-avatar-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  background: #fff;
  overflow: hidden;
  transition: box-shadow 160ms ease, filter 160ms ease;
}

.sidebar-avatar-wrap img.play-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.sidebar-avatar-wrap:hover {
  box-shadow: 0 0 0 5px rgba(120, 61, 210, 0.16), 0 6px 12px rgba(0, 0, 0, 0.12);
}

.sidebar-avatar-wrap:hover img.play-avatar {
  filter: brightness(1.05);
}

.play-body.dark-mode .sidebar-avatar-wrap {
  background: #1f1630;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.24);
}

.app-sidebar-system .app-nav-label {
  display: none;
}

.app-sidebar-system .sidebar-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--dark-color);
}

.sidebar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3ebff;
  color: var(--secondary-color);
  font-weight: var(--font-weight-semibold);
}

.sidebar-profile-text {
  display: none;
}

.content-panel {
  --content-horizontal-gap: var(--main-layer-gap);
  position: relative;
  box-sizing: border-box;
  width: min(var(--app-shell-max), calc(100% - (var(--app-sidebar-width) + var(--app-shell-gap) + var(--app-shell-pad) + 8px)));
  margin-left: calc(var(--app-sidebar-width) + var(--app-shell-gap));
  margin-top: 8px;
  height: calc(100vh - 8px - var(--bottom-nav-height));
  min-height: calc(100vh - 8px - var(--bottom-nav-height));
  max-height: calc(100vh - 8px - var(--bottom-nav-height));
  display: flex;
  flex-direction: column;
  background-color: #FCF9FF;
  border: 0;
  border-radius: 18px 18px 0 0;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.08),
    0 0 24px rgba(0, 0, 0, 0.05);
  padding: var(--content-panel-pad-top) var(--content-horizontal-gap) calc(var(--content-panel-pad-bottom) + var(--bottom-nav-height) + var(--content-bottom-gap));
  overflow: hidden;
  z-index: 1;
}

.content-scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 20px;
  padding-left: var(--content-horizontal-gap);
  padding-right: var(--content-horizontal-gap);
  padding-bottom: calc(var(--content-panel-pad-bottom) + var(--bottom-nav-height));
  margin-left: 0;
  margin-right: 0;
  background-color: #FCF9FF;
  background-image:
    radial-gradient(120% 120% at 0% 0%, #C7E9FF 0%, rgba(199, 233, 255, 0) 60%),
    radial-gradient(120% 120% at 100% 0%, #D5C4FF 0%, rgba(213, 196, 255, 0) 60%),
    linear-gradient(180deg, #FCF9FF 0%, #FCF9FF 100%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 100% 420px, 100% 420px, 100% 420px;
  background-position: top left, top right, top center;
  overflow-y: auto;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
}

.content-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.content-scroll::after {
  content: "";
  display: block;
  height: var(--content-bottom-gap);
  flex-shrink: 0;
}

.mobile-profile-anchor {
  display: none;
}

.mobile-topbar {
  display: none;
}

.play-hero-page {
  --content-panel-pad-top: 0;
  --play-hero-gap: 20px;
}

.play-hero-page .content-scroll {
  padding-top: var(--play-hero-gap);
  gap: 0;
}

.play-hero-page .play-hero {
  padding: 0 0 6px;
  margin-top: 0;
  margin-bottom: 7px;
}

.play-hero-page .videos-search-section {
  padding-top: 12px;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bottom-nav-height);
  display: none;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  z-index: 40;
}

.mobile-bottom-nav .mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  height: 100%;
}

.mobile-bottom-nav .mobile-nav-item {
  width: 100%;
  height: 100%;
  justify-content: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 12px;
  text-align: center;
}

.mobile-bottom-nav .mobile-nav-item .app-nav-icon {
  font-size: 22px;
}

.mobile-bottom-nav .mobile-nav-label {
  font-size: 12px;
  line-height: 1.2;
}

.theme-dark .app-sidebar {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.theme-dark .content-panel {
  background: #171227;
  border-color: transparent;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(0, 0, 0, 0.3);
  color: #e9e6f8;
}

.theme-dark .app-nav-link {
  color: #e9e6f8;
}

.theme-dark .app-nav-link.active {
  color: var(--secondary-color);
}

.theme-dark .sidebar-avatar {
  background: #2a1e40;
  color: #e9e6f8;
}

.theme-dark .play-hero-title {
  color: #e9e6f8;
}

.theme-dark .play-hero {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.theme-dark .play-hero-search {
  background: rgba(33, 27, 50, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.theme-dark .play-hero-search:focus-within {
  border-color: rgba(107, 52, 196, 0.5);
  box-shadow:
    0 0 0 3px rgba(107, 52, 196, 0.35),
    0 18px 36px rgba(0, 0, 0, 0.35);
  background: rgba(33, 27, 50, 0.94);
}

.theme-dark .play-hero-input {
  color: #e9e6f8;
}

.theme-dark .play-hero-input::placeholder {
  color: #a8b0c8;
}

.theme-dark .play-hero-icon,
.theme-dark .play-hero-addon {
  color: #a8b0c8;
}

.theme-dark .play-hero-addon:hover {
  background: rgba(107, 52, 196, 0.15);
  color: #e9e6f8;
}

@media (max-width: 1100px) {
  :root {
    --app-shell-pad: 24px;
    --app-shell-gap: 20px;
    --content-panel-pad: 24px;
  }
}

@media (max-width: 900px) {
  :root {
    --app-shell-pad: 16px;
    --app-shell-gap: 16px;
    --content-panel-pad: 20px;
    --content-panel-pad-top: 22px;
    --content-panel-pad-bottom: 28px;
  }

  .content-panel {
    padding: var(--content-panel-pad-top) var(--content-horizontal-gap) calc(var(--content-panel-pad-bottom) + var(--bottom-nav-height) + var(--content-bottom-gap));
  }
}

@media (max-width: 640px) {
  :root {
    --app-shell-pad: 12px;
    --app-shell-gap: 14px;
    --content-panel-pad: 18px;
    --content-panel-pad-top: 18px;
    --content-panel-pad-bottom: 18px;
  }

  .content-panel {
    padding: var(--content-panel-pad-top) var(--content-horizontal-gap) calc(var(--content-panel-pad-bottom) + var(--bottom-nav-height) + var(--content-bottom-gap));
  }
}

@media (max-width: 1023px) {
  :root {
    --bottom-nav-height: 78px;
    --content-panel-pad-bottom: 0px;
    --content-bottom-gap: 0px;
  }

  .app-shell {
    flex-direction: column;
  }

  .app-sidebar {
    display: none;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  .content-panel {
    margin-left: 0;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - var(--bottom-nav-height));
    min-height: calc(100vh - var(--bottom-nav-height));
    max-height: calc(100vh - var(--bottom-nav-height));
    padding: var(--content-panel-pad-top) 0 calc(var(--content-panel-pad-bottom) + var(--content-bottom-gap));
  }

  .content-scroll {
    padding-left: var(--content-horizontal-gap);
    padding-right: var(--content-horizontal-gap);
    margin-left: 0;
    margin-right: 0;
    padding-bottom: var(--content-panel-pad-bottom);
  }

  .content-scroll::after {
    height: 0;
  }

  .mobile-profile-anchor {
    display: block;
    position: absolute;
    top: calc(12px + 8px + env(safe-area-inset-top, 0px));
    left: calc(12px + 10px + env(safe-area-inset-left, 0px));
    right: auto;
    z-index: 6;
  }

  .mobile-profile-anchor .play-profile {
    width: 40px;
    height: 40px;
  }

  .mobile-profile-anchor .play-profile-avatar-btn {
    width: 40px;
    height: 40px;
  }

  .mobile-profile-anchor .sidebar-avatar-wrap {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
  }

  .mobile-profile-anchor .play-profile-menu {
    top: calc(100% + 10px);
    bottom: auto;
    right: auto;
    left: 0;
  }

  .mobile-topbar .play-profile-menu {
    top: calc(100% + 10px);
    bottom: auto;
    right: auto;
    left: 0;
  }

  .mobile-topbar {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
    z-index: 12;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .mobile-topbar.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-topbar .mobile-topbar-avatar-slot {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-topbar .play-profile {
    width: 40px;
    height: 40px;
    margin: 0;
  }

  .mobile-topbar .play-profile-avatar-btn {
    width: 40px;
    height: 40px;
    box-shadow: none;
  }

  .mobile-topbar .sidebar-avatar-wrap {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
  }

  .mobile-topbar .mobile-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }

  .mobile-topbar .mobile-topbar-btn {
    width: 40px;
    height: 40px;
  }

  .mobile-topbar .mobile-topbar-auth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    transition: color 200ms ease, transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background 200ms ease;
  }

  .mobile-topbar .mobile-topbar-auth i {
    font-size: 16px;
  }

  .mobile-topbar .mobile-topbar-auth-label {
    white-space: nowrap;
  }

  .mobile-topbar .mobile-topbar-auth:hover {
    transform: translateY(-1px);
    color: var(--secondary-color);
  }

  .mobile-topbar .mobile-topbar-auth:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 52, 196, 0.35);
  }

  .play-body.dark-mode .mobile-topbar {
    background: #1f1630;
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  }

  .play-body.dark-mode .mobile-topbar .mobile-topbar-auth {
    background: rgba(30, 23, 46, 0.9);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e9e6f8;
  }

  .play-body.dark-mode .mobile-topbar .mobile-topbar-auth:hover {
    color: #fff;
  }

  .lesson-hero-cta-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lesson-hero-cta,
  .lesson-hero-cta.play,
  .lesson-hero-cta.slideshow,
  .lesson-hero-cta.study,
  .lesson-hero-cta.materials,
  .lesson-hero-cta.publish {
    width: 100%;
    min-width: 0;
    font-size: 14px;
    padding: 12px 10px;
    min-height: 56px;
  }

  .lesson-hero-cta.materials {
    white-space: normal;
    line-height: 1.2;
    font-size: 13px;
  }

  .lesson-hero-cta-wrap {
    width: 100%;
  }

  .lesson-hero-cta-wrap .lesson-hero-cta {
    width: 100%;
    height: 100%;
  }

  .lesson-hero-cta-row.is-private-lesson .lesson-hero-cta,
  .lesson-hero-cta-row.is-private-lesson .lesson-hero-cta-wrap {
    width: 100% !important;
  }

  .lesson-stepper-item:not(:last-child) .lesson-stepper-dot::after {
    display: none;
  }
}

/*---------------------------------------
  PLAY HUB
-----------------------------------------*/
.play-body {
  background: linear-gradient(135deg, #f7f3ff 0%, #fdfbff 100%);
  color: var(--p-color);
}

.app-sidebar > nav.sidebar-nav {
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  width: 100%;
  padding-bottom: 13px;
}

.sidebar-footer .play-profile {
  margin-top: 8px;
}

.sidebar-footer .play-profile-avatar-btn {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.play-overflow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-icon-btn:hover,
.sidebar-icon-btn:focus-visible {
  box-shadow: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 13px;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  flex: 0 0 auto;
  padding-top: 4px;
  padding-inline: 4px;
  margin-top: 14px;
  margin-bottom: 21px;
}

.sidebar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--sidebar-text);
  font-weight: var(--font-weight-semibold);
  box-shadow: none;
  cursor: pointer;
  transition: color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  margin: 0;
}

.sidebar-icon-btn:hover {
  transform: translateY(-1px);
  color: var(--secondary-color);
}

.sidebar-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 52, 196, 0.35);
}

.sidebar-circle {
  border-radius: 50%;
}

.play-profile {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.sidebar-footer .play-profile {
  align-self: center;
}

.play-profile-avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  margin: 0 auto;
  overflow: hidden;
}

.play-profile-avatar-btn:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.play-profile-avatar-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.play-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 0;
  box-shadow: none;
  display: block;
}

.play-profile-name,
.play-profile-hint {
  display: none;
}

.play-profile-menu {
  position: absolute;
  bottom: 0;
  left: calc(100% + 12px);
  min-width: 220px;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 18px 40px var(--shadow-strong);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 15;
}

.play-account-menu {
  min-width: 280px;
  padding: 0;
  overflow: hidden;
}

.play-account-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}

.play-account-section + .play-account-section {
  border-top: 1px solid rgba(90, 74, 131, 0.14);
}

.play-account-action {
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.play-account-action:hover,
.play-account-action:focus-visible {
  background: rgba(107, 52, 196, 0.08);
}

.play-account-header {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.play-account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(124, 58, 237, 0.18);
  background: rgba(124, 58, 237, 0.08);
}

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

.play-account-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.play-account-name {
  font-weight: var(--font-weight-semibold);
  color: var(--dark-color);
  font-size: 15px;
}

.play-account-email {
  font-size: 12px;
  color: var(--p-color);
}

.play-account-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.play-account-link i {
  font-size: 18px;
}

.play-menu-link {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--dark-color);
  font-weight: var(--font-weight-medium);
}

.play-menu-link:hover {
  background: rgba(107, 52, 196, 0.08);
  color: var(--secondary-color);
}

.play-menu-link-danger {
  color: #b71c1c;
}

.play-main-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.play-main-tabs.sidebar-nav {
  justify-content: flex-start;
  align-items: stretch;
}

.sidebar-nav .play-tab {
  width: 100%;
  justify-content: center;
  border-radius: 10px;
  box-shadow: none;
  border: 0;
  background: transparent;
  text-align: left;
  flex-direction: column;
  gap: 8px;
  color: var(--sidebar-text);
  padding: 8px 5px;
  min-height: 0;
  margin: 0;
  align-items: center;
}

.sidebar-nav .play-tab:hover,
.sidebar-nav .play-tab:focus-visible,
.sidebar-nav .play-tab.active {
  background: var(--sidebar-hover-bg);
  border: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  color: var(--sidebar-accent);
}

.sidebar-nav .play-tab i {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
}

.sidebar-nav .play-tab span {
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
}

.sidebar-nav .play-tab.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-accent-strong);
  font-weight: 600;
}

.play-theme-toggle {
  border-radius: 50%;
}

.play-body.dark-mode .play-theme-toggle {
  background: #241a3a;
  border-color: #3b2c52;
  color: #e9e6f8;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.play-theme-label {
  white-space: nowrap;
}

.play-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 7px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--sidebar-text);
  font-weight: 300;
  box-shadow: none;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 180ms ease;
  gap: 8px;
  flex-direction: column;
}

.play-tab:hover {
  transform: translateY(-1px);
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.play-tab.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-accent-strong);
  border: 0;
  box-shadow: 0 10px 24px rgba(120, 61, 210, 0.12);
}

.play-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(120, 61, 210, 0.35);
}

.play-hero {
  width: 100%;
  padding: 20px 0 16px;
  margin-top: 70px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.play-hero-body {
  width: 100%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  text-align: center;
}

.play-hero-title {
  margin: 0;
  font-size: 2.8rem;
  font-family: var(--title-font-family);
  font-weight: 700;
  background: linear-gradient(180deg, var(--brand-gradient-start) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--secondary-color);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Videos layout sections */
.videos-search-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 12px 0 16px;
}

.videos-search-section .play-hero-search {
  width: min(900px, 100%);
}

.videos-pills-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 20px;
}

.videos-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  align-items: start;
  justify-items: center;
  justify-content: center;
  transition: opacity 180ms ease, transform 180ms ease;
  order: 0;
}

.videos-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto;
  padding: 6px 16px 4px;
  width: 100%;
  align-items: center;
  justify-content: center;
  transition: opacity 180ms ease, transform 180ms ease;
  max-height: none;
  overflow: hidden;
  order: 1;
}

.videos-tags-row .category-tag {
  cursor: pointer;
  box-shadow: none !important;
  border: 0 !important;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.videos-tags-row .category-tag:hover,
.videos-tags-row .category-tag:focus-visible {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 18px var(--shadow-weak) !important;
  outline: none;
}

.videos-tags-row.is-collapsed {
  max-height: 88px;
}

.videos-tags-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 0;
  background: transparent;
  border: 0;
  color: var(--secondary-color);
  font-family: var(--label-font-family);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  transition: transform 140ms ease, color 140ms ease;
  order: 2;
}

.videos-tags-toggle:hover,
.videos-tags-toggle:focus-visible {
  transform: translateY(-1px);
  color: var(--secondary-color);
  outline: none;
}

.is-hidden-soft {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

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

.videos-grid-section {
  width: 100%;
  padding-top: 8px;
}

.play-hero-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.play-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: 35px;
  min-height: 35px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.02),
    0 12px 28px rgba(0, 0, 0, 0.06);
  color: #6b7287;
  font-family: var(--body-font-family);
  font-weight: var(--font-weight-medium);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
  backdrop-filter: blur(6px);
}

.play-chip i {
  font-size: 1rem;
  color: #7c83a1;
  transition: color 180ms ease;
}

.play-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(107, 52, 196, 0.2);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.04),
    0 16px 32px rgba(0, 0, 0, 0.08);
}

.play-chip:active {
  transform: translateY(0) scale(0.985);
}

.play-chip:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(107, 52, 196, 0.2),
    0 16px 34px rgba(0, 0, 0, 0.12);
}

.play-chip-active {
  background: linear-gradient(135deg, rgba(107, 52, 196, 0.14), rgba(120, 61, 210, 0.12));
  border-color: rgba(120, 61, 210, 0.32);
  box-shadow:
    0 6px 16px rgba(120, 61, 210, 0.08),
    0 18px 40px rgba(120, 61, 210, 0.18);
  color: #5b3f99;
}

.play-chip-active i {
  color: var(--secondary-color);
}

.play-chip.play-chip-active:hover {
  background: linear-gradient(135deg, rgba(107, 52, 196, 0.14), rgba(120, 61, 210, 0.12));
  border-color: rgba(120, 61, 210, 0.32);
  box-shadow:
    0 6px 16px rgba(120, 61, 210, 0.08),
    0 18px 40px rgba(120, 61, 210, 0.18);
  color: #432675;
  transform: translateY(0);
}

.play-hero-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.06);
  transition: box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.play-hero-search:focus-within {
  border-color: rgba(107, 52, 196, 0.4);
  box-shadow:
    0 0 0 3px rgba(107, 52, 196, 0.22),
    0 18px 36px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.play-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.1rem;
}

.play-hero-input {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  font-family: var(--body-font-family);
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  color: var(--dark-color);
  padding: 4px 2px;
  outline: none;
  min-width: 0;
}

.play-hero-input::placeholder {
  color: #9ca3af;
}

.play-hero-addon {
  border: 0;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.play-hero-addon:hover {
  color: var(--secondary-color);
  background: rgba(107, 52, 196, 0.08);
}

.play-hero-addon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 52, 196, 0.25);
}

.play-hero-addon[disabled],
.play-hero-addon:disabled,
.play-hero-addon.is-disabled {
  cursor: not-allowed;
  color: #cbd5e1;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.play-hero-addon[disabled]:hover,
.play-hero-addon:disabled:hover,
.play-hero-addon.is-disabled:hover,
.play-hero-addon[disabled]:focus-visible,
.play-hero-addon:disabled:focus-visible,
.play-hero-addon.is-disabled:focus-visible {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.play-section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.play-section-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.play-section-title {
  margin: 0;
  font-size: 1.6rem;
  font-family: var(--title-font-family);
  font-weight: var(--font-weight-bold);
  color: var(--dark-color);
  line-height: 1.3;
}

.play-section-subtitle {
  margin: 0;
  color: var(--p-color);
  font-size: 1rem;
  font-family: var(--body-font-family);
  font-weight: var(--font-weight-medium);
  line-height: 1.6;
}

.play-section-meta {
  margin: 0;
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--secondary-color);
  font-family: var(--label-font-family);
}

.play-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

/* Ensure the main dashboard grid never stretches cards vertically (when in grid mode). */
#playGrid.play-grid {
  align-items: start;
}

#playGrid:not([data-category="videos"]) {
  --lesson-card-gap: 18px;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--lesson-card-gap);
}

.masonry-grid {
  position: relative;
  display: block !important;
  min-height: 1px;
  width: 100%;
}

.masonry-grid .masonry-item {
  position: absolute;
}

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

.add-videos-tool {
  width: 100%;
  margin: 0 auto 14px;
}

.add-videos-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid rgba(120, 61, 210, 0.12);
  background: #f0e9ff;
  box-shadow: 0 10px 24px var(--shadow-weak);
  max-width: 1180px;
  margin: 0 auto;
}

.add-videos-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.add-videos-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  color: var(--secondary-color);
  font-weight: var(--font-weight-semibold);
  font-family: var(--label-font-family);
  display: none;
}

.add-videos-title {
  margin: 0;
  font-size: 1.4rem;
  font-family: var(--title-font-family);
  font-weight: var(--font-weight-bold);
  color: var(--dark-color);
  line-height: 1.2;
}

.add-videos-subtitle {
  margin: 0;
  color: var(--p-color);
  font-size: 0.98rem;
  line-height: 1.45;
}

.add-videos-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-videos-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(120, 61, 210, 0.14);
  background: #fff;
  box-shadow: 0 10px 20px var(--shadow-weak);
  min-height: 52px;
}

.add-videos-icon {
  color: var(--secondary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  min-width: 20px;
}

.add-videos-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--body-font-family);
  background: transparent;
  color: var(--dark-color);
}

.add-videos-input input::placeholder {
  color: #8c8ca1;
}

.add-videos-submit {
  border: none;
  background: var(--secondary-color);
  color: #fff;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: var(--font-weight-semibold);
  font-family: var(--label-font-family);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.add-videos-submit:hover,
.add-videos-submit:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(120, 61, 210, 0.25);
}

.add-videos-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.add-videos-status {
  margin: 0;
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
  color: var(--p-color);
}

.add-videos-status-success {
  color: #1d7a45;
}

.add-videos-status-error {
  color: #b42318;
}

.add-video-toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.add-video-toast {
  min-width: 200px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  font-family: var(--body-font-family);
  font-size: 0.95rem;
  font-weight: var(--font-weight-semibold);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: auto;
}

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

.add-video-toast-success {
  border-left: 4px solid #22c55e;
}

.add-video-toast-error {
  border-left: 4px solid #ef4444;
}

.add-video-toast-muted,
.add-video-toast-info {
  border-left: 4px solid #783dd2;
}

.play-body.dark-mode .add-video-toast,
body.dark-mode .add-video-toast {
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.play-body.dark-mode .add-video-toast-success,
body.dark-mode .add-video-toast-success {
  border-left-color: #22c55e;
}

.play-body.dark-mode .add-video-toast-error,
body.dark-mode .add-video-toast-error {
  border-left-color: #ef4444;
}

.play-body.dark-mode .add-video-toast-muted,
.play-body.dark-mode .add-video-toast-info,
body.dark-mode .add-video-toast-muted,
body.dark-mode .add-video-toast-info {
  border-left-color: #a78bfa;
}

@media (max-width: 640px) {
  .add-videos-input {
    flex-direction: column;
    align-items: stretch;
  }

  .add-videos-submit {
    width: 100%;
    height: 48px;
  }
}

#playGrid[data-category="videos"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 16px;
  justify-items: stretch;
}

#playGrid[data-category="videos"][data-search-active="true"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

#playGrid[data-category="videos"][data-mine-view="true"] {
  grid-template-columns: 1fr;
  gap: 16px;
}

#playGrid[data-category="videos"][data-saved-view="true"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

#playGrid[data-category="videos"][data-search-active="true"] .video-cards-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#playGrid[data-category="videos"][data-mine-view="true"] .video-cards-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#playGrid[data-category="videos"][data-saved-view="true"] .video-cards-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#playGrid[data-category="videos"] .video-collections-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
  margin: 0 auto 16px;
  width: 100%;
  max-width: 1240px;
  overflow: hidden;
}

#playGrid[data-category="videos"] .video-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 16px;
}

.video-card.video-card-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100px;
  height: 100px;
  min-width: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: #1b1b25;
  text-decoration: none;
  border: 0;
  appearance: none;
  transition: transform 160ms ease, box-shadow 180ms ease;
}

.video-card.video-card-pill:hover,
.video-card.video-card-pill:focus-visible {
  transform: translateY(-2px);
  box-shadow: none;
  outline: none;
}

.video-card.video-card-pill .video-pill-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--pill-sheen, rgba(255, 255, 255, 0.4)), transparent 55%),
    var(--pill-color, #f9d9ff);
  box-shadow: 0 10px 20px var(--pill-shadow, rgba(0, 0, 0, 0.08));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card.video-card-pill:focus-visible .video-pill-circle {
  box-shadow:
    0 0 0 4px rgba(120, 61, 210, 0.25),
    0 12px 24px var(--pill-shadow, rgba(0, 0, 0, 0.1));
}

.video-card.video-card-pill .video-pill-title {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
  width: 100%;
}

.video-card.video-card-pill .video-pill-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.video-card.video-card-pill.is-active .video-pill-circle {
  box-shadow:
    0 0 0 4px rgba(120, 61, 210, 0.3),
    0 12px 26px var(--pill-shadow, rgba(0, 0, 0, 0.12));
  transform: translateY(-2px);
}

.video-card.video-card-pill.is-active .video-pill-title {
  color: #432675;
}

@media (max-width: 1080px) {
  .videos-pills-row {
    gap: 50px;
  }
}

@media (max-width: 768px) {
  .videos-pills-row {
    gap: 50px;
    padding: 0 10px;
  }
}

@media (max-width: 540px) {
  .videos-pills-row {
    gap: 50px;
  }
}

@media (max-width: 920px) {
  #playGrid[data-category="videos"][data-mine-view="true"] {
    grid-template-columns: 1fr;
  }
  #playGrid[data-category="videos"][data-mine-view="true"] .video-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #playGrid[data-category="videos"][data-mine-view="true"] {
    grid-template-columns: 1fr;
  }
  #playGrid[data-category="videos"][data-mine-view="true"] .video-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.play-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 18px 16px;
  color: var(--p-color);
  font-family: var(--body-font-family);
  font-weight: var(--font-weight-medium);
  border: 1px dashed var(--border-color);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px var(--shadow-weak);
}

.content-header {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

.content-action {
  text-decoration: none;
}

.content-action.icon-only {
  padding: 0 14px;
}

.content-crumb {
  margin: 0;
  color: var(--p-color);
  font-weight: var(--font-weight-semibold);
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.crumb-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

.crumb-link:hover,
.crumb-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.crumb-current {
  color: var(--p-color);
  font-weight: var(--font-weight-semibold);
}

.crumb-divider {
  color: var(--p-color);
}

.content-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.filter-pill {
  border: 1px solid var(--border-color);
  background: var(--white-color);
  color: var(--dark-color);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: var(--label-font-family);
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 8px 18px var(--shadow-weak);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px var(--shadow-weak);
  border-color: rgba(107, 52, 196, 0.35);
}

.filter-pill.active {
  background: var(--secondary-color);
  color: var(--white-color);
  border-color: var(--secondary-color);
  box-shadow: 0 14px 28px var(--shadow-mid);
}

.video-card,
.content-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  border-radius: 18px;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 26px var(--shadow-weak);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  cursor: pointer;
}

.video-card:hover,
.content-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 32px var(--shadow-mid);
  border-color: rgba(107, 52, 196, 0.25);
}

.video-card:focus-visible,
.content-card:focus-visible {
  outline: none;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 3px rgba(107, 52, 196, 0.24), 0 18px 36px var(--shadow-mid);
  border-color: var(--secondary-color);
}

.video-card.is-disabled,
.content-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.86;
}

.video-card.is-disabled:hover,
.content-card.is-disabled:hover {
  transform: none;
  box-shadow: 0 12px 26px var(--shadow-weak);
}

.video-card-media,
.content-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f5f2ff;
  overflow: hidden;
  position: relative;
}

.video-card,
.content-card {
  position: relative;
}

.video-card-media img,
.content-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#playGrid[data-category="makers"][data-saved-view="true"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
  #playGrid[data-category="makers"][data-saved-view="true"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  #playGrid[data-category="makers"][data-saved-view="true"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.saved-maker-card .video-card-media {
  aspect-ratio: auto;
  background: transparent;
  padding: 0;
}

#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card {
  background: var(--white-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 26px var(--shadow-weak);
}

#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card:hover,
#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px var(--shadow-mid);
  border-color: rgba(107, 52, 196, 0.25);
}

#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(107, 52, 196, 0.24), 0 18px 36px var(--shadow-mid);
  border-color: var(--secondary-color);
}

#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card:hover .cardPreviewViewport,
#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card:focus-visible .cardPreviewViewport {
  transform: none;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(107, 52, 196, 0.2);
  border-color: rgba(107, 52, 196, 0.3);
}

#playGrid[data-category="makers"][data-saved-view="true"] .cardPreviewViewport {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card:hover .cardPreviewOverlay,
#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card:focus-visible .cardPreviewOverlay {
  opacity: 1;
  transform: translateY(0);
}

#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card {
  transition: transform 220ms ease;
}

#playGrid[data-category="makers"][data-saved-view="true"] .saved-maker-card-body {
  display: none;
}

.cardPreview {
  width: 100%;
  height: auto;
  aspect-ratio: 794 / 1123;
  overflow: hidden;
}

.cardPreviewInner {
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cardPreviewViewport {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(107, 52, 196, 0.18);
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(107, 52, 196, 0.08);
}

.cardPreviewOverlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0) 0%, rgba(124, 58, 237, 0.68) 70%, rgba(124, 58, 237, 0.85) 100%);
  color: #f8fafc;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.cardPreviewOverlayTitle {
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
}

.cardPreviewOverlaySubtitle {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 4px;
}

.cardPreviewMount {
  position: relative;
  width: 100%;
  height: 100%;
}

.cardPreviewMount .maker-preview-page {
  border-radius: 0;
  box-shadow: none;
}

.cardPreviewPage {
  position: absolute;
  margin: 0;
}

.saved-maker-preview-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  padding: 12px;
}

.saved-maker-card-body {
  padding: 8px 10px 12px;
  gap: 3px;
}

.saved-maker-title {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--dark-color);
  margin: 0;
}

.saved-maker-subtitle {
  font-size: 11px;
  color: #6b7280;
  margin: 0;
}

@media (max-width: 900px) {
  .cardPreview {
    height: auto;
  }
}

.lesson-card {
  height: auto;
}

.lesson-card .content-card-media,
.lesson-card-media {
  margin: 0;
  padding: 0;
  width: 100%;
  aspect-ratio: var(--lesson-card-media-ratio, 4 / 3);
  height: auto;
  max-height: var(--lesson-card-width, 360px);
  background: transparent;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.lesson-card-media img {
  transition: opacity 160ms ease;
}

.lesson-card-media.is-loading img {
  opacity: 0;
}

.lesson-card-preview {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px 14px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  color: #1f2937;
  font-family: var(--body-font-family);
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  z-index: 2;
}

.lesson-card-preview-list {
  display: grid;
  gap: 4px;
}

.lesson-card-preview-line {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lesson-card-preview-line:nth-child(n + 6) {
  display: none;
}

@media (max-width: 1200px) {
  .lesson-card-preview-line:nth-child(n + 5) {
    display: none;
  }
}

@media (max-width: 900px) {
  .lesson-card-preview-line:nth-child(n + 4) {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .lesson-card:hover .lesson-card-preview,
  .lesson-card:focus-visible .lesson-card-preview {
    opacity: 1;
    transform: translateY(0);
  }
}

.lesson-media-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.9), rgba(248, 250, 252, 0.85), rgba(226, 232, 240, 0.9));
  background-size: 200% 100%;
  animation: tool-skeleton 1.4s ease infinite;
  pointer-events: none;
}

.lesson-card .content-card-media img,
.lesson-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.lesson-card-skeleton {
  cursor: default;
  pointer-events: none;
}

.lesson-card-skeleton .lesson-skeleton {
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.9), rgba(248, 250, 252, 0.85), rgba(226, 232, 240, 0.9));
  background-size: 200% 100%;
  animation: tool-skeleton 1.4s ease infinite;
}

.lesson-card-skeleton .lesson-skeleton-thumb {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.lesson-card-skeleton .lesson-skeleton-line {
  height: 14px;
  width: 78%;
  border-radius: 999px;
}

.lesson-card-skeleton .lesson-skeleton-line-short {
  width: 54%;
}

.lesson-card-skeleton .lesson-skeleton-avatar {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  flex-shrink: 0;
}

.lesson-card-skeleton .lesson-skeleton-name {
  width: 86px;
  height: 12px;
  border-radius: 999px;
}

.lesson-card-skeleton .lesson-skeleton-chip {
  width: 22px;
  height: 12px;
  border-radius: 999px;
}

.video-card-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.video-card-remove:hover,
.video-card-remove:focus-visible {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.65);
  outline: none;
}

.video-card-remove i {
  font-size: 1rem;
}

.video-fav-btn {
  position: static;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  box-shadow: none;
  transition: color 150ms ease, transform 180ms ease;
  z-index: 5;
  opacity: 1;
  color: #7b829c;
  flex-shrink: 0;
}

.video-fav-btn i {
  font-size: 1.28rem;
  line-height: 1;
  display: block;
}

.video-card-footer .video-fav-btn {
  margin-left: 6px;
}

.video-fav-btn.is-fav {
  color: #6b34c4;
}

.video-fav-btn:hover,
.video-fav-btn:focus-visible {
  border-color: transparent;
  outline: none;
  color: #6b34c4;
}

.video-fav-btn.is-popping {
  animation: fav-pop 200ms ease;
}

@keyframes fav-pop {
  0% { transform: scale(1); }
  55% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.video-card-body,
.content-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.lesson-card-body {
  gap: 12px;
  align-items: center;
  text-align: center;
}

.lesson-card-body > * {
  width: 100%;
}

.lesson-card-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  background: #f2f2f7;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

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

.lesson-card-owner {
  font-family: var(--body-font-family);
  font-weight: var(--font-weight-light);
  color: #000000;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
}

.lesson-card-owner:hover,
.lesson-card-owner:focus-visible {
  color: #000000;
  outline: none;
  text-decoration: underline;
}

.lesson-card-title {
  text-align: center;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: var(--label-font-family);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  width: fit-content;
  gap: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.category-warmup {
  background: #fff4d6;
  color: #b76b00;
}

.category-movement {
  background: #e3f0ff;
  color: #1d6fb6;
}

.category-game {
  background: #e3f0ff;
  color: #1d6fb6;
}

.category-vocabulary {
  background: #f0e9ff;
  color: #5b2bbf;
}

.category-default {
  background: rgba(107, 52, 196, 0.1);
  color: var(--dark-color);
}

/* Tag-specific colors */
.category-tag-actions { background: #ffe9c7; color: #9f4b00; }
.category-tag-adventure { background: #e6f4ff; color: #0b4f7a; }
.category-tag-alphabet { background: #f1e9ff; color: #5a2bbf; }
.category-tag-animals { background: #e9f7ef; color: #1c7c3c; }
.category-tag-body-parts { background: #ffe6f2; color: #b00053; }
.category-tag-calendar { background: #e8f0fe; color: #1a73e8; }
.category-tag-classroom-routines { background: #fdf3d7; color: #946200; }
.category-tag-classroom-rules { background: #f0f4ff; color: #1f4b99; }
.category-tag-colors { background: #fff0d5; color: #b06500; }
.category-tag-cooking { background: #fff5e0; color: #b15c00; }
.category-tag-days-of-the-week { background: #e6f4ff; color: #0b4f7a; }
.category-tag-dinosaurs { background: #e8f5e9; color: #2e7d32; }
.category-tag-directions { background: #f2f2ff; color: #4a47a3; }
.category-tag-family { background: #ffe8f0; color: #b60046; }
.category-tag-feelings { background: #e9f7ff; color: #0b71a8; }
.category-tag-food { background: #fff0e0; color: #b05b00; }
.category-tag-fruits { background: #fff4e6; color: #b44200; }
.category-tag-games { background: #e8f1ff; color: #1b5fa7; }
.category-tag-goodbye { background: #f2f6ff; color: #1c4c96; }
.category-tag-greetings { background: #f0f5ff; color: #204080; }
.category-tag-halloween { background: #fff0e6; color: #c0392b; }
.category-tag-jobs { background: #e8f5ff; color: #125a8a; }
.category-tag-listening-skills { background: #f2f8ff; color: #0f4c81; }
.category-tag-manners { background: #fdf3ff; color: #8a2be2; }
.category-tag-months { background: #e9f1ff; color: #1f4c99; }
.category-tag-movement { background: #e6f7ff; color: #0b6b9a; }
.category-tag-numbers { background: #f7f0ff; color: #5b2bbf; }
.category-tag-opposites { background: #f5f5f5; color: #444; }
.category-tag-rhythm { background: #f2f0ff; color: #5b2bbf; }
.category-tag-routines { background: #fdf5e6; color: #b06b00; }
.category-tag-seasons { background: #e7fff5; color: #0f7a4a; }
.category-tag-self-introduction { background: #f5f9ff; color: #1f4c99; }
.category-tag-shapes { background: #f9f0ff; color: #6b2bbf; }
.category-tag-shopping { background: #fff2e8; color: #b05300; }
.category-tag-spatial-awareness { background: #eef7ff; color: #0b4f7a; }
.category-tag-topics { background: #f0f7ff; color: #1f4c99; }
.category-tag-traffic { background: #f7f7f7; color: #444; }
.category-tag-transportation { background: #e6f2ff; color: #1b5fa7; }
.category-tag-vegetables { background: #e8f7e0; color: #2b7a0b; }
.category-tag-vocabulary { background: #f1e9ff; color: #5a2bbf; }
.category-tag-weather { background: #e8f4ff; color: #1f73b7; }
.category-tag-yoga { background: #f4ffef; color: #3b7a0f; }

.video-card-title,
.content-card-title {
  margin: 0;
  font-family: var(--title-font-family);
  font-size: 1.05rem;
  font-weight: var(--font-weight-normal);
  color: var(--dark-color);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.video-card-description,
.content-card-description {
  margin: 0;
  font-family: var(--body-font-family);
  font-weight: var(--font-weight-semibold);
  color: var(--p-color);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.video-card-description {
  font-size: 0.95rem;
}

.video-card.video-title-two-lines .video-card-description {
  -webkit-line-clamp: 1;
}

.video-card-meta,
.content-card-meta {
  margin: 0;
  font-family: var(--body-font-family);
  font-weight: var(--font-weight-medium);
  font-size: 0.9rem;
  color: #6b7280;
}

.video-card-footer,
.content-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.video-card-footer .video-card-meta,
.content-card-footer .content-card-meta {
  flex: 1;
}

.tool-card .video-card-body {
  text-align: left;
}

.tool-card .video-tag-list {
  justify-content: flex-start;
}

.tool-card .video-card-title,
.tool-card .video-card-description,
.tool-card .video-card-meta {
  text-align: left;
}

.tool-card .video-card-title {
  font-size: 1.2rem;
  font-weight: var(--font-weight-semibold);
}

.tool-card .video-card-description {
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
}

.lesson-card-bottom {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  text-align: left;
  flex-wrap: nowrap;
}

.lesson-card-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: auto;
}

.lesson-card-meta {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
}

.lesson-card-tags {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  overflow: visible;
  width: 100%;
}

.lesson-card-tags .category-tag {
  margin: 0;
}

.lesson-card-teacher {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  width: auto;
}

.lesson-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
}

.lesson-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  transition: color 160ms ease;
  line-height: 1;
}

.lesson-like-btn:hover,
.lesson-like-btn:focus-visible {
  color: #ef4444;
  outline: none;
}

.lesson-like-btn i {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-like-btn.is-liked {
  color: #ef4444;
}

.lesson-like-btn.is-liked i {
  color: #ef4444;
}

.lesson-like-btn.is-popping {
  animation: fav-pop 200ms ease;
}

.lesson-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  transition: color 160ms ease;
}

.lesson-share-btn i {
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-share-btn:hover,
.lesson-share-btn:focus-visible,
.lesson-share-btn.is-active {
  color: #6b34c4;
  outline: none;
}

.lesson-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 12px;
  cursor: default;
  transition: color 160ms ease;
}

.lesson-view-btn i {
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-view-btn:hover,
.lesson-view-btn:focus-visible {
  color: #6b7280;
  outline: none;
}

.lesson-like-count {
  font-size: 12px;
  line-height: 1;
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 21px;
  overflow: hidden;
  min-width: 12px;
}

.lesson-like-count-current,
.lesson-like-count-next {
  display: block;
}

.lesson-like-count-next {
  display: none;
}

.lesson-card-questions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

#lessons .lesson-save-btn,
.lesson-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
}

.lesson-card-actions .lesson-like-btn {
  align-items: center;
}

.lesson-card-actions .lesson-save-btn.video-fav-btn {
  padding: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #6b7280;
}

.lesson-card-actions .lesson-save-btn.video-fav-btn:hover,
.lesson-card-actions .lesson-save-btn.video-fav-btn:focus-visible {
  color: #6b34c4;
  outline: none;
}

.lesson-card-actions .lesson-save-btn.video-fav-btn.is-fav {
  color: #6b34c4;
}

.lesson-card-actions .lesson-save-btn i {
  font-size: 18px;
  line-height: 1;
}

#playGrid[data-category="videos"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 25px;
  justify-items: stretch;
}

@keyframes videoCardPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(120, 61, 210, 0.4);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(120, 61, 210, 0.12);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(120, 61, 210, 0);
    transform: translateY(0);
  }
}

.video-card-pulse {
  animation: videoCardPulse 1.2s ease;
}

#playGrid[data-category="videos"] .video-pill-title {
  margin: 0;
  font-family: var(--title-font-family);
  font-weight: var(--font-weight-semibold);
  font-size: 0.95rem;
  color: #1b1b25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
}

.video-inline-panel {
  display: contents;
}

.video-inline-header,
.video-inline-close {
  display: none !important;
}

.video-inline-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.video-inline-grid .video-card {
  height: 100%;
}

@media (max-width: 1200px) {
  .video-inline-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .video-inline-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .video-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .video-inline-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* Force 5-wide layout for video search results */
#playGrid[data-category="videos"][data-search-active="true"] {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

#playGrid[data-category="videos"][data-search-active="true"] .video-cards-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  #playGrid[data-category="videos"][data-search-active="true"],
  #playGrid[data-category="videos"][data-search-active="true"] .video-cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #playGrid[data-category="videos"][data-saved-view="true"],
  #playGrid[data-category="videos"][data-saved-view="true"] .video-cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  #playGrid[data-category="videos"][data-search-active="true"],
  #playGrid[data-category="videos"][data-search-active="true"] .video-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #playGrid[data-category="videos"][data-saved-view="true"],
  #playGrid[data-category="videos"][data-saved-view="true"] .video-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #playGrid[data-category="videos"][data-search-active="true"],
  #playGrid[data-category="videos"][data-search-active="true"] .video-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #playGrid[data-category="videos"][data-saved-view="true"],
  #playGrid[data-category="videos"][data-saved-view="true"] .video-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  #playGrid[data-category="videos"][data-search-active="true"],
  #playGrid[data-category="videos"][data-search-active="true"] .video-cards-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  #playGrid[data-category="videos"][data-saved-view="true"],
  #playGrid[data-category="videos"][data-saved-view="true"] .video-cards-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.video-tag-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 8px 0 6px;
  overflow: hidden;
}

.video-card .video-card-body .video-tag-list {
  margin: 8px 0 10px;
}

.video-tag-list.video-tag-list-empty {
  min-height: 0;
  display: none;
}

.video-inline-empty {
  padding: 18px;
  text-align: center;
  color: #6b7280;
  font-weight: var(--font-weight-medium);
}

@media (min-width: 720px) {
  .play-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #playGrid:not([data-category="videos"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .play-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #playGrid:not([data-category="videos"]) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .play-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #playGrid:not([data-category="videos"]) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .play-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  #playGrid:not([data-category="videos"]) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #playGrid[data-category="videos"] {
    justify-content: center;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .play-main-tabs.sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-nav .play-tab {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .play-profile-menu {
    left: auto;
    right: 0;
    top: calc(100% + 8px);
    bottom: auto;
    transform: none;
  }
}

@media (max-width: 640px) {
  .play-main-tabs.sidebar-nav {
    flex-direction: column;
  }

  .sidebar-nav .play-tab {
    flex: 1 1 100%;
  }
}

.play-body.dark-mode {
  background: radial-gradient(circle at 30% 20%, rgba(107, 52, 196, 0.22), transparent 45%), linear-gradient(135deg, #0f0c1a 0%, #1b1230 100%);
  color: #e9e6f8;
  --p-color: #d4cceb;
  --dark-color: #f4f2ff;
  --border-color: #2c2141;
  --sidebar-text: #e9e6f8;
  --sidebar-text-muted: #cfc8e8;
  --sidebar-hover-bg: rgba(120, 61, 210, 0.18);
  --sidebar-active-bg: rgba(120, 61, 210, 0.28);
}

.play-body.dark-mode .app-sidebar {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #e9e6f8;
}
.play-body.dark-mode .mobile-bottom-nav {
  background: rgba(31, 22, 48, 0.96);
  border-top: 1px solid rgba(88, 72, 133, 0.6);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.35);
}

.play-body.dark-mode .content-panel {
  background:
    radial-gradient(110% 120% at 10% 8%, rgba(120, 61, 210, 0.22) 0%, transparent 45%),
    radial-gradient(120% 120% at 90% 0%, rgba(86, 146, 255, 0.14) 0%, transparent 55%),
    linear-gradient(165deg, #0f0b1c 0%, #15102a 52%, #0d0a18 100%);
  border: 1px solid rgba(88, 72, 133, 0.4);
  box-shadow:
    -8px 14px 30px rgba(0, 0, 0, 0.32),
    0 18px 36px rgba(0, 0, 0, 0.35);
  color: #e9e6f8;
}

.play-body.dark-mode .content-scroll {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(120, 61, 210, 0.18) 0%, transparent 50%),
    radial-gradient(120% 120% at 100% 0%, rgba(86, 146, 255, 0.12) 0%, transparent 52%),
    linear-gradient(180deg, #0f0b1c 0%, #130f24 48%, #0d0a18 100%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 100% 380px, 100% 320px, 100% 100%;
  background-position: top left, top right, center;
  color: #dcd8f0;
}

.play-body.dark-mode .play-profile-name {
  color: #f5f3ff;
}

.play-body.dark-mode .play-profile-hint {
  color: #cfc8e8;
}

.play-body.dark-mode .play-profile-menu {
  background: #1f1630;
  border-color: #3b2c52;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.play-body.dark-mode .play-account-section + .play-account-section {
  border-top-color: rgba(148, 163, 184, 0.18);
}

.play-body.dark-mode .play-account-avatar {
  border-color: rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.18);
}

.play-body.dark-mode .play-account-name {
  color: #f5f3ff;
}

.play-body.dark-mode .play-account-email {
  color: #cfc8e8;
}

.play-body.dark-mode .play-menu-link {
  color: #e9e6f8;
}

.play-body.dark-mode .play-menu-link:hover {
  background: rgba(107, 52, 196, 0.18);
  color: #fff;
}

.play-body.dark-mode .sidebar-icon-btn {
  background: transparent;
  border: 0;
  color: #e9e6f8;
  box-shadow: none;
}

.play-body.dark-mode .app-nav-link {
  color: #e9e6f8;
}

.play-body.dark-mode .sidebar-nav .play-tab {
  color: #d9cff6;
  border: 0;
  background: transparent;
}

.play-body.dark-mode .sidebar-nav .play-tab:hover,
.play-body.dark-mode .sidebar-nav .play-tab:focus-visible {
  background: rgba(120, 61, 210, 0.18);
  color: #f4edff;
}

.play-body.dark-mode .play-tab {
  background: transparent;
  color: #d9cff6;
  border: 0;
  box-shadow: none;
}

.play-body.dark-mode .play-tab.active {
  background: rgba(120, 61, 210, 0.28);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.play-body.dark-mode .sidebar-create-circle {
  background: #8c6be0;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.play-body.dark-mode .sidebar-create-label {
  color: #e9e6f8;
}

.play-body.dark-mode .play-section-title {
  color: #f5f3ff;
}

.play-body.dark-mode .play-section-subtitle {
  color: #cfc8e8;
}

.play-body.dark-mode .play-section-meta {
  color: #d7c9ff;
}

.play-body.dark-mode .content-crumb,
.play-body.dark-mode .crumb-current,
.play-body.dark-mode .crumb-divider {
  color: #dcd8f0;
}

.play-body.dark-mode .crumb-link {
  color: #c6b6ff;
}

.play-body.dark-mode .crumb-link:hover,
.play-body.dark-mode .crumb-link:focus-visible {
  color: #ede5ff;
}

.play-body.dark-mode .add-videos-card {
  background: rgba(120, 61, 210, 0.18);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

.play-body.dark-mode .add-videos-title {
  color: #f5f3ff;
}

.play-body.dark-mode .add-videos-subtitle {
  color: #d8d5ec;
}

.play-body.dark-mode .add-videos-input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.play-body.dark-mode .add-videos-input input {
  color: #f5f3ff;
}

.play-body.dark-mode .add-videos-input input::placeholder {
  color: #9ea0b8;
}

.play-body.dark-mode .add-videos-status {
  color: #d7d7e5;
}

.play-body.dark-mode .filter-pill {
  background: rgba(36, 28, 50, 0.94);
  border-color: #2f2345;
  color: #e9e6f8;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.play-body.dark-mode .filter-pill:hover {
  border-color: rgba(123, 62, 234, 0.6);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

.play-body.dark-mode .filter-pill.active {
  background: linear-gradient(90deg, #7b3eea 0%, #b44dff 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
}

.play-body.dark-mode .play-chip {
  background: rgba(28, 22, 45, 0.92);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.28),
    0 18px 38px rgba(0, 0, 0, 0.46);
  color: #e9e6f8;
}

.play-body.dark-mode .play-chip i {
  color: #c9c2e3;
}

.play-body.dark-mode .play-chip:hover {
  background: rgba(39, 30, 64, 0.96);
  border-color: rgba(180, 136, 255, 0.6);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.32),
    0 22px 44px rgba(0, 0, 0, 0.54);
}

.play-body.dark-mode .play-chip:focus-visible {
  box-shadow:
    0 0 0 3px rgba(180, 136, 255, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.58);
}

.play-body.dark-mode .play-chip-active {
  background: linear-gradient(135deg, rgba(123, 62, 234, 0.32), rgba(98, 70, 172, 0.28));
  border-color: rgba(180, 136, 255, 0.8);
  box-shadow:
    0 8px 18px rgba(123, 62, 234, 0.22),
    0 22px 46px rgba(0, 0, 0, 0.62);
  color: #f4f2ff;
}

.play-body.dark-mode .play-chip-active i {
  color: #f4f2ff;
}

.play-body.dark-mode .play-chip.play-chip-active:hover {
  background: linear-gradient(135deg, rgba(123, 62, 234, 0.32), rgba(98, 70, 172, 0.28));
  border-color: rgba(180, 136, 255, 0.8);
  box-shadow:
    0 8px 18px rgba(123, 62, 234, 0.22),
    0 22px 46px rgba(0, 0, 0, 0.62);
  color: #f4f2ff;
  transform: translateY(0);
}

.play-body.dark-mode .play-grid-empty {
  background: rgba(28, 22, 45, 0.9);
  color: #e9e6f8;
  border-color: rgba(180, 136, 255, 0.35);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.52);
}

.play-body.dark-mode .play-hero-title {
  background: linear-gradient(120deg, #f4f2ff 0%, #c7b3ff 45%, #8ad3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.play-body.dark-mode .play-hero-search {
  background:
    radial-gradient(140% 120% at 12% 30%, rgba(123, 62, 234, 0.18), transparent 55%),
    radial-gradient(120% 120% at 88% 0%, rgba(86, 146, 255, 0.14), transparent 50%),
    linear-gradient(135deg, rgba(31, 25, 50, 0.96), rgba(22, 18, 36, 0.96));
  border: 1px solid rgba(167, 139, 250, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 18px 42px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px);
  color: #f4f2ff;
}

.play-body.dark-mode .play-hero-search:focus-within {
  border-color: rgba(180, 136, 255, 0.8);
  box-shadow:
    0 0 0 4px rgba(123, 62, 234, 0.32),
    0 22px 46px rgba(0, 0, 0, 0.6);
  background:
    radial-gradient(140% 120% at 10% 24%, rgba(143, 96, 255, 0.26), transparent 52%),
    radial-gradient(120% 120% at 90% 0%, rgba(109, 176, 255, 0.16), transparent 50%),
    linear-gradient(135deg, rgba(37, 28, 62, 0.98), rgba(24, 19, 44, 0.98));
}

.play-body.dark-mode .play-hero-icon {
  color: #c9c2e3;
}

.play-body.dark-mode .play-hero-input {
  color: #f4f2ff;
}

.play-body.dark-mode .play-hero-input::placeholder {
  color: #a9a1c6;
}

.play-body.dark-mode .play-hero-addon {
  color: #c9c2e3;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.play-body.dark-mode .play-hero-addon:hover {
  color: #f4f2ff;
  background: rgba(123, 62, 234, 0.16);
}

.play-body.dark-mode .video-card,
.play-body.dark-mode .content-card {
  background: #1f1630;
  border-color: #3b2c52;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.play-body.dark-mode .video-card.video-card-pill {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #f4f2ff;
}

.play-body.dark-mode .video-card.video-card-pill .video-pill-title {
  color: #f4f2ff;
}

.play-body.dark-mode .video-card.video-card-pill.is-active .video-pill-title {
  color: #e6dcff;
}

.play-body.dark-mode .video-card:hover,
.play-body.dark-mode .video-card:focus-visible,
.play-body.dark-mode .content-card:hover,
.play-body.dark-mode .content-card:focus-visible {
  border-color: rgba(107, 52, 196, 0.45);
}

.play-body.dark-mode .video-card-title,
.play-body.dark-mode .content-card-title {
  color: #f5f3ff;
}

.play-body.dark-mode .video-card-description,
.play-body.dark-mode .content-card-description {
  color: #d4cceb;
}

.play-body.dark-mode .video-card-meta,
.play-body.dark-mode .content-card-meta {
  color: #b8b2d3;
}

.play-body.dark-mode .cardPreviewInner {
  background: transparent;
  box-shadow: none;
}

.play-body.dark-mode .cardPreviewViewport {
  background: #1f1630;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.play-body.dark-mode .cardPreviewOverlay {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0) 0%, rgba(124, 58, 237, 0.7) 70%, rgba(124, 58, 237, 0.9) 100%);
}

.play-body.dark-mode .saved-maker-title {
  color: #f8fafc;
}

.play-body.dark-mode .saved-maker-subtitle,
.play-body.dark-mode .saved-maker-preview-placeholder {
  color: #cbd5f5;
}

.play-body.dark-mode .lesson-card-bottom {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .lesson-card-preview {
  background: rgba(20, 22, 35, 0.84);
  color: #f5f3ff;
}

.play-body.dark-mode .lesson-media-skeleton {
  background: linear-gradient(90deg, rgba(36, 30, 56, 0.9), rgba(66, 56, 92, 0.7), rgba(36, 30, 56, 0.9));
  background-size: 200% 100%;
}

.play-body.dark-mode .lesson-card-skeleton .lesson-skeleton {
  background: linear-gradient(90deg, rgba(36, 30, 56, 0.9), rgba(66, 56, 92, 0.7), rgba(36, 30, 56, 0.9));
  background-size: 200% 100%;
}

.play-body.dark-mode .lesson-card-owner,
.play-body.dark-mode .lesson-card-owner:hover,
.play-body.dark-mode .lesson-card-owner:focus-visible {
  color: #e2e8f0;
}

.play-body.dark-mode .lesson-card-actions,
.play-body.dark-mode .lesson-card-meta {
  color: #b8b2d3;
}

.play-body.dark-mode .lesson-card-actions .lesson-save-btn.video-fav-btn {
  color: #b8b2d3;
}

.play-body.dark-mode .lesson-card-actions .lesson-save-btn.video-fav-btn:hover,
.play-body.dark-mode .lesson-card-actions .lesson-save-btn.video-fav-btn:focus-visible {
  color: #d8b4fe;
}

.play-body.dark-mode .lesson-card-actions .lesson-save-btn.video-fav-btn.is-fav {
  color: #c084fc;
}

.play-body.dark-mode .category-warmup {
  background: #4a3617;
  color: #ffd27a;
}

.play-body.dark-mode .category-movement {
  background: #1b2f4a;
  color: #8ac7ff;
}

.play-body.dark-mode .category-vocabulary {
  background: #2d2147;
  color: #d7c9ff;
}

.play-body.dark-mode .play-card-disabled {
  opacity: 0.9;
}
.play-body.dark-mode .lesson-view-header {
  background: #1b1725;
  border-color: #2f2940;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
}

.play-body.dark-mode .lesson-view-kicker {
  color: #9ea1c1;
}

.play-body.dark-mode .lesson-view-title {
  color: #f5f3ff;
}

.play-body.dark-mode .lesson-ghost-btn {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f5f3ff;
}

.play-body.dark-mode .lesson-ghost-btn:hover,
.play-body.dark-mode .lesson-ghost-btn:focus-visible {
  background: rgba(123, 62, 234, 0.16);
  border-color: rgba(180, 136, 255, 0.35);
}

.play-body.dark-mode .lesson-view-avatar {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.play-body.dark-mode .lesson-creator-link:hover,
.play-body.dark-mode .lesson-creator-link:focus-visible {
  color: #d6cbff;
}

.play-body.dark-mode .lesson-view-stats .lesson-stat {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e8e6fa;
}

.play-body.dark-mode .lesson-stat.pill {
  background: rgba(123, 62, 234, 0.18);
  border-color: rgba(180, 136, 255, 0.5);
  color: #e6dcff;
}

.play-body.dark-mode .lesson-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f4f2ff;
}

.play-body.dark-mode .lesson-action-btn:hover,
.play-body.dark-mode .lesson-action-btn:focus-visible {
  background: rgba(123, 62, 234, 0.14);
  border-color: rgba(180, 136, 255, 0.5);
}

.play-body.dark-mode .lesson-hero {
  background:
    radial-gradient(120% 140% at 80% 10%, rgba(123, 62, 234, 0.14), transparent 40%),
    radial-gradient(120% 120% at 90% 70%, rgba(86, 146, 255, 0.14), transparent 45%),
    linear-gradient(135deg, #191726 0%, #161422 100%);
  border-color: #2b2940;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.play-body.dark-mode .lesson-hero-label {
  color: #a6a8c6;
}

.play-body.dark-mode .lesson-hero-title {
  color: #f5f3ff;
}

.play-body.dark-mode .lesson-hero-social {
  color: #f5f3ff;
}

.play-body.dark-mode .lesson-hero-more {
  color: #a6a8c6;
}

.play-body.dark-mode .lesson-hero-avatar {
  border-color: #1a1524;
  background: #211a2f;
}

.play-body.dark-mode .lesson-generate-menu {
  background: #181826;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.6);
}

.play-body.dark-mode .lesson-generate-item {
  color: #f5f3ff;
}

.play-body.dark-mode .lesson-generate-item:hover,
.play-body.dark-mode .lesson-generate-item:focus-visible {
  background: rgba(56, 189, 248, 0.18);
  color: #ffffff;
}

.play-body.dark-mode .lesson-creator-link {
  color: #e6dcff;
}

.play-body.dark-mode .lesson-cta {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f4f2ff;
}

.play-body.dark-mode .lesson-cta.primary {
  background: linear-gradient(135deg, #5a4df3, #8f6bff);
  box-shadow: 0 18px 38px rgba(90, 77, 243, 0.4);
}

.play-body.dark-mode .lesson-cta.danger {
  color: #f3b6b3;
  border-color: rgba(220, 53, 69, 0.35);
  background: rgba(220, 53, 69, 0.12);
}

.play-body.dark-mode .lesson-info-bar {
  background: #1c1728;
  border-color: #2d2538;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.play-body.dark-mode .lesson-info-item:not(:last-child)::after {
  background: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .lesson-info-label {
  color: #a6a8c6;
}

.play-body.dark-mode .lesson-meta-chip,
.play-body.dark-mode .lesson-tag-chip {
  background: rgba(255, 255, 255, 0.08);
  color: #e8e6fa;
  border-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .lesson-tag-chip {
  background: rgba(123, 62, 234, 0.18);
  color: #e6dcff;
}

.play-body.dark-mode .lesson-questions-subhead {
  color: #a6a8c6;
}

.play-body.dark-mode .lesson-question-card {
  background: #1b1725;
  border-color: #2f2940;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
}

.play-body.dark-mode .lesson-question-card:hover,
.play-body.dark-mode .lesson-question-card:focus-visible {
  border-color: rgba(180, 136, 255, 0.5);
}

.play-body.dark-mode .lesson-question-text {
  color: #f5f3ff;
}

.play-body.dark-mode .lesson-question-meta,
.play-body.dark-mode .lesson-toggle-btn {
  color: #a6a8c6;
}

.play-body.dark-mode .lesson-question-card:hover .lesson-toggle-btn,
.play-body.dark-mode .lesson-question-card:focus-visible .lesson-toggle-btn {
  color: #d6cbff;
}

.play-body.dark-mode .lesson-question-card.is-static .lesson-toggle-btn {
  color: #7c80a5;
}

.play-body.dark-mode .lesson-question-answer {
  color: #d6d2ea;
  border-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .lesson-question-empty {
  color: #cfd2eb;
  border-color: rgba(255, 255, 255, 0.08);
}
.video-card.video-card-pill:hover,
.video-card.video-card-pill:focus-visible {
  transform: none;
  filter: none;
  outline: none;
}

/* Lesson builder + player */
.card-panel {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
  padding: 24px;
}

.theme-dark .card-panel {
  background: #111318;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

.play-body.dark-mode .card-panel,
body.dark-mode .card-panel {
  background: #111318;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

.play-body.dark-mode .lesson-stepper,
body.dark-mode .lesson-stepper {
  color: #cbd5f5;
}

.play-body.dark-mode .lesson-help,
body.dark-mode .lesson-help {
  color: #cbd5f5;
}

.play-body.dark-mode .lesson-thumb-box,
body.dark-mode .lesson-thumb-box {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
}

.play-body.dark-mode .lesson-thumb-placeholder,
body.dark-mode .lesson-thumb-placeholder {
  color: #cbd5f5;
}

.play-body.dark-mode .lesson-field .form-control,
.play-body.dark-mode .lesson-field select,
.play-body.dark-mode .lesson-field textarea,
body.dark-mode .lesson-field .form-control,
body.dark-mode .lesson-field select,
body.dark-mode .lesson-field textarea {
  background: #0f172a;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}

.play-body.dark-mode .lesson-field .form-control::placeholder,
.play-body.dark-mode .lesson-tags-inline::placeholder,
body.dark-mode .lesson-field .form-control::placeholder,
body.dark-mode .lesson-tags-inline::placeholder {
  color: #94a3b8;
}

.play-body.dark-mode .lesson-tags-input-wrap,
body.dark-mode .lesson-tags-input-wrap {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.14);
}

.play-body.dark-mode .lesson-tags-input-wrap:focus-within,
body.dark-mode .lesson-tags-input-wrap:focus-within {
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.play-body.dark-mode .lesson-tags-inline,
body.dark-mode .lesson-tags-inline {
  color: #e2e8f0;
}

.play-body.dark-mode .lesson-publish-option,
body.dark-mode .lesson-publish-option {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
}

.play-body.dark-mode .lesson-publish-body p,
body.dark-mode .lesson-publish-body p {
  color: #cbd5f5;
}

.lesson-composer {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lesson-composer-header,
.lesson-slides-header,
.lesson-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-composer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lesson-stepper {
  margin: 0;
  color: #6b7280;
  font-weight: 600;
}

.lesson-step-controls { display: flex; justify-content: center; margin: 24px 0 12px; }

.lesson-questions-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lesson-info-title {
  font-size: 22px;
  margin: 4px 0 0;
}

.lesson-help {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.theme-dark .lesson-help {
  color: #cbd5f5;
}

.lesson-thumb {
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: center;
}

.lesson-field-grid.single-column {
  grid-template-columns: 1fr;
}

.lesson-field-grid .three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.lesson-field-grid.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.lesson-info-header {
  margin-top: 18px;
}

.lesson-thumb img {
  width: 120px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.lesson-thumb-box {
  width: 100%;
  min-height: 110px;
  padding: 12px;
  border: 2px dashed rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background: #f9fafb;
  cursor: pointer;
}

.lesson-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #6b7280;
  font-weight: 700;
  font-size: 0.95rem;
}

.lesson-thumb img:not([hidden]) {
  width: 100%;
  max-width: 260px;
  height: auto;
  border: none;
  object-fit: cover;
  position: relative;
}

.lesson-thumb-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.lesson-thumb-box {
  position: relative;
}

.lesson-thumb-hover-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.35);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.lesson-thumb-box:hover .lesson-thumb-hover-label,
.lesson-thumb-box:focus-visible .lesson-thumb-hover-label {
  opacity: 1;
}

.lesson-thumb-box:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.lesson-field-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.lesson-field {
  display: grid;
  gap: 6px;
}

.lesson-title-inline {
  position: relative;
  display: block;
}

.lesson-title-inline-input {
  padding-right: 150px;
}

.lesson-title-inline-btn {
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 8px;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid #1f2937;
  background: linear-gradient(135deg, #0f172a 0%, #0b0f1a 100%);
  color: #f8fafc;
  font-weight: 700;
  font-size: 14px;
  min-height: 44px;
  white-space: nowrap;
  box-shadow: none;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, filter 120ms ease;
}

.lesson-title-inline-btn .ph {
  font-size: 28px !important;
  line-height: 1;
}

.lesson-title-inline-btn:hover {
  background: #ffffff;
  color: #0b0f1a;
  border-color: #0b0f1a;
  filter: none;
}

.lesson-title-inline-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

@media (max-width: 640px) {
  .lesson-title-inline-input {
    padding-right: 12px;
  }

  .lesson-title-inline-btn {
    position: static;
    transform: none;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    right: auto;
    top: auto;
    bottom: auto;
    padding: 10px 12px;
  }
}

.lesson-tags-input-wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  min-height: 46px;
  background: #fff;
}

.lesson-tags-input-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lesson-tags-inline {
  flex: 1 1 160px;
  border: none;
  box-shadow: none;
  min-width: 120px;
  padding: 6px 0;
  min-height: 30px;
}

.lesson-tags-inline::placeholder {
  color: #9ca3af;
}

.lesson-tags-inline:focus {
  outline: none;
  box-shadow: none;
}

.lesson-tags-chips {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: 2px;
}

.lesson-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  line-height: 1.2;
}

.lesson-tag-chip button {
  border: none;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1;
}

.lesson-tag-chip button:hover,
.lesson-tag-chip button:focus-visible {
  opacity: 0.8;
}

.lesson-tags-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 4px;
  margin-top: 6px;
}

.lesson-tags-suggestions[hidden] {
  display: none;
}

.select-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.select-icon-wrap select {
  width: 100%;
  padding-right: 38px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.select-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.theme-dark .select-caret {
  color: #cbd5e1;
}

.lesson-tag-suggestion {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
  background: #f3f4f6;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.lesson-tag-suggestion:hover,
.lesson-tag-suggestion:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.lesson-label {
  font-weight: 600;
  color: #111827;
}

.theme-dark .lesson-label {
  color: #f8fafc;
}

.lesson-slides {
  display: grid;
  gap: 16px;
}

#lessonQuestionsStep.card-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.theme-dark #lessonQuestionsStep.card-panel {
  background: transparent;
  border: none;
  box-shadow: none;
}

.play-body.dark-mode #lessonQuestionsStep.card-panel,
body.dark-mode #lessonQuestionsStep.card-panel {
  background: transparent;
  border: none;
  box-shadow: none;
}

.ai-questions-helper {
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: #ffffff;
  box-shadow: none;
  position: relative;
  z-index: 0;
  overflow: visible;
}

.ai-questions-helper::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(120deg, #60a5fa, #a855f7, #22d3ee, #60a5fa);
  background-size: 300% 300%;
  animation: aiGlowBorder 6s ease infinite;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.4)) drop-shadow(0 0 18px rgba(168, 85, 247, 0.4))
    drop-shadow(0 0 24px rgba(34, 211, 238, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: -2;
}

@keyframes aiGlowBorder {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.ai-questions-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ai-questions-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-questions-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.ai-questions-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.ai-questions-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.ai-questions-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 26px;
  font-weight: 700;
  border-radius: 999px;
  font-size: 15px;
  position: relative;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.ai-questions-cta span {
  color: #5b21b6;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ai-questions-cta span {
    background: linear-gradient(135deg, #60a5fa, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.ai-questions-cta.btn-outline-secondary {
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #60a5fa, #a855f7, #22d3ee) border-box;
  border: 1px solid transparent;
  border-color: transparent !important;
  color: #5b21b6;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.ai-questions-cta.btn-primary {
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #60a5fa, #a855f7, #22d3ee) border-box;
  color: #5b21b6;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border: 1px solid transparent;
}

.ai-questions-cta:hover,
.ai-questions-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.2), 0 0 12px rgba(168, 85, 247, 0.16);
  outline: none;
}

.ai-questions-cta:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.ai-questions-cta.btn-outline-secondary:hover,
.ai-questions-cta.btn-outline-secondary:focus-visible {
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, rgba(96, 165, 250, 0.9), rgba(168, 85, 247, 0.9), rgba(34, 211, 238, 0.9)) border-box;
  border-color: transparent !important;
  color: #4c1d95;
}

.ai-questions-cta.btn-primary:hover,
.ai-questions-cta.btn-primary:focus-visible {
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, rgba(96, 165, 250, 0.9), rgba(168, 85, 247, 0.9), rgba(34, 211, 238, 0.9)) border-box;
}

@media (max-width: 720px) {
  .ai-questions-bar {
    align-items: flex-start;
  }

  .ai-questions-actions {
    width: 100%;
  }

  .ai-questions-cta {
    flex: 1 1 220px;
    justify-content: center;
  }
}

.ai-questions-modal .profile-modal-card {
  max-width: 680px;
}

.ai-questions-modal-card {
  max-height: 90vh;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ai-questions-modal-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.ai-questions-modal-body {
  gap: 12px;
}

.ai-questions-inline-field {
  display: grid;
  gap: 6px;
  padding-left: 22px;
}

.ai-questions-preview {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.ai-questions-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-questions-preview-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-chatgpt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-questions-preview-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.ai-questions-error-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #b91c1c;
}

.theme-dark .ai-questions-helper {
  background: #111318;
  border-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .ai-questions-helper,
body.dark-mode .ai-questions-helper {
  background: #111318;
  border-color: rgba(255, 255, 255, 0.08);
}

.theme-dark .ai-questions-cta.btn-outline-secondary {
  background: linear-gradient(#111318, #111318) padding-box,
    linear-gradient(135deg, #60a5fa, #a855f7, #22d3ee) border-box;
  color: #cbd5f5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.play-body.dark-mode .ai-questions-cta.btn-outline-secondary,
body.dark-mode .ai-questions-cta.btn-outline-secondary {
  background: linear-gradient(#111318, #111318) padding-box,
    linear-gradient(135deg, #60a5fa, #a855f7, #22d3ee) border-box;
  color: #cbd5f5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.theme-dark .ai-questions-cta.btn-primary,
.play-body.dark-mode .ai-questions-cta.btn-primary,
body.dark-mode .ai-questions-cta.btn-primary {
  background: linear-gradient(#111318, #111318) padding-box,
    linear-gradient(135deg, #60a5fa, #a855f7, #22d3ee) border-box;
  color: #cbd5f5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.theme-dark .ai-questions-cta span,
.play-body.dark-mode .ai-questions-cta span,
body.dark-mode .ai-questions-cta span {
  color: #cbd5f5;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .theme-dark .ai-questions-cta span,
  .play-body.dark-mode .ai-questions-cta span,
  body.dark-mode .ai-questions-cta span {
    background: linear-gradient(135deg, #93c5fd, #c4b5fd, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.theme-dark .ai-questions-title {
  color: #f8fafc;
}

.play-body.dark-mode .ai-questions-title,
body.dark-mode .ai-questions-title {
  color: #f8fafc;
}

.theme-dark .ai-questions-subtitle {
  color: #cbd5f5;
}

.play-body.dark-mode .ai-questions-subtitle,
body.dark-mode .ai-questions-subtitle {
  color: #cbd5f5;
}

.theme-dark .ai-questions-preview-label {
  color: rgba(226, 232, 240, 0.75);
}

.play-body.dark-mode .ai-questions-preview-label,
body.dark-mode .ai-questions-preview-label {
  color: rgba(226, 232, 240, 0.75);
}

.theme-dark .ai-questions-error-list {
  color: #f87171;
}

.play-body.dark-mode .ai-questions-error-list,
body.dark-mode .ai-questions-error-list {
  color: #f87171;
}

.play-body.dark-mode .ai-questions-modal .form-control,
.play-body.dark-mode .ai-questions-modal input,
.play-body.dark-mode .ai-questions-modal textarea,
.play-body.dark-mode .ai-questions-modal select,
body.dark-mode .ai-questions-modal .form-control,
body.dark-mode .ai-questions-modal input,
body.dark-mode .ai-questions-modal textarea,
body.dark-mode .ai-questions-modal select {
  background: #0f172a;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}

.play-body.dark-mode .ai-questions-modal .form-control::placeholder,
.play-body.dark-mode .ai-questions-modal textarea::placeholder,
body.dark-mode .ai-questions-modal .form-control::placeholder,
body.dark-mode .ai-questions-modal textarea::placeholder {
  color: #94a3b8;
}

.ai-questions-header {
  display: grid;
  gap: 6px;
}

.ai-questions-grid {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

@media (min-width: 992px) {
  .ai-questions-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.ai-questions-section {
  display: grid;
  gap: 10px;
}

.ai-questions-headbar {
  display: grid;
  gap: 12px;
  align-items: center;
}

.ai-questions-head-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.ai-questions-head-row .ai-questions-section-title {
  margin: 0;
  white-space: nowrap;
}

.ai-questions-head-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.ai-questions-top-controls {
  display: grid;
  grid-template-columns: 1fr 90px 140px;
  gap: 10px;
  align-items: stretch;
  flex: 1;
  min-width: 320px;
}

@media (max-width: 767px) {
  .ai-questions-top-controls {
  grid-template-columns: 1fr;
  }
}

.ai-questions-generate-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 48px;
}

.ai-questions-generate-wrap .btn {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-questions-type-select select {
  width: 100%;
  font-weight: 700;
  height: 48px;
}

.ai-questions-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  height: 48px;
}

.ai-questions-controls .form-control-sm {
  height: 100%;
  min-height: 48px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.ai-questions-controls .btn {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}

.ai-questions-head-right .btn {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: flex-end;
}

.ai-questions-topbar {
  display: grid;
  gap: 10px;
}

@media (min-width: 768px) {
  .ai-questions-topbar {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
  }
}

.ai-questions-type {
  display: grid;
  gap: 6px;
}

.ai-questions-type-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-questions-type-hint {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.theme-dark .ai-questions-type-hint {
  color: rgba(226, 232, 240, 0.8);
}

.play-body.dark-mode .ai-questions-type-hint,
body.dark-mode .ai-questions-type-hint {
  color: rgba(226, 232, 240, 0.8);
}

.ai-questions-type-select select {
  width: 100%;
  font-weight: 700;
  height: 48px;
}

.ai-questions-template-block {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.theme-dark .ai-questions-template-block {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
}

.play-body.dark-mode .ai-questions-template-block,
body.dark-mode .ai-questions-template-block {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
}

.ai-questions-template-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-questions-template-label {
  font-weight: 800;
  margin: 0;
  color: #0f172a;
}

.ai-questions-template-hint {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.theme-dark .ai-questions-template-label {
  color: #f8fafc;
}

.theme-dark .ai-questions-template-hint {
  color: rgba(226, 232, 240, 0.8);
}

.play-body.dark-mode .ai-questions-template-label,
body.dark-mode .ai-questions-template-label {
  color: #f8fafc;
}

.play-body.dark-mode .ai-questions-template-hint,
body.dark-mode .ai-questions-template-hint {
  color: rgba(226, 232, 240, 0.8);
}

.ai-questions-templates {
  height: 140px;
  resize: vertical;
}

.ai-questions-template-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-template-chip {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 13px;
  transition: background 120ms ease, transform 120ms ease, border-color 120ms ease;
}

.ai-template-chip:hover,
.ai-template-chip:focus-visible {
  background: #ede9fe;
  border-color: #6b21a8;
  outline: none;
  transform: translateY(-1px);
}

.theme-dark .ai-template-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.theme-dark .ai-template-chip:hover,
.theme-dark .ai-template-chip:focus-visible {
  background: rgba(139, 92, 246, 0.14);
  border-color: #a78bfa;
}

.play-body.dark-mode .ai-template-chip,
body.dark-mode .ai-template-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.play-body.dark-mode .ai-template-chip:hover,
.play-body.dark-mode .ai-template-chip:focus-visible,
body.dark-mode .ai-template-chip:hover,
body.dark-mode .ai-template-chip:focus-visible {
  background: rgba(139, 92, 246, 0.14);
  border-color: #a78bfa;
}

.ai-questions-error {
  margin: 0;
  font-weight: 700;
  font-size: 13px;
  color: #b91c1c;
}

.theme-dark .ai-questions-error {
  color: #f87171;
}

.ai-questions-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-questions-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  height: 48px;
}

.ai-questions-count {
  width: 90px;
  padding-right: 42px;
  height: 48px;
  min-height: 48px;
  -moz-appearance: textfield;
}

.ai-questions-count::-webkit-outer-spin-button,
.ai-questions-count::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ai-questions-count-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.ai-questions-count-label {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  pointer-events: none;
  text-transform: lowercase;
}

.theme-dark .ai-questions-count-label {
  color: rgba(226, 232, 240, 0.8);
}

.ai-questions-controls .form-control-sm {
  height: 100%;
  min-height: 48px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.ai-questions-controls .btn {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}

.ai-questions-section-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: #111827;
}

.theme-dark .ai-questions-section-title {
  color: #f8fafc;
}

.play-body.dark-mode .ai-questions-section-title,
body.dark-mode .ai-questions-section-title {
  color: #f8fafc;
}

.ai-questions-textarea {
  min-height: 0;
  height: 220px;
  resize: vertical;
}

.ai-questions-prompt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  background: #f8fafc;
}

.play-body.dark-mode .ai-questions-helper .form-control,
.play-body.dark-mode .ai-questions-helper .form-control-sm,
.play-body.dark-mode .ai-questions-helper select,
.play-body.dark-mode .ai-questions-helper textarea,
body.dark-mode .ai-questions-helper .form-control,
body.dark-mode .ai-questions-helper .form-control-sm,
body.dark-mode .ai-questions-helper select,
body.dark-mode .ai-questions-helper textarea {
  background: #0f172a;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}

.play-body.dark-mode .ai-questions-helper .form-control::placeholder,
.play-body.dark-mode .ai-questions-helper textarea::placeholder,
body.dark-mode .ai-questions-helper .form-control::placeholder,
body.dark-mode .ai-questions-helper textarea::placeholder {
  color: #94a3b8;
}

.play-body.dark-mode .ai-questions-count-label,
body.dark-mode .ai-questions-count-label {
  color: rgba(226, 232, 240, 0.85);
}

.play-body.dark-mode .ai-questions-helper .btn-outline-secondary,
body.dark-mode .ai-questions-helper .btn-outline-secondary {
  color: #cbd5f5;
  border-color: transparent;
  background: linear-gradient(#111318, #111318) padding-box,
    linear-gradient(135deg, #60a5fa, #a855f7, #22d3ee) border-box;
}

.play-body.dark-mode .ai-questions-helper .btn-outline-secondary:hover,
.play-body.dark-mode .ai-questions-helper .btn-outline-secondary:focus-visible,
body.dark-mode .ai-questions-helper .btn-outline-secondary:hover,
body.dark-mode .ai-questions-helper .btn-outline-secondary:focus-visible {
  color: #e2e8f0;
  border-color: transparent;
  background: linear-gradient(#111318, #111318) padding-box,
    linear-gradient(135deg, rgba(96, 165, 250, 0.9), rgba(168, 85, 247, 0.9), rgba(34, 211, 238, 0.9)) border-box;
}

.ai-questions-prompt-wrap {
  position: relative;
  overflow: hidden;
}

.ai-questions-prompt-wrap .ai-questions-prompt {
  position: relative;
  z-index: 2;
  color: inherit;
  caret-color: auto;
}

.ai-questions-prompt-wrap .ai-questions-prompt:focus-visible {
  color: inherit;
}

.ai-questions-prompt-preview {
  display: none;
}

.theme-dark .ai-questions-prompt-preview {
  color: inherit;
}

.ai-questions-prompt-preview strong {
  font-weight: 700;
}

.theme-dark .ai-questions-prompt {
  background: rgba(255, 255, 255, 0.06);
}

.play-body.dark-mode .ai-questions-prompt,
body.dark-mode .ai-questions-prompt {
  background: rgba(255, 255, 255, 0.06);
}

.ai-questions-status {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  color: #6b7280;
}

.ai-questions-status.is-success {
  color: #15803d;
}

.ai-questions-status.is-error {
  color: #b91c1c;
}

.theme-dark .ai-questions-status {
  color: rgba(226, 232, 240, 0.8);
}

.theme-dark .ai-questions-status.is-success {
  color: #22c55e;
}

.theme-dark .ai-questions-status.is-error {
  color: #f87171;
}

.play-body.dark-mode .ai-questions-status,
body.dark-mode .ai-questions-status {
  color: rgba(226, 232, 240, 0.8);
}

.play-body.dark-mode .ai-questions-status.is-success,
body.dark-mode .ai-questions-status.is-success {
  color: #22c55e;
}

.play-body.dark-mode .ai-questions-status.is-error,
body.dark-mode .ai-questions-status.is-error {
  color: #f87171;
}

.question-generator {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
  box-shadow: none;
}

.theme-dark .question-generator {
  background: #111318;
  border-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .question-generator,
body.dark-mode .question-generator {
  background: #111318;
  border-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .lesson-slides .form-control,
.play-body.dark-mode .lesson-slides .form-control-sm,
.play-body.dark-mode .lesson-slides select,
.play-body.dark-mode .lesson-slides textarea,
body.dark-mode .lesson-slides .form-control,
body.dark-mode .lesson-slides .form-control-sm,
body.dark-mode .lesson-slides select,
body.dark-mode .lesson-slides textarea {
  background: #0f172a;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}

.play-body.dark-mode .lesson-slides .form-control::placeholder,
.play-body.dark-mode .lesson-slides textarea::placeholder,
body.dark-mode .lesson-slides .form-control::placeholder,
body.dark-mode .lesson-slides textarea::placeholder {
  color: #94a3b8;
}

.play-body.dark-mode .lesson-slides .form-control:focus,
.play-body.dark-mode .lesson-slides textarea:focus,
body.dark-mode .lesson-slides .form-control:focus,
body.dark-mode .lesson-slides textarea:focus {
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.play-body.dark-mode #questionClearBtn,
body.dark-mode #questionClearBtn {
  background: #1f2937;
  border-color: rgba(226, 232, 240, 0.2);
  color: #e2e8f0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.play-body.dark-mode #questionClearBtn:hover,
.play-body.dark-mode #questionClearBtn:focus-visible,
body.dark-mode #questionClearBtn:hover,
body.dark-mode #questionClearBtn:focus-visible {
  background: #273449;
  border-color: rgba(226, 232, 240, 0.35);
}

.play-body.dark-mode #questionSaveBtn,
body.dark-mode #questionSaveBtn {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.35);
}

.play-body.dark-mode #questionSaveBtn:hover,
.play-body.dark-mode #questionSaveBtn:focus-visible,
body.dark-mode #questionSaveBtn:hover,
body.dark-mode #questionSaveBtn:focus-visible {
  background: #6d28d9;
  border-color: #5b21b6;
  box-shadow: 0 12px 26px rgba(109, 40, 217, 0.4);
}

.play-body.dark-mode #questionImageChoose,
.play-body.dark-mode #lessonThumbChoose,
body.dark-mode #questionImageChoose,
body.dark-mode #lessonThumbChoose {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(124, 58, 237, 0.5);
  color: #e9d5ff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.2);
}

.play-body.dark-mode #questionImageChoose:hover,
.play-body.dark-mode #questionImageChoose:focus-visible,
.play-body.dark-mode #lessonThumbChoose:hover,
.play-body.dark-mode #lessonThumbChoose:focus-visible,
body.dark-mode #questionImageChoose:hover,
body.dark-mode #questionImageChoose:focus-visible,
body.dark-mode #lessonThumbChoose:hover,
body.dark-mode #lessonThumbChoose:focus-visible {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(167, 139, 250, 0.7);
  color: #f3e8ff;
}

.play-body.dark-mode #lessonThumbClear,
body.dark-mode #lessonThumbClear {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

.play-body.dark-mode #lessonThumbClear:hover,
.play-body.dark-mode #lessonThumbClear:focus-visible,
body.dark-mode #lessonThumbClear:hover,
body.dark-mode #lessonThumbClear:focus-visible {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.75);
  color: #fee2e2;
}

.question-generator-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.question-generator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin-top: 12px;
}

.question-generator-grid.column {
  grid-template-columns: 1fr;
  gap: 10px;
}

.question-image-actions {
  display: grid;
  gap: 6px;
  align-content: start;
}

.lesson-answer-input {
  position: relative;
}

.lesson-answer-control {
  padding-right: 44px;
}

.lesson-answer-input.is-correct .lesson-answer-control {
  padding-right: 54px;
}

.lesson-answer-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #0b0f1a;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 120ms ease;
}

.lesson-answer-icon:hover,
.lesson-answer-icon:focus-visible {
  color: #111827;
}

.lesson-answer-icon.is-active {
  color: #0b0f1a;
}

.lesson-answer-icon.is-correct {
  color: #15803d;
}

.lesson-answer-check {
  display: none;
  margin-left: 6px;
}

.lesson-answer-icon.is-correct .lesson-answer-check {
  display: inline-flex;
}

.lesson-answer-icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.25);
}

.question-choices {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.question-choice-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.question-choice-row .form-control {
  flex: 1 1 auto;
  padding-right: 38px;
}

.question-choice-row i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

.question-choice-row.is-correct i {
  color: #16a34a;
}

.question-choice-row:not(.is-correct) i,
.question-choice-row i {
  color: #ef4444;
}

.question-image-btn-wide {
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
  border: 1px solid #ec4899;
  color: #fff;
  padding: 12px 16px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(236, 72, 153, 0.25);
  transition: filter 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.question-image-btn-wide:hover {
  filter: brightness(1.02);
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.28);
  transform: translateY(-1px);
}

.question-image-btn-wide:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(236, 72, 153, 0.3),
    0 10px 20px rgba(236, 72, 153, 0.28);
}
.question-image-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

#questionImageChoose,
#lessonThumbChoose {
  background: #f5f0ff;
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #6b21a8;
  border-radius: 12px;
  height: 41px;
  padding: 0 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.08);
}

#questionImageChoose:hover,
#questionImageChoose:focus-visible,
#lessonThumbChoose:hover,
#lessonThumbChoose:focus-visible {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(107, 33, 168, 0.5);
  color: #5b21b6;
}

#questionImageChoose.has-image {
  background: #eef2ff;
  border-color: rgba(79, 70, 229, 0.6);
  color: #312e81;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
}

#questionImageChoose.has-image:hover,
#questionImageChoose.has-image:focus-visible {
  background: #e0e7ff;
  border-color: rgba(67, 56, 202, 0.75);
  color: #1f1b7a;
}

#lessonThumbClear {
  background: #fff3f3;
  border-radius: 12px;
  height: 41px;
  padding: 0 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.12);
}

#lessonThumbClear:hover,
#lessonThumbClear:focus-visible {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.6);
  color: #c1121f;
}


.question-generator-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 12px;
}

#questionClearBtn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #374151;
  border-radius: 12px;
  height: 41px;
  padding: 0 16px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(55, 65, 81, 0.08);
}

#questionClearBtn:hover,
#questionClearBtn:focus-visible {
  background: #e5e7eb;
  border-color: #cbd5e1;
  color: #1f2937;
}

#questionSaveBtn {
  background: #6b21a8;
  border: 1px solid #6b21a8;
  color: #fff;
  border-radius: 12px;
  height: 41px;
  padding: 0 18px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(107, 33, 168, 0.18);
}

#questionSaveBtn:hover,
#questionSaveBtn:focus-visible {
  background: #5b21b6;
  border-color: #4c1d95;
  box-shadow: 0 12px 26px rgba(76, 29, 149, 0.22);
}

.question-generator-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.1;
}

.question-generator-actions .btn i {
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.input-with-button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.lesson-slides-list {
  display: grid;
  gap: 12px;
}

.lesson-slide-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
}

.lesson-slide-card.compact {
  padding: 14px 16px;
  box-shadow: 0 14px 38px rgba(17, 24, 39, 0.08);
}

.theme-dark .lesson-slide-card.compact {
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}

.lesson-slide-main {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 12px;
}

.lesson-slide-question {
  font-weight: 700;
  font-size: 17px;
  color: #111827;
  word-break: break-word;
}

.theme-dark .lesson-slide-question {
  color: #f8fafc;
}

.lesson-slide-answer {
  font-weight: 700;
  font-size: 17px;
  color: #0f766e;
  word-break: break-word;
  text-align: center;
}

.lesson-slide-editable {
  cursor: text;
  outline: none;
}

.lesson-slide-editable:focus-visible {
  box-shadow: 0 -2px 0 rgba(124, 58, 237, 0.35) inset;
}

.lesson-slide-thumb-button {
  cursor: pointer;
}

.lesson-slide-thumb-button:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.35);
  outline-offset: 2px;
}

.theme-dark .lesson-slide-answer {
  color: #38d9a9;
}

.lesson-slide-thumb {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  display: grid;
  place-items: center;
}

.lesson-slide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-dark .lesson-slide-thumb {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
}

.lesson-slide-thumb.is-placeholder {
  background: rgba(120, 61, 210, 0.08);
  color: #7c3aed;
  font-weight: 600;
  font-size: 12px;
}

.lesson-slide-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.lesson-slide-main.is-inline-editing {
  align-items: start;
}

.lesson-slide-inline-editor {
  display: grid;
  gap: 8px;
  width: 100%;
  grid-column: 1 / span 2;
}

.lesson-slide-inline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lesson-slide-wrong-row {
  grid-template-columns: repeat(3, 1fr);
}

.question-card-field {
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  resize: none;
  min-height: 48px;
  height: 48px;
  line-height: 1.25;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.question-card-field::placeholder {
  color: rgba(17, 24, 39, 0.45);
  font-weight: 500;
}

.question-card-field:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.8);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.theme-dark .question-card-field {
  background: #111827;
  border-color: rgba(248, 250, 252, 0.12);
  color: #f8fafc;
}

.theme-dark .question-card-field::placeholder {
  color: rgba(248, 250, 252, 0.45);
}

.play-body.dark-mode .question-card-field,
body.dark-mode .question-card-field {
  background: #111827;
  border-color: rgba(248, 250, 252, 0.12);
  color: #f8fafc;
}

.play-body.dark-mode .question-card-field::placeholder,
body.dark-mode .question-card-field::placeholder {
  color: rgba(248, 250, 252, 0.45);
}

.lesson-slide-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lesson-slide-thumb.is-inline-edit-thumb {
  grid-column: 3;
  justify-self: end;
}

.lesson-slide-thumb-wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
  align-items: center;
}

.lesson-slide-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lesson-slide-actions-sort {
  display: flex;
  gap: 8px;
  align-items: center;
  align-self: center;
  flex-direction: row;
}

.lesson-slide-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #111827;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.lesson-slide-icon-btn:hover,
.lesson-slide-icon-btn:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  color: #111827;
}

.lesson-slide-icon-btn.is-danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.25);
}

.lesson-slide-icon-btn.is-active {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}

.lesson-slide-icon-btn.is-active:hover,
.lesson-slide-icon-btn.is-active:focus-visible {
  background: rgba(124, 58, 237, 0.15);
}

.lesson-slide-icon-btn.is-danger:hover,
.lesson-slide-icon-btn.is-danger:focus-visible {
  background: rgba(220, 38, 38, 0.08);
}

.lesson-slide-icon-btn.is-ghost {
  border-color: rgba(0, 0, 0, 0.08);
  color: #111827;
}

.lesson-slide-icon-btn.icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  gap: 0;
}

.lesson-slide-icon-btn.bare-icon {
  border: none;
  background: transparent;
  width: auto;
  height: 34px;
  padding: 0;
}

.lesson-slide-icon-btn.icon-only i {
  transition: color 140ms ease;
  font-size: 18px;
}

.lesson-slide-icon-btn.icon-only:hover i,
.lesson-slide-icon-btn.icon-only:focus-visible i {
  color: #6b7280;
}

.lesson-slide-icon-btn.icon-only i[data-hover-icon]:hover,
.lesson-slide-icon-btn.icon-only i[data-hover-icon]:focus-visible {
  color: #6b7280;
}

.theme-dark .lesson-slide-icon-btn {
  background: #0f172a;
  border-color: rgba(124, 58, 237, 0.45);
  color: #c084fc;
}

.theme-dark .lesson-slide-icon-btn.is-ghost {
  border-color: rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
}

.theme-dark .lesson-slide-icon-btn.is-active {
  border-color: rgba(124, 58, 237, 0.65);
  background: rgba(124, 58, 237, 0.25);
  color: #f5e1ff;
}

.add-question-card {
  border: 1px dashed rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.05);
  color: #7c3aed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 148px;
  cursor: pointer;
  outline: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.add-question-card:hover,
.add-question-card:focus-visible {
  border-color: rgba(124, 58, 237, 0.85);
  background: rgba(124, 58, 237, 0.12);
  transform: translateY(-1px);
}

.add-question-card:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.35);
  outline-offset: 3px;
}

.add-question-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7c3aed;
}

.add-question-card-icon i {
  font-size: 32px;
}

.add-question-card-label {
  font-size: 15px;
  font-weight: 600;
}

.theme-dark .add-question-card {
  border-color: rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.12);
  color: #e9d5ff;
}

.theme-dark .add-question-card-icon {
  background: rgba(124, 58, 237, 0.28);
  color: #f3e8ff;
}

.theme-dark .lesson-slide-icon-btn.is-danger {
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}
.theme-dark .lesson-slide-card {
  background: #1b1e26;
  border-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .add-question-card,
body.dark-mode .add-question-card {
  border-color: rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.12);
  color: #e9d5ff;
}

.play-body.dark-mode .add-question-card-icon,
body.dark-mode .add-question-card-icon {
  background: rgba(124, 58, 237, 0.28);
  color: #f3e8ff;
}

.play-body.dark-mode .lesson-slide-icon-btn,
body.dark-mode .lesson-slide-icon-btn {
  background: #0f172a;
  border-color: rgba(124, 58, 237, 0.45);
  color: #c084fc;
}

.play-body.dark-mode .lesson-slide-icon-btn.is-ghost,
body.dark-mode .lesson-slide-icon-btn.is-ghost {
  border-color: rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
}

.play-body.dark-mode .lesson-slide-icon-btn.is-active,
body.dark-mode .lesson-slide-icon-btn.is-active {
  border-color: rgba(124, 58, 237, 0.65);
  background: rgba(124, 58, 237, 0.25);
  color: #f5e1ff;
}

.play-body.dark-mode .lesson-slide-icon-btn.is-danger,
body.dark-mode .lesson-slide-icon-btn.is-danger {
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.play-body.dark-mode .lesson-slide-card,
body.dark-mode .lesson-slide-card {
  background: #1b1e26;
  border-color: rgba(255, 255, 255, 0.08);
}

.lesson-slide-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.lesson-slide-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lesson-slide-fields {
  display: grid;
  gap: 10px;
}

.lesson-slide-media {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.lesson-slide-thumb img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.lesson-slide-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-empty {
  padding: 16px;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  text-align: center;
  color: #6b7280;
}

.theme-dark .lesson-empty {
  color: #cbd5f5;
  border-color: rgba(255, 255, 255, 0.12);
}

.lesson-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.maker-engine {
  display: grid;
  gap: 18px;
}

.zg-maker-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: start;
}

#makerView .lesson-view-top {
  justify-content: flex-end;
}

.maker-help-wrap {
  position: relative;
  display: inline-flex;
}

.maker-help-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.maker-help-btn i {
  font-size: 18px;
}

.maker-help-btn:hover,
.maker-help-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.maker-help-panel {
  position: absolute;
  top: 52px;
  right: 0;
  width: 280px;
  background: #ffffff;
  color: #111827;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
  padding: 14px 14px 12px;
  display: grid;
  gap: 10px;
  z-index: 5;
}

.maker-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.maker-help-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.maker-help-close {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.maker-help-close i {
  font-size: 14px;
}

.maker-help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
}

.maker-lesson-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #6b7280;
}

.maker-lesson-login {
  color: inherit;
  text-decoration: underline;
}

.play-body.dark-mode .maker-engine-section .form-control,
.play-body.dark-mode .maker-engine-section .form-select,
.play-body.dark-mode .maker-engine-section textarea,
body.dark-mode .maker-engine-section .form-control,
body.dark-mode .maker-engine-section .form-select,
body.dark-mode .maker-engine-section textarea {
  background: #0f172a;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}

.play-body.dark-mode .maker-engine-section .form-control::placeholder,
.play-body.dark-mode .maker-engine-section textarea::placeholder,
body.dark-mode .maker-engine-section .form-control::placeholder,
body.dark-mode .maker-engine-section textarea::placeholder {
  color: #94a3b8;
}

.play-body.dark-mode .maker-lesson-hint,
body.dark-mode .maker-lesson-hint {
  color: #a4a7c2;
}

.play-body.dark-mode .maker-engine-section input[type="radio"],
.play-body.dark-mode .maker-engine-section input[type="checkbox"],
body.dark-mode .maker-engine-section input[type="radio"],
body.dark-mode .maker-engine-section input[type="checkbox"] {
  accent-color: #7c3aed;
  background-color: #0f172a;
  border-color: rgba(255, 255, 255, 0.32);
}

.play-body.dark-mode .maker-engine-section input[type="radio"]:focus,
.play-body.dark-mode .maker-engine-section input[type="checkbox"]:focus,
body.dark-mode .maker-engine-section input[type="radio"]:focus,
body.dark-mode .maker-engine-section input[type="checkbox"]:focus {
  box-shadow: 0 0 0 0.15rem rgba(124, 58, 237, 0.25);
}

.zg-maker-left {
  display: grid;
  gap: 18px;
}

.zg-maker-right {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
  align-self: start;
}

.zg-maker-preview {
  position: static;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

.zg-maker-right .maker-engine-section {
  margin-top: 0;
}

@supports not (position: sticky) {
  .zg-maker-preview {
    position: static;
    max-height: none;
  }
}

.maker-preview-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.maker-preview-label {
  font-size: 12px;
  color: #6b7280;
}

.maker-export-controls {
  display: grid;
  gap: 6px;
}

.maker-export-buttons {
  margin-top: 8px;
}

.maker-engine-section {
  display: grid;
  gap: 12px;
}

.maker-section-title {
  margin: 0;
  font-size: 16px;
}

.maker-controls {
  display: grid;
  gap: 12px;
}

.maker-controls-simple,
.maker-controls-advanced {
  display: grid;
  gap: 10px;
}

.maker-title-field {
  display: grid;
  gap: 6px;
}

.maker-control {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.maker-control-textarea {
  width: 100%;
  resize: vertical;
}

.maker-control.is-toggle {
  align-items: center;
}

.maker-control-label {
  font-weight: 600;
  color: #6b7280;
}

.maker-control-help {
  font-size: 12px;
  color: #6b7280;
}

.maker-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.maker-source-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.maker-source-tab {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 999px;
  padding: 6px 14px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.maker-source-tab.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}

.maker-source-panel {
  display: grid;
  gap: 10px;
}

.maker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.maker-lesson-row {
  flex-wrap: nowrap;
  align-items: center;
}

.maker-lesson-row .form-select {
  flex: 1 1 auto;
  min-width: 0;
}

.maker-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.maker-field-row {
  align-items: flex-start;
}

.maker-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  display: block;
}

.maker-textarea {
  width: 100%;
  resize: vertical;
}

.maker-text-input {
  min-width: 220px;
}

.maker-radio-group {
  display: grid;
  gap: 6px;
}

.maker-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.maker-list-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.maker-list-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.maker-list-count {
  font-size: 13px;
  color: #6b7280;
}

.maker-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.maker-list li {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8f7ff;
  font-size: 13px;
}

.maker-seed-badge {
  font-size: 12px;
  color: #6b7280;
}

.maker-advanced-toggle {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  text-decoration: underline;
  padding: 0;
  align-self: flex-start;
}

.maker-advanced-panel {
  display: grid;
  gap: 8px;
}

.maker-seed-panel {
  display: grid;
  gap: 6px;
}

.maker-seed-row {
  align-items: center;
}

.maker-seed-value {
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 999px;
}

.maker-preview {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 20px;
  padding: 16px 12px;
  background: #ffffff;
  flex: 1;
  overflow: auto;
  scrollbar-width: thin;
}

.zg-maker-preview .maker-preview-page {
  box-shadow: none;
}

.zg-maker-preview .maker-uw-table th {
  white-space: nowrap;
}

.maker-preview::-webkit-scrollbar {
  width: 8px;
}

.maker-preview::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 999px;
}

.maker-preview::-webkit-scrollbar-track {
  background: transparent;
}

.maker-preview-pages {
  display: grid;
  gap: 16px;
  grid-auto-flow: row;
  padding: 0 4px;
}

.maker-preview-page {
  background: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 16px;
  min-height: 360px;
  aspect-ratio: 210 / 297;
  box-shadow: none;
  margin: 0;
}

.maker-preview-page:last-child {
  margin-bottom: 0;
}

@media (max-width: 1000px) {
  .zg-maker-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .zg-maker-right {
    position: static;
  }

  .zg-maker-preview {
    position: static;
    max-height: none;
  }

  .maker-preview {
    max-height: none;
  }
}

.maker-preview-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
}

.maker-preview-list,
.maker-print-list {
  padding-left: 18px;
  line-height: 1.4;
}

.maker-preview-empty {
  color: #6b7280;
  font-size: 13px;
}

.maker-wp-page,
.maker-ml-page,
.maker-uw-page {
  display: grid;
  gap: 12px;
}

.maker-uw-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.maker-wp-title,
.maker-ml-title,
.maker-uw-title {
  font-weight: 700;
  font-size: 18px;
}

.maker-wp-header {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  font-size: 12px;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
}

.maker-wp-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
}

.maker-wp-item {
  display: grid;
  gap: 8px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.maker-wp-prompt {
  font-weight: 600;
}

.maker-wp-lines {
  display: grid;
  gap: 8px;
}

.maker-wp-line {
  border-bottom: 1px solid #cbd5f5;
  height: 24px;
}

.maker-wp-empty,
.maker-ml-empty {
  color: #6b7280;
  font-size: 13px;
}

.maker-ml-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}

.maker-ml-item {
  display: grid;
  gap: 4px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.maker-ml-mask {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.maker-ml-answer {
  font-size: 12px;
  color: #6b7280;
}

.maker-ml-key {
  padding-left: 18px;
}

.maker-ml-key li {
  break-inside: avoid;
  page-break-inside: avoid;
}

.maker-ws-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.maker-ws-title {
  font-weight: 700;
  font-size: 18px;
}

.maker-ws-instruction {
  font-size: 13px;
  color: #1f2937;
}

.maker-ws-puzzle {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.maker-ws-grid {
  display: grid;
  grid-template-columns: repeat(var(--ws-size), 1fr);
  grid-auto-rows: 1fr;
  width: min(100%, 180mm);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border: 1px solid #d1d5db;
}

.maker-ws-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--ws-font, 14px);
  line-height: 1;
  border: 1px solid #d1d5db;
  text-transform: uppercase;
}

.maker-ws-cell.is-marked {
  background: #f3f4f6;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.maker-ws-bank {
  list-style: none;
  padding: 0;
  margin: 0;
  column-gap: 12px;
  font-size: 12px;
}

.maker-ws-bank li {
  padding: 2px 0;
  break-inside: avoid;
}

.maker-ws-skipped {
  font-size: 11px;
  color: #6b7280;
}

.maker-ws-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #6b7280;
}

.maker-bingo-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.maker-bingo-title {
  font-weight: 700;
  font-size: 18px;
}

.maker-bingo-instruction {
  font-size: 13px;
  color: #1f2937;
}

.maker-bingo-grid-wrap {
  flex: 1;
  display: flex;
  min-height: 0;
}

.maker-bingo-grid {
  display: grid;
  grid-template-columns: repeat(var(--bingo-size), 1fr);
  grid-template-rows: repeat(var(--bingo-size), 1fr);
  width: 100%;
  height: 100%;
  flex: 1;
  border: 1px solid #d1d5db;
}

.maker-bingo-cell {
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-align: center;
  font-weight: 600;
  font-size: var(--bingo-font, 16px);
  line-height: 1.15;
  word-break: break-word;
}

.maker-bingo-cell.is-free {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.maker-bingo-calllist {
  column-gap: 16px;
  font-size: 12px;
}

.maker-bingo-calllist > div {
  padding: 4px 0;
  break-inside: avoid;
}

.maker-bingo-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #6b7280;
}

.maker-bingo-empty {
  color: #6b7280;
  font-size: 13px;
}

.maker-ss-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.maker-ss-title {
  font-weight: 700;
  font-size: 18px;
}

.maker-ss-instruction {
  font-size: 13px;
  color: #1f2937;
}

.maker-ss-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  flex: 1;
}

.maker-ss-item {
  display: grid;
  gap: 8px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.maker-ss-scramble {
  font-weight: 600;
  font-size: var(--zg-fontSize, 16px);
  color: #111827;
}

.maker-ss-scramble-line {
  word-break: break-word;
}

.maker-ss-answer-hint {
  font-size: 12px;
  color: #6b7280;
}

.maker-ss-lines {
  display: grid;
  gap: 8px;
}

.maker-ss-line {
  border-bottom: 1px solid #cbd5f5;
  height: 24px;
}

.maker-ss-answer-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}

.maker-ss-answer-item {
  break-inside: avoid;
  page-break-inside: avoid;
}

.maker-ss-answer-scramble {
  font-size: 12px;
  color: #6b7280;
}

.maker-ss-answer-text {
  font-weight: 600;
  font-size: 14px;
}

.maker-ss-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #6b7280;
}

.maker-ss-empty {
  color: #6b7280;
  font-size: 13px;
}

.play-body.dark-mode .maker-ss-instruction,
body.dark-mode .maker-ss-instruction {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-ss-scramble,
body.dark-mode .maker-ss-scramble {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-ss-answer-text,
body.dark-mode .maker-ss-answer-text {
  color: #e5e7eb;
}

.maker-fitb-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.maker-fitb-title {
  font-weight: 700;
  font-size: 18px;
}

.maker-fitb-instruction {
  font-size: 13px;
  color: #1f2937;
}

.maker-fitb-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  flex: 1;
}

.maker-fitb-item {
  display: grid;
  gap: 8px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.maker-fitb-cloze {
  font-weight: 600;
  font-size: var(--zg-fontSize, 16px);
  color: #111827;
  line-height: 1.4;
  word-break: break-word;
}

.maker-fitb-blank {
  display: inline-block;
  border-bottom: 2px solid #111827;
  height: 1em;
  vertical-align: baseline;
  min-width: 4ch;
  margin: 0 2px;
}

.maker-fitb-blank.is-box {
  border: 1px solid #111827;
  border-bottom: 1px solid #111827;
  height: 1.2em;
  border-radius: 4px;
}

.maker-fitb-answer-hint {
  font-size: 12px;
  color: #6b7280;
}

.maker-fitb-lines {
  display: grid;
  gap: 8px;
}

.maker-fitb-line {
  border-bottom: 1px solid #cbd5f5;
  height: 24px;
}

.maker-fitb-answer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.maker-fitb-answer-item {
  break-inside: avoid;
  page-break-inside: avoid;
}

.maker-fitb-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #6b7280;
}

.maker-fitb-empty {
  color: #6b7280;
  font-size: 13px;
}

.play-body.dark-mode .maker-fitb-instruction,
body.dark-mode .maker-fitb-instruction {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-fitb-cloze,
body.dark-mode .maker-fitb-cloze {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-fitb-blank,
body.dark-mode .maker-fitb-blank {
  border-color: #e5e7eb;
}

.play-body.dark-mode .maker-fitb-answer-item,
body.dark-mode .maker-fitb-answer-item {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-fitb-answer-list,
body.dark-mode .maker-fitb-answer-list {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-bingo-instruction,
body.dark-mode .maker-bingo-instruction {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-bingo-grid,
body.dark-mode .maker-bingo-grid {
  border-color: rgba(255, 255, 255, 0.2);
}

.play-body.dark-mode .maker-bingo-cell,
body.dark-mode .maker-bingo-cell {
  border-color: rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
}

.play-body.dark-mode .maker-bingo-calllist,
body.dark-mode .maker-bingo-calllist {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-ws-instruction,
body.dark-mode .maker-ws-instruction {
  color: #e5e7eb;
}

.play-body.dark-mode .maker-ws-grid,
body.dark-mode .maker-ws-grid {
  border-color: rgba(255, 255, 255, 0.2);
}

.play-body.dark-mode .maker-ws-cell,
body.dark-mode .maker-ws-cell {
  border-color: rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
}

.play-body.dark-mode .maker-ws-bank li,
body.dark-mode .maker-ws-bank li {
  color: #e5e7eb;
}

.maker-uw-instruction {
  font-size: 13px;
  color: #1f2937;
}

.maker-uw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.maker-uw-table th,
.maker-uw-table td {
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  vertical-align: middle;
}

.maker-uw-table th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: left;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.maker-uw-table th:first-child,
.maker-uw-table td:first-child {
  width: 45%;
}

.maker-uw-table th:last-child,
.maker-uw-table td:last-child {
  width: 55%;
}

.maker-uw-word {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.maker-uw-answer-line {
  border-bottom: 1px solid #cbd5f5;
  height: 22px;
  width: 100%;
}

.maker-uw-answer-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.maker-uw-footer {
  margin-top: 12px;
  font-size: 11px;
  color: #6b7280;
}

.maker-uw-empty {
  color: #6b7280;
  font-size: 13px;
}

.maker-print-tip {
  margin: 12px 0 0;
  font-size: 12px;
  color: #111827;
  font-weight: 700;
}

.maker-print-root {
  display: none;
  position: fixed;
  inset: 0;
  background: #ffffff;
  color: #111111;
  overflow: visible;
  padding: 24px;
  z-index: 10000;
}

body.zg-printing > *:not(#pdfMakerPrintRoot) {
  display: none !important;
}

body.zg-printing #pdfMakerPrintRoot {
  display: block;
  position: static;
  inset: auto;
  padding: 0;
}

body.zg-printing .maker-print-page {
  width: 100%;
  min-height: 273mm;
  margin: 0 0 8mm;
  border: none;
  padding: 0;
  box-shadow: none;
}

.zg-print-page {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  font-size: var(--zg-fontSize, 16px);
}

body.zg-printing .zg-print-page {
  min-height: 273mm;
  height: auto;
}

body.zg-printing .zg-print-page.zg-print-fill {
  height: 273mm;
}

.zg-print-tableWrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.zg-print-tableWrap > * {
  flex: 1;
}

.zg-print-listWrap {
  display: block;
}

.zg-print-header {
  margin-bottom: 8px;
}

.zg-print-footer {
  margin-top: 12px;
  text-align: left;
  font-size: 11px;
  color: #6b7280;
}

.maker-print-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 12mm;
  padding: 18mm 16mm;
  box-sizing: border-box;
  background: #ffffff;
  color: #111111;
  border: 1px solid #d1d5db;
}

.maker-print-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.maker-print-empty {
  color: #6b7280;
}

@media print {
  @page {
    margin: 12mm;
    size: A4;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    height: auto !important;
    overflow: visible !important;
  }

  body.zg-printing > *:not(#pdfMakerPrintRoot) {
    display: none !important;
  }

  body.zg-printing #pdfMakerPrintRoot {
    display: block !important;
    position: static;
    padding: 0;
    overflow: visible !important;
  }

  body.zg-printing .maker-print-page {
    width: 100%;
    min-height: 273mm;
    margin: 0 0 8mm;
    border: none;
    padding: 0;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }

  body.zg-printing .maker-print-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  body.zg-printing .zg-print-page {
    min-height: 273mm;
    height: auto;
  }

  body.zg-printing .zg-print-page.zg-print-fill {
    height: 273mm;
  }

  body.zg-printing .zg-print-page tbody tr {
    height: var(--zg-rowH, 32px);
  }

  body.zg-printing .zg-print-table {
    height: 100%;
  }

  body.zg-printing .zg-print-page .maker-uw-table th,
  body.zg-printing .zg-print-page .maker-uw-table td {
    padding: 0 10px;
  }

  body.zg-printing .maker-uw-table {
    font-size: inherit;
  }

  body.zg-printing #pdfMakerPrintRoot,
  body.zg-printing #pdfMakerPrintRoot * {
    overflow: visible !important;
  }
}

.play-body.dark-mode .maker-source-tab {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #e5e7eb;
}

.play-body.dark-mode .maker-source-tab.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}

.play-body.dark-mode .maker-field-label,
.play-body.dark-mode .maker-list-count,
.play-body.dark-mode .maker-seed-badge,
.play-body.dark-mode .maker-advanced-toggle {
  color: #a4a7c2;
}

.play-body.dark-mode .maker-seed-value {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.play-body.dark-mode .maker-list li {
  background: rgba(124, 58, 237, 0.16);
  color: #f5f3ff;
}

.play-body.dark-mode .maker-preview {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.play-body.dark-mode .maker-preview-page {
  background: #201b2c;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f5f3ff;
}

.play-body.dark-mode .maker-control-label,
.play-body.dark-mode .maker-control-help,
.play-body.dark-mode .maker-ml-answer,
.play-body.dark-mode .maker-wp-header {
  color: #a4a7c2;
}

.play-body.dark-mode .maker-wp-line,
.play-body.dark-mode .maker-uw-answer-line {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.play-body.dark-mode .maker-print-tip {
  color: #a4a7c2;
}

.play-body.dark-mode .maker-preview-label {
  color: #a4a7c2;
}

.play-body.dark-mode .maker-help-btn,
body.dark-mode .maker-help-btn {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f3ff;
}

.play-body.dark-mode .maker-help-panel,
body.dark-mode .maker-help-panel {
  background: #1c1830;
  color: #f5f3ff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(3, 7, 18, 0.45);
}

.play-body.dark-mode .maker-help-list,
body.dark-mode .maker-help-list {
  color: #cbd5f5;
}

.play-body.dark-mode .maker-help-close,
body.dark-mode .maker-help-close {
  border-color: rgba(255, 255, 255, 0.2);
  color: #f5f3ff;
}

.play-body.dark-mode .maker-export-controls .maker-field-label {
  color: #a4a7c2;
}

.play-body.dark-mode .maker-uw-instruction {
  color: #e2e8f0;
}

.play-body.dark-mode .maker-uw-table th,
.play-body.dark-mode .maker-uw-table td {
  border-color: rgba(148, 163, 184, 0.4);
}

.play-body.dark-mode .maker-uw-table th {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.play-body.dark-mode .maker-uw-answer-hint,
.play-body.dark-mode .maker-uw-footer {
  color: #a4a7c2;
}

.lesson-view-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lesson-view-header {
  display: grid;
  gap: 14px;
}

#makerView .lesson-view-header {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.play-body.dark-mode #makerView .lesson-view-header,
body.dark-mode #makerView .lesson-view-header {
  background: transparent;
  border: none;
  box-shadow: none;
}

.lesson-view-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-view-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

.lesson-ghost-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.02);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.lesson-ghost-btn:hover,
.lesson-ghost-btn:focus-visible {
  background: rgba(107, 52, 196, 0.06);
  border-color: rgba(107, 52, 196, 0.28);
  outline: none;
  transform: translateY(-1px);
}

.lesson-view-titleblock {
  display: grid;
  gap: 2px;
}

.maker-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.maker-title-actions {
  margin-left: auto;
}

.lesson-view-kicker {
  margin: 0;
  color: #6b7280;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

.lesson-view-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.lesson-view-creator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lesson-view-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f6f5ff;
}

.lesson-view-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-creator-link {
  border: none;
  background: transparent;
  padding: 0;
  font-weight: 600;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.lesson-creator-inline {
  gap: 6px;
}

.lesson-creator-follow {
  border: 1px solid rgba(236, 72, 153, 0.25);
  background: rgba(236, 72, 153, 0.1);
  color: #e6007a;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.lesson-creator-follow:hover,
.lesson-creator-follow:focus-visible {
  background: rgba(236, 72, 153, 0.16);
  border-color: rgba(236, 72, 153, 0.38);
  outline: none;
}

.lesson-creator-follow.is-following {
  background: #f3f4f6;
  border-color: rgba(0, 0, 0, 0.08);
  color: #4b5563;
}

.lesson-creator-follow.is-following:hover,
.lesson-creator-follow.is-following:focus-visible {
  background: #e5e7eb;
  border-color: rgba(0, 0, 0, 0.14);
}

.lesson-creator-link:hover,
.lesson-creator-link:focus-visible {
  color: var(--secondary-color);
  outline: none;
}

.lesson-view-stats {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.lesson-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  font-weight: 700;
}

.lesson-stat.pill {
  background: rgba(107, 52, 196, 0.06);
  border-color: rgba(107, 52, 196, 0.2);
  color: #3a2f78;
}

.lesson-stat i {
  font-size: 16px;
}

.lesson-view-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lesson-owner-actions {
  display: flex;
  justify-content: flex-end;
}

.lesson-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #f8f8fb;
  color: inherit;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.lesson-action-btn i {
  font-size: 18px;
}

.lesson-action-btn:hover,
.lesson-action-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  background: #f3ecff;
  border-color: rgba(107, 52, 196, 0.26);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.lesson-view-meta,
.lesson-view-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Coursera-inspired lesson hero */
.lesson-hero {
  position: relative;
  overflow: visible;
  border-radius: 18px;
  padding: 32px;
  background:
    radial-gradient(120% 140% at 80% 10%, rgba(132, 105, 255, 0.08), transparent 40%),
    radial-gradient(120% 120% at 90% 70%, rgba(67, 220, 255, 0.08), transparent 45%),
    linear-gradient(135deg, #f7f9ff 0%, #f2f4ff 50%, #f8f9fb 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.lesson-hero-bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(50% 60% at 85% 40%, rgba(108, 142, 255, 0.14), transparent 50%),
    radial-gradient(60% 70% at 70% 70%, rgba(92, 213, 255, 0.12), transparent 60%);
  opacity: 0.6;
}

.lesson-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lesson-hero-left {
  display: grid;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
}

.lesson-hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-hero-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 13px;
  color: #6b7280;
}

.lesson-hero-title {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.2;
}

.lesson-hero-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-hero-title-block {
  display: grid;
  gap: 10px;
  width: 100%;
}

.lesson-hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.lesson-hero-cta-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: stretch;
}

.lesson-hero-cta {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.lesson-hero-cta:focus-visible,
.lesson-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
  outline: none;
}

.lesson-hero-cta.play {
  background: #2563eb;
  flex: 0 0 40%;
}

.lesson-hero-cta.slideshow {
  background: #f59e0b;
  flex: 0 0 20%;
}

.lesson-hero-cta.study {
  background: #10b981;
  flex: 0 0 20%;
}

.lesson-hero-cta.materials {
  background: #0ea5e9;
}

.lesson-hero-cta-wrap {
  position: relative;
  display: flex;
  flex: 0 0 20%;
}

.lesson-hero-cta-wrap .lesson-hero-cta {
  width: 100%;
}

.lesson-hero-cta.publish {
  background: #6b34c4;
  border: 1px solid #5728a3;
}

.lesson-hero-cta-row.is-private-lesson .lesson-hero-cta {
  flex: 1 !important;
}

.lesson-hero-cta-row.is-private-lesson .lesson-hero-cta-wrap {
  flex: 1 1 0;
}

.lesson-generate-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  padding: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 12;
}

.lesson-generate-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesson-generate-item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 6px 10px;
  border-radius: 10px;
  color: #0f172a;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.lesson-generate-item:hover,
.lesson-generate-item:focus-visible {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  outline: none;
}

.lesson-hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.lesson-hero-icon-btn {
  border: none;
  background: transparent;
  padding: 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: inherit;
  transition: background 120ms ease, transform 120ms ease, color 120ms ease;
  position: relative;
}

.lesson-hero-icon-btn:hover,
.lesson-hero-icon-btn:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
  outline: none;
}

.lesson-hero-icon-btn::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: -32px;
  transform: translate(-50%, 0);
  background: #f3f4f6;
  color: #111827;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.lesson-hero-icon-btn:hover::after,
.lesson-hero-icon-btn:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -2px);
}

.lesson-hero-icon-btn.danger {
  color: #b4231f;
}

.lesson-hero-icon-btn.danger:hover,
.lesson-hero-icon-btn.danger:focus-visible {
  background: rgba(220, 53, 69, 0.1);
}

.lesson-hero-icon-btn.danger::after {
  color: #b4231f;
  background: #fef2f2;
  box-shadow: 0 6px 14px rgba(220, 53, 69, 0.12);
}

.lesson-hero-actions .lesson-cta {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
}

.lesson-hero-instructors {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lesson-hero-avatars {
  display: inline-flex;
  align-items: center;
}

.lesson-hero-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  overflow: hidden;
  background: #f6f5ff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

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

.lesson-hero-avatars .lesson-hero-avatar:not(:first-child) {
  margin-left: -10px;
}

.lesson-hero-more {
  font-weight: 700;
  color: #5b6477;
}

.lesson-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  border: 1px solid var(--border-color);
  background: #fff;
  color: inherit;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.lesson-cta.primary {
  background: linear-gradient(135deg, #5a4df3, #7b5bff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 16px 30px rgba(90, 77, 243, 0.28);
}

.lesson-cta.ghost {
  background: rgba(255, 255, 255, 0.8);
}

.lesson-cta.danger {
  color: #b4231f;
  border-color: rgba(220, 53, 69, 0.3);
  background: #fff5f5;
}

.lesson-cta:hover,
.lesson-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  outline: none;
}

.lesson-cta.primary:hover,
.lesson-cta.primary:focus-visible {
  box-shadow: 0 18px 36px rgba(90, 77, 243, 0.35);
}

.lesson-hero-social {
  margin: 0;
  color: #4b5563;
  font-weight: 700;
  font-size: 13px;
}

.lesson-hero-social-number {
  color: #111827;
  font-weight: 800;
}

.lesson-hero-right {
  display: none;
}

.lesson-info-section {
  display: grid;
  gap: 10px;
}

.lesson-info-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: #7c82a1;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: color 140ms ease;
}

.lesson-info-toggle:hover,
.lesson-info-toggle:focus-visible {
  color: #4c3db8;
  outline: none;
}

.lesson-info-toggle-icon {
  transition: transform 160ms ease;
}

.lesson-info-toggle.is-open .lesson-info-toggle-icon {
  transform: rotate(180deg);
}

.lesson-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.lesson-info-item {
  padding: 10px 14px;
  display: grid;
  gap: 4px;
  align-items: center;
  position: relative;
}

.lesson-info-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 0;
  width: 1px;
  height: calc(100% - 20px);
  background: rgba(0, 0, 0, 0.06);
}

.lesson-info-topline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.lesson-info-icon {
  font-size: 16px;
  color: #5a4df3;
}

.lesson-info-label {
  margin: 0;
  color: #6b7280;
  font-weight: 700;
  font-size: 13px;
}

.lesson-view-tags.clean {
  padding: 0;
  gap: 6px;
}

.lesson-meta-chip,
.lesson-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
  border: 1px solid var(--border-color);
}

.lesson-tag-chip {
  background: #eef2ff;
  color: #3b2f73;
}

.lesson-questions {
  display: grid;
  gap: 12px;
}

.lesson-questions-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.lesson-questions-heading h3 {
  margin: 0;
  font-size: 20px;
}

.lesson-questions-subhead {
  margin: 0;
  color: #6b7280;
  font-weight: 600;
}

.lesson-questions-masonry {
  column-count: 3;
  column-gap: 16px;
  width: 100%;
}

@media (max-width: 768px) {
  .lesson-questions-masonry {
    column-count: 2;
  }
}

@media (min-width: 1080px) {
  .lesson-questions-masonry {
    column-count: 5;
  }
}

.lesson-question-card {
  display: grid;
  gap: 10px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 26px var(--shadow-weak);
  margin: 0 0 16px;
  overflow: hidden;
  break-inside: avoid;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.lesson-question-card:hover,
.lesson-question-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(107, 52, 196, 0.25);
  box-shadow: 0 16px 32px var(--shadow-mid);
  outline: none;
}

.lesson-question-card.is-static {
  cursor: default;
}

.lesson-question-thumb {
  position: relative;
  overflow: hidden;
}

.lesson-question-thumb img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.lesson-question-thumb.is-loading img {
  opacity: 0;
}

.lesson-question-body {
  padding: 14px 16px 6px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.lesson-question-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-weight: 700;
  font-size: 13px;
}

.lesson-question-text {
  margin: 0;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
  color: #1f2937;
  text-align: center;
}

.lesson-question-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px 14px;
}

.lesson-toggle-btn {
  border: none;
  background: transparent;
  color: #6b7280;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  text-align: center;
  cursor: pointer;
  transition: color 120ms ease;
}

.lesson-question-card:hover .lesson-toggle-btn,
.lesson-question-card:focus-visible .lesson-toggle-btn {
  color: var(--secondary-color);
}

.lesson-question-card.is-static .lesson-toggle-btn {
  color: #9ca3af;
  cursor: not-allowed;
}

.lesson-question-answer {
  padding: 0 16px;
  color: #374151;
  line-height: 1.5;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 180ms ease, opacity 180ms ease, margin-top 180ms ease;
}

.lesson-question-card.is-expanded .lesson-question-answer {
  max-height: 400px;
  opacity: 1;
  padding: 10px 16px 14px;
  margin-top: 6px;
}

.lesson-question-empty {
  padding: 18px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  text-align: center;
  color: #6b7280;
}

.lesson-card {
  text-align: left;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.lesson-stepper {
  --step-size: 60px;
  --connector-gap: 30px;
  display: grid;
  gap: 8px;
  margin-bottom: 26px;
  position: relative;
  padding-top: 24px;
  min-height: calc(var(--step-size) + 24px);
}

.lesson-stepper-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 0 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.theme-dark .lesson-stepper-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.play-body.dark-mode .lesson-stepper-footer,
body.dark-mode .lesson-stepper-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.lesson-stepper-footer .btn {
  min-width: 140px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.theme-dark .lesson-stepper-footer .btn {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.play-body.dark-mode .lesson-stepper-footer .btn,
body.dark-mode .lesson-stepper-footer .btn {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.lesson-ai-pink {
  background-color: #ec4899;
  border-color: #ec4899;
  color: #ffffff;
}

.lesson-ai-pink:hover,
.lesson-ai-pink:focus-visible {
  background-color: #db2777;
  border-color: #db2777;
  color: #ffffff;
}

.lesson-ai-pink:active,
.lesson-ai-pink.active {
  background-color: #be185d;
  border-color: #be185d;
  color: #ffffff;
}

.play-body.dark-mode .lesson-ai-pink,
body.dark-mode .lesson-ai-pink {
  background-color: #ec4899;
  border-color: #ec4899;
  color: #ffffff;
}

.play-body.dark-mode .lesson-ai-pink:hover,
.play-body.dark-mode .lesson-ai-pink:focus-visible,
body.dark-mode .lesson-ai-pink:hover,
body.dark-mode .lesson-ai-pink:focus-visible {
  background-color: #db2777;
  border-color: #db2777;
  color: #ffffff;
}

.play-body.dark-mode .lesson-ai-pink:active,
.play-body.dark-mode .lesson-ai-pink.active,
body.dark-mode .lesson-ai-pink:active,
body.dark-mode .lesson-ai-pink.active {
  background-color: #be185d;
  border-color: #be185d;
  color: #ffffff;
}

#lessonNextStep {
  margin-left: 0;
}

#lessonAiStep {
  margin-left: auto;
}

#lessonPublishSave.lesson-publish-cta {
  margin-left: auto;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#lessonPublishSave.lesson-publish-cta.is-loading {
  pointer-events: none;
  opacity: 0.9;
}

#lessonPublishSave.lesson-publish-cta.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.12), rgba(124, 58, 237, 0.28), rgba(124, 58, 237, 0.12));
  animation: publishSweep 1.4s ease-in-out infinite;
}

#lessonPublishSave.lesson-publish-cta.is-loading::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #fff;
  border-radius: 50%;
  animation: publishSpin 0.8s linear infinite;
}

@keyframes publishSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes publishSweep {
  0% {
    transform: translateX(-30%);
  }
  50% {
    transform: translateX(20%);
  }
  100% {
    transform: translateX(50%);
  }
}

#lessonPrevStep {
  color: #7c3aed;
  border-color: #7c3aed;
  background: transparent;
}

#lessonPrevStep:hover,
#lessonPrevStep:focus-visible {
  color: #fff;
  background: #7c3aed;
  border-color: #7c3aed;
}

#lessonNextStep {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

#lessonNextStep:hover,
#lessonNextStep:focus-visible {
  background: #6b21a8;
  border-color: #6b21a8;
  color: #fff;
}

.lesson-stepper-track {
  display: none;
}

.lesson-stepper-fill {
  display: none;
}

.lesson-stepper-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
  position: relative;
  z-index: 2;
  align-items: center;
}

.lesson-stepper-item {
  position: relative;
  display: grid;
  place-items: center;
  color: #475569;
  font-weight: 600;
  transition: color 160ms ease;
  pointer-events: none;
  z-index: 2;
}

.lesson-stepper-item .lesson-stepper-dot {
  width: var(--step-size);
  height: var(--step-size);
  border-radius: 50%;
  border: 3px solid #d1d5db;
  background: #e5e7eb;
  box-shadow: inset 0 0 0 3px #fff;
  transition: border-color 160ms ease, background 160ms ease, transform 180ms ease, box-shadow 180ms ease;
  display: grid;
  place-items: center;
  position: relative;
  pointer-events: auto;
}

.lesson-stepper-icon {
  font-size: 26px;
  color: #475569;
  transition: color 160ms ease;
  pointer-events: none;
}

.lesson-stepper-item.is-active {
  color: #5b21b6;
}

.lesson-stepper-item.is-active .lesson-stepper-dot {
  border-color: #8b5cf6;
  background: #8b5cf6;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.65);
}

.lesson-stepper-item.is-active .lesson-stepper-icon,
.lesson-stepper-item.is-completed .lesson-stepper-icon {
  color: #fff;
}

.lesson-stepper-item.is-completed {
  color: #5b21b6;
}

.lesson-stepper-item.is-completed .lesson-stepper-dot {
  border-color: #8b5cf6;
  background: #8b5cf6;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}

.lesson-stepper-label {
  position: absolute;
  top: calc(var(--step-size) + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  white-space: nowrap;
  font-weight: 600;
  color: #475569;
}

.lesson-stepper-bubble {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -6px);
  top: -10px;
  background: #2d2d32;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  min-width: 160px;
  max-width: 80%;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  display: none;
  z-index: 3;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.lesson-stepper-item:not(.is-active):not(.is-completed) .lesson-stepper-dot {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.lesson-stepper-item.is-active .lesson-stepper-label,
.lesson-stepper-item.is-completed .lesson-stepper-label {
  color: #5b21b6;
}

.lesson-stepper-item:not(:last-child) .lesson-stepper-dot::after {
  content: "";
  position: absolute;
  left: calc(100% + var(--connector-gap));
  top: 50%;
  transform: translateY(-50%);
  width: var(--connector-width, 0px);
  height: 8px;
  background: #d1d5db;
  border-radius: 999px;
  z-index: -1;
  display: block;
  box-sizing: border-box;
  transition: background 240ms ease;
}

.lesson-stepper-item.is-completed .lesson-stepper-dot::after {
  background: #8b5cf6;
}

.lesson-stepper-item.is-active .lesson-stepper-dot::after {
  background: #d1d5db;
}

.lesson-stepper-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: #2d2d32 transparent transparent transparent;
}

.lesson-publish-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.lesson-publish-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  cursor: pointer;
}

.lesson-publish-option input {
  margin-top: 4px;
}

.lesson-publish-body h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.lesson-publish-body p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.lesson-card-edit {
  border: none;
  background: transparent;
  padding: 6px;
  border-radius: 8px;
  color: #6b7280;
}

.lesson-card-edit:hover {
  background: rgba(0, 0, 0, 0.06);
}

.lesson-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f7fb;
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 240px;
}

.theme-dark .lesson-picker-search {
  background: #1b1e26;
}

.lesson-picker-content {
  display: grid;
  gap: 12px;
}

.lesson-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.lesson-media-item {
  border: none;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.lesson-media-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.lesson-media-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

/* Lesson media picker (Giphy-like overlay) */
.lesson-modal {
  background: rgba(0, 0, 0, 0.45);
}

.lesson-modal .tool-modal-dialog {
  width: min(90vw, 1120px);
  height: min(90vh, 680px);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(76, 34, 125, 0.28);
}

.lesson-modal-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.lesson-modal-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  padding: 16px 18px 18px;
  min-height: 0;
  flex: 1 1 auto;
}

.lesson-picker-header {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lesson-picker-search {
  background: #f6f7fb;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  height: 35px;
  padding: 6px 10px;
  border-radius: 12px;
  width: 100%;
  transition: box-shadow 120ms ease, border-color 120ms ease;
  position: relative;
}

.lesson-modal .lesson-picker-search {
  flex: 1 1 auto;
  max-width: 100%;
  margin-left: 0;
}

.lesson-picker-search:focus-within {
  border-color: #c084fc;
  box-shadow:
    0 0 0 3px rgba(192, 132, 252, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.lesson-modal .lesson-picker-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  box-shadow: none !important;
  padding-left: 36px;
}

.lesson-picker-search:focus {
  outline: none;
  box-shadow: none;
}

.lesson-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  font-size: 18px;
  width: 24px;
  height: 24px;
}

.lesson-modal .lesson-picker-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-height: none;
  overflow: auto;
  padding: 6px 2px 4px;
  flex: 1 1 auto;
  min-height: 360px;
}

.lesson-modal .lesson-media-item {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f1117;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.lesson-modal .lesson-media-item img {
  height: 160px;
}

.lesson-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 14px;
  min-height: 72px;
  flex-wrap: wrap;
}

.lesson-modal-title {
  margin: 2px 0 0;
}

.lesson-modal-search {
  padding: 0;
  flex: 1 1 auto;
  width: auto;
  min-width: 520px;
}

.lesson-modal-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 420px;
  flex: 1 1 auto;
}

.lesson-grid-mock {
  background: #f7f8fb;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 8px;
  column-count: 4;
  column-gap: 12px;
}

#mediaPickerGrid.lesson-grid-mock {
  column-count: auto;
  column-width: auto;
  column-gap: normal;
}

.media-picker-masonry {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.media-picker-column {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.media-picker-masonry .lesson-media-item {
  margin: 0;
}

.lesson-grid-mock .lesson-media-item {
  background: linear-gradient(135deg, #ede9fe, #f5e1ff);
  color: #3b0764;
  display: block;
  width: 100%;
  margin: 0 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(98, 63, 175, 0.1);
  break-inside: avoid;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.lesson-grid-mock .lesson-media-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(98, 63, 175, 0.2);
}

.lesson-grid-mock .lesson-media-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.lesson-grid-mock .lesson-media-item span {
  display: block;
  padding: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}

.media-picker-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 10px 18px;
  width: 100%;
  color: #6b7280;
  font-weight: 600;
  font-size: 14px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  column-span: all;
}

.media-picker-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  border-top-color: #9f7aea;
  animation: media-picker-spin 0.8s linear infinite;
}

@keyframes media-picker-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .lesson-grid-mock {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  .lesson-grid-mock {
    column-count: 2;
  }
}

.lesson-modal-aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-aside-box {
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  height: 100%;
}

.lesson-upload-panel {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f7f8fb;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
}

.lesson-upload-card {
  text-align: center;
  padding: 18px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.lesson-upload-icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.lesson-upload-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(124, 58, 237, 0.15);
}

/* Copy lesson modal */
.copy-lesson-modal-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.copy-lesson-modal .tool-modal-dialog {
  width: min(620px, 95%);
  max-width: 620px;
  height: auto;
  max-height: calc(100vh - 32px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
}

.copy-lesson-modal .tool-modal-overlay {
  background: rgba(15, 23, 42, 0.28);
}

.copy-lesson-modal .lesson-modal-header {
  padding: 12px 16px 8px;
  border-bottom: 1px solid #e5e7eb;
}

.copy-lesson-modal .lesson-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.copy-lesson-modal .lesson-modal-actions {
  gap: 8px;
}

.copy-lesson-modal .lesson-modal-main {
  padding: 12px 16px;
}

.copy-lesson-modal .lesson-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
}

.copy-lesson-modal .btn {
  min-height: 36px;
}

.copy-lesson-list {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0;
  background: #fff;
}

.copy-lesson-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-radius: 0;
  background: #fff;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.copy-lesson-item:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.copy-lesson-item.is-selected {
  background: #f8fafc;
}

.copy-lesson-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}

.copy-lesson-item-title {
  font-weight: 600;
  color: #0f172a;
}

.copy-lesson-item-sub {
  color: #475569;
  font-size: 13px;
}

.copy-lesson-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.copy-lesson-count {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

.copy-lesson-target {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.copy-lesson-target select {
  min-height: 38px;
}

/* Lesson slideshow */
.lesson-slideshow {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  backdrop-filter: blur(0px);
}

.lesson-slideshow.is-visible {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.lesson-slideshow-shell {
  position: relative;
  z-index: 1;
  width: min(1398px, 96vw);
  height: min(748px, calc(100vh - 32px));
  max-height: 748px;
  background: #f8fafc;
  border-radius: 28px;
  padding: 36px 42px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  box-shadow: 0 35px 120px rgba(15, 23, 42, 0.25);
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
  touch-action: pan-y;
}

.lesson-slideshow-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
}

.lesson-slideshow.is-visible .lesson-slideshow-shell {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lesson-slideshow:fullscreen .lesson-slideshow-shell {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.lesson-slideshow:fullscreen {
  padding: 0;
}

.lesson-slideshow:fullscreen .lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-image {
  border-radius: 0;
  padding: 0;
}

.lesson-slideshow:fullscreen .lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-img {
  border-radius: 0;
}

.lesson-slideshow.is-image-zoomed .lesson-slideshow-shell {
  background: #eef6ff;
}

.lesson-slideshow-counter {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  z-index: 4;
}

.lesson-slideshow-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 4;
}

.lesson-slideshow-control-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.lesson-slideshow-control-btn:hover,
.lesson-slideshow-control-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.lesson-slideshow-control-btn.is-active {
  background: #fde68a;
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.5);
}

.lesson-slideshow-control-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

.lesson-slideshow-control-btn.is-disabled:hover,
.lesson-slideshow-control-btn.is-disabled:focus-visible {
  transform: none;
  box-shadow: none;
}

.lesson-slideshow-control-btn.is-close {
  background: rgba(15, 23, 42, 0.08);
}

.lesson-slideshow-card {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: pan-y;
  z-index: 1;
}

.lesson-slideshow-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 260ms ease;
  will-change: transform;
}

.lesson-slideshow-panel {
  flex: 0 0 100%;
  max-width: 100%;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
}

.lesson-slideshow-panel.is-image-hidden {
  gap: 8px;
}

.lesson-slideshow-panel.is-empty {
  opacity: 0;
  pointer-events: none;
}

.lesson-slideshow-card.is-dragging {
  cursor: grabbing;
}

.lesson-slideshow-card.is-dragging .lesson-slideshow-track {
  transition: none;
}

.lesson-slideshow-card.is-dragging,
.lesson-slideshow-card.is-dragging * {
  user-select: none;
}

.lesson-slideshow-image {
  position: relative;
  width: min(360px, 70vw);
  max-height: 360px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  transition: max-height 200ms ease, opacity 200ms ease, transform 200ms ease, margin 200ms ease;
  margin-bottom: 4px;
  cursor: zoom-in;
}

.lesson-slideshow-image.is-transparent {
  width: auto;
  height: auto;
  max-width: min(420px, 80vw);
  max-height: 360px;
  aspect-ratio: auto;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.lesson-slideshow-image.is-transparent img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-image.is-transparent {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: clamp(20px, 4vw, 64px);
}

.lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-image.is-transparent img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

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

.lesson-slideshow-image.is-collapsed {
  max-height: 0;
  height: 0;
  opacity: 0;
  margin-bottom: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.lesson-slideshow-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(720px, 100%);
  transition: opacity 200ms ease, transform 200ms ease, max-height 200ms ease;
}

.lesson-slideshow-question {
  margin: 0;
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 800;
  text-align: center;
  color: #0f172a;
  max-width: 70ch;
  max-height: 200px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 200ms ease, opacity 200ms ease, transform 200ms ease;
}

.lesson-slideshow-answer {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 700;
  text-align: center;
  color: #0f766e;
  max-width: 70ch;
  max-height: 160px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 200ms ease, opacity 200ms ease, transform 200ms ease;
}

.lesson-slideshow.is-question-hidden .lesson-slideshow-text {
  gap: 2px;
}

.lesson-slideshow.is-question-hidden .lesson-slideshow-question {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
}

.lesson-slideshow.is-answer-hidden .lesson-slideshow-answer {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
}

.lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  aspect-ratio: auto;
  border-radius: 24px;
  box-shadow: none;
  background: transparent;
  padding: clamp(20px, 4vw, 64px);
  cursor: zoom-out;
  transition: opacity 200ms ease, transform 200ms ease;
  transform: scale(1);
  opacity: 1;
  animation: lessonSlideshowZoomIn 260ms ease;
}

.lesson-slideshow-panel.is-image-zoomed {
  padding: 0;
}

.lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-image::before,
.lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-image::after {
  content: "";
  display: none;
}

.lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
}

.lesson-slideshow-panel.is-image-zoomed .lesson-slideshow-text {
  opacity: 0;
  transform: translateY(12px);
  max-height: 0;
  pointer-events: none;
}

@keyframes lessonSlideshowZoomIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lesson-slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
  z-index: 4;
}

.lesson-slideshow-nav.prev {
  left: 16px;
}

.lesson-slideshow-nav.next {
  right: 16px;
}

.lesson-slideshow-nav:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}

.lesson-slideshow-nav:hover,
.lesson-slideshow-nav:focus-visible {
  transform: translateY(-50%) scale(1.04);
  outline: none;
}

.lesson-slideshow-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

.lesson-slideshow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e8f0;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.lesson-slideshow-dot.is-active {
  background: #0f172a;
  transform: scale(1.2);
}

body.lesson-slideshow-open .content-scroll {
  overflow: hidden;
}

@media (max-width: 720px) {
  .lesson-slideshow-shell {
    padding: 24px 18px 20px;
    border-radius: 20px;
  }

  .lesson-slideshow-counter {
    top: 12px;
    left: 12px;
  }

  .lesson-slideshow-controls {
    top: 12px;
    right: 12px;
  }

  .lesson-slideshow-control-btn {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .lesson-slideshow-image {
    width: min(240px, 72vw);
    max-height: 240px;
    border-radius: 18px;
  }

  .lesson-slideshow-nav {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}
  body.zg-printing .zg-print-footer {
    margin-top: auto;
    padding-top: 8px;
  }

.notifications-bell {
  position: relative;
}

.notifications-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #ef4444;
  border: 0;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  pointer-events: none;
}

.notifications-panel {
  position: fixed;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  padding: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.notifications-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notifications-panel-header,
.notifications-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border-color);
}

.notifications-panel-title,
.notifications-overlay-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--dark-color);
}

.notifications-panel-actions,
.notifications-overlay-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.notifications-panel-action {
  border: 0;
  background: transparent;
  color: var(--secondary-color);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.notifications-panel-action:hover {
  color: #4c1d95;
}

.notifications-panel-icon-action {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  color: var(--secondary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease, background 150ms ease;
}

.notifications-panel-icon-action i {
  font-size: 16px;
}

.notifications-panel-icon-action:hover {
  color: #4c1d95;
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.08);
  transform: translateY(-1px);
}

.notifications-panel-body,
.notifications-overlay-body {
  padding: 8px 12px 12px;
  max-height: min(420px, calc(100vh - 220px));
  overflow: auto;
  scrollbar-width: none;
}

.notifications-panel-body {
  flex: 1;
  min-height: 0;
}

.notifications-panel-body::-webkit-scrollbar,
.notifications-overlay-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
}

.notification-main {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(248, 250, 252, 0.7);
  padding: 10px 46px 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
  position: relative;
}

.notification-row.is-unread .notification-main {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.08);
}

.notification-main:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.5);
}

.notification-media {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  flex-shrink: 0;
  overflow: hidden;
}

.notification-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notification-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notification-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--dark-color);
}

.notification-body {
  font-size: 12.5px;
  color: var(--p-color);
  line-height: 1.4;
}

.notification-meta {
  font-size: 11px;
  color: rgba(100, 116, 139, 0.9);
}

.notification-delete {
  border: 0;
  background: transparent;
  color: rgba(100, 116, 139, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 150ms ease, transform 150ms ease;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
}

.notification-delete:hover {
  color: var(--secondary-color);
  transform: translateY(-1px);
}

.notifications-panel-footer {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
}

.notifications-see-all {
  border: 0;
  background: transparent;
  color: var(--secondary-color);
  font-weight: 600;
  cursor: pointer;
}

.notifications-loading {
  padding: 12px 8px 10px;
  font-size: 0;
  color: rgba(100, 116, 139, 0.9);
}

.notifications-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.6);
  padding: 10px 12px;
}

.notification-skeleton-avatar,
.notification-skeleton-line {
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.9), rgba(248, 250, 252, 0.85), rgba(226, 232, 240, 0.9));
  background-size: 200% 100%;
  animation: tool-skeleton 1.4s ease infinite;
}

.notification-skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex-shrink: 0;
}

.notification-skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notification-skeleton-line {
  height: 10px;
  border-radius: 999px;
  width: 100%;
}

.notification-skeleton-line.is-title {
  width: 45%;
  height: 12px;
}

.notification-skeleton-line.is-short {
  width: 30%;
}

.notifications-empty {
  text-align: center;
  padding: 22px 18px;
  color: rgba(100, 116, 139, 0.9);
}

.notifications-empty-icon {
  font-size: 26px;
  color: rgba(124, 58, 237, 0.7);
  margin-bottom: 6px;
}

.notifications-empty-title {
  font-size: 13px;
  font-weight: 600;
}

.notifications-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 180ms ease;
}

.notifications-overlay.is-open {
  opacity: 1;
}

.notifications-overlay-card {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  background: var(--white-color);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notifications-overlay-body {
  flex: 1;
  overflow: auto;
  max-height: none;
}

.notifications-overlay-footer {
  padding: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.notifications-load-more {
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.08);
  color: var(--secondary-color);
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
}

.notifications-load-more:hover {
  border-color: rgba(124, 58, 237, 0.5);
}

.notifications-overlay-close-btn {
  border: 0;
  background: transparent;
  color: var(--secondary-color);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  transition: color 150ms ease, transform 150ms ease;
}

.notifications-overlay-close-btn:hover {
  color: #4c1d95;
  transform: translateY(-1px);
}

.notifications-overlay-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(100, 116, 139, 0.9);
}

.notifications-overlay-close:hover {
  color: var(--secondary-color);
}

body.notifications-overlay-open {
  overflow: hidden;
}

.play-body.dark-mode .notifications-panel,
body.dark-mode .notifications-panel,
.play-body.dark-mode .notifications-overlay-card,
body.dark-mode .notifications-overlay-card {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.play-body.dark-mode .notifications-panel-title,
body.dark-mode .notifications-panel-title,
.play-body.dark-mode .notifications-overlay-title,
body.dark-mode .notifications-overlay-title,
.play-body.dark-mode .notification-title,
body.dark-mode .notification-title {
  color: #f8fafc;
}

.play-body.dark-mode .notification-main,
body.dark-mode .notification-main {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.6);
}

.play-body.dark-mode .notification-row.is-unread .notification-main,
body.dark-mode .notification-row.is-unread .notification-main {
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(124, 58, 237, 0.15);
}

.play-body.dark-mode .notification-body,
body.dark-mode .notification-body {
  color: rgba(226, 232, 240, 0.78);
}

.play-body.dark-mode .notification-meta,
body.dark-mode .notification-meta {
  color: rgba(148, 163, 184, 0.9);
}

.play-body.dark-mode .notification-delete,
body.dark-mode .notification-delete,
.play-body.dark-mode .notifications-overlay-close,
body.dark-mode .notifications-overlay-close {
  border-color: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.7);
}

.play-body.dark-mode .notification-media,
body.dark-mode .notification-media {
  background: rgba(148, 163, 184, 0.15);
  color: rgba(226, 232, 240, 0.8);
}

.play-body.dark-mode .notification-skeleton-row,
body.dark-mode .notification-skeleton-row {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.5);
}

.play-body.dark-mode .notification-skeleton-avatar,
body.dark-mode .notification-skeleton-avatar,
.play-body.dark-mode .notification-skeleton-line,
body.dark-mode .notification-skeleton-line {
  background: linear-gradient(90deg, rgba(36, 30, 56, 0.9), rgba(66, 56, 92, 0.7), rgba(36, 30, 56, 0.9));
  background-size: 200% 100%;
}

.play-body.dark-mode .notifications-panel-action,
body.dark-mode .notifications-panel-action,
.play-body.dark-mode .notifications-see-all,
body.dark-mode .notifications-see-all,
.play-body.dark-mode .notifications-load-more,
body.dark-mode .notifications-load-more,
.play-body.dark-mode .notifications-overlay-close-btn,
body.dark-mode .notifications-overlay-close-btn {
  color: #c4b5fd;
}

.play-body.dark-mode .notifications-panel-icon-action,
body.dark-mode .notifications-panel-icon-action {
  color: #c4b5fd;
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.06);
}

.play-body.dark-mode .notifications-panel-icon-action:hover,
body.dark-mode .notifications-panel-icon-action:hover {
  color: #ddd6fe;
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(124, 58, 237, 0.18);
}

.play-body.dark-mode .notifications-overlay,
body.dark-mode .notifications-overlay {
  background: rgba(2, 6, 23, 0.7);
}
