/* lingosync.css - Ultra Modern / High Specificity / Mobile Optimized */

/* Base & Reset */
.lingosync {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #0f172a;
  padding: 24px;
  background: #f8fafc;
  min-height: 100%;
  box-sizing: border-box;
}

.lingosync * {
  box-sizing: border-box;
}

/* --- Premium Animations --- */
@keyframes lsSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lsPulsePlay {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(37, 99, 235, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.lingosync .ls-animate-slide {
  animation: lsSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lingosync .ls-stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lingosync .ls-stagger-item.ls-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero Section --- */
.lingosync .ls-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 32px 40px;
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 16px;
  box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.08);
}

.lingosync .ls-eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #3b82f6;
  font-weight: 800;
  margin-bottom: 8px;
}

.lingosync .ls-title {
  margin: 0;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #1e3a8a, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lingosync .ls-subtitle {
  margin-top: 8px;
  color: #64748b;
  font-size: 16px;
  font-weight: 500;
}

/* --- Layout & Sidebar --- */
.lingosync .ls-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

.lingosync .ls-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lingosync .ls-block {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
}

.lingosync .ls-block-title {
  font-weight: 800;
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Sidebar Buttons */
.lingosync .ls-unit-list,
.lingosync .ls-verb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lingosync .ls-unit-btn,
.lingosync .ls-verb-btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #1e293b;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lingosync .ls-unit-btn small,
.lingosync .ls-verb-btn small {
  color: #94a3b8;
  font-weight: 600;
  font-size: 12px;
}

.lingosync .ls-unit-btn:hover,
.lingosync .ls-verb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.lingosync .ls-unit-btn.is-active,
.lingosync .ls-verb-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.lingosync .ls-unit-btn.is-active small,
.lingosync .ls-verb-btn.is-active small {
  color: #bfdbfe;
}

/* --- Main Content --- */
.lingosync .ls-main {
  min-width: 0;
}

.lingosync .ls-verb-hero {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 40px;
  margin-bottom: 24px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.03);
}

.lingosync .ls-verb-name {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.lingosync .ls-verb-name span {
  color: #94a3b8;
  font-weight: 600;
  font-size: 28px;
}

.lingosync .ls-verb-meaning {
  margin-top: 8px;
  color: #64748b;
  font-size: 20px;
  font-weight: 500;
}

/* --- The Modern Player Dock --- */
.lingosync .ls-controls-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 16px 12px 12px;
  border-radius: 999px;
  /* Pill shape */
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.08);
  position: sticky !important;
  top: 16px !important;
  z-index: 50 !important;
}

.lingosync .ls-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  padding-left: 4px;
  /* visually centers the play icon */
}

.lingosync .ls-play-btn.is-playing {
  background: #0f172a;
  padding-left: 0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.3);
  animation: lsPulsePlay 2s infinite;
}

.lingosync .ls-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.4);
}

.lingosync .ls-speed-controls {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 999px;
  flex-wrap: wrap;
}

.lingosync .ls-tab-controls {
  margin-left: auto;
}

.lingosync .ls-speed-btn {
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.lingosync .ls-speed-btn:hover {
  color: #0f172a;
}

.lingosync .ls-speed-btn.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* --- Eye Toggle & Blurring --- */
.lingosync .ls-eye-toggle {
  margin-left: 0;
  border: none;
  background: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  white-space: nowrap;
}

.lingosync .ls-eye-toggle:hover {
  background: #eff6ff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.lingosync.ls-translation-hidden .ls-blur-target {
  filter: blur(6px);
  opacity: 0.3;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.lingosync.ls-translation-hidden .ls-phrase-row:hover .ls-blur-target {
  filter: blur(0);
  opacity: 1;
}

/* --- Dynamic Panels (Phrases) --- */
.lingosync .ls-panel {
  background: transparent;
}

.lingosync .ls-phrase-row {
  display: grid;
  grid-template-columns: 48px 1fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px 24px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: #ffffff;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.lingosync .ls-phrase-row:hover {
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  border-color: #e2e8f0;
  background: #f8fafc;
}

.lingosync .ls-phrase-index {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
  font-size: 14px;
}

.lingosync .ls-phrase-en {
  font-weight: 800;
  font-size: 17px;
  color: #0f172a;
}

.lingosync .ls-phrase-pl {
  color: #64748b;
  font-size: 16px;
  font-weight: 500;
}

/* --- Audio Sync Highlighting --- */
.lingosync .ls-phrase-row.is-active-sync {
  transform: scale(1.02) translateY(-2px) !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.15) !important;
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
  z-index: 10;
  position: relative;
}

.lingosync .ls-phrase-row.is-active-sync .ls-phrase-en {
  color: #1d4ed8 !important;
}

.lingosync .ls-phrase-row.is-active-sync .ls-phrase-index {
  background: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

/* --- Quiz Cards --- */
.lingosync .ls-q-card {
  display: none;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 32px;
  background: #ffffff;
  margin-bottom: 20px;
  transition: 0.3s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.lingosync .ls-q-card.is-active {
  display: block;
  animation: lsSlideUp 0.5s ease forwards;
}

.lingosync .ls-q-card:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 14px 32px rgba(59, 130, 246, 0.1);
}

.lingosync .ls-q-type {
  font-size: 13px;
  text-transform: uppercase;
  color: #3b82f6;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.lingosync .ls-q-prompt {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  color: #0f172a;
}

.lingosync .ls-q-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lingosync .ls-option {
  border: 2px solid #e2e8f0;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s;
  color: #475569;
}

.lingosync .ls-option:hover {
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-2px);
}

.lingosync .ls-option.is-correct {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.lingosync .ls-option.is-wrong {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
  animation: lsShake 0.4s ease;
}

@keyframes lsShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-5px);
  }

  40%,
  80% {
    transform: translateX(5px);
  }
}

/* --- Car Mode --- */
.lingosync .ls-car-display {
  text-align: center;
  padding: 40px;
}

.lingosync .ls-car-phrase {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  min-height: 80px;
}

.lingosync .ls-car-pl {
  font-size: 20px;
  color: #64748b;
  margin-bottom: 32px;
  min-height: 30px;
}

.lingosync .ls-car-status {
  font-size: 14px;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  min-height: 20px;
}

.lingosync .ls-progress-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.lingosync .ls-progress-fill {
  height: 100%;
  background: #3b82f6;
  width: 0%;
  transition: width 0.3s ease;
}

/* --- Dialogue Tab Styles --- */
.lingosync .ls-dialogue-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px;
  background: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.lingosync .ls-dialogue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.lingosync .ls-dialogue-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lingosync .ls-dialogue-header .ls-phrase-en {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.lingosync .ls-bubble-row {
  display: flex;
  margin-bottom: 20px;
}

.lingosync .ls-bubble-row.is-left {
  justify-content: flex-start;
}

.lingosync .ls-bubble-row.is-right {
  justify-content: flex-end;
}

.lingosync .ls-bubble {
  max-width: 80%;
  padding: 16px 20px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Speaker A (left) — purple, matching Speak tab ls-speak-purple */
.lingosync .ls-bubble-row.is-left .ls-bubble {
  background: #f5f3ff !important;
  border-bottom-left-radius: 4px !important;
  border: 1px solid #ddd6fe !important;
  color: #5b21b6 !important;
}

/* Speaker B (right) — green, matching Speak tab ls-speak-green */
.lingosync .ls-bubble-row.is-right .ls-bubble {
  background: #f0fdf4 !important;
  border-bottom-right-radius: 4px !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
}

.lingosync .ls-bubble-en {
  font-size: 17px;
  font-weight: 600;
  color: inherit;
  /* inherits purple or green from parent bubble */
  margin-bottom: 8px;
  line-height: 1.5;
}

.lingosync .ls-bubble-pl {
  font-size: 15px;
  color: inherit;
  /* inherits purple or green, slightly muted via opacity */
  opacity: 0.75;
  line-height: 1.4;
}

.lingosync .ls-target-text {
  color: #ef4444;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(239, 68, 68, 0.3);
  text-underline-offset: 3px;
}

.lingosync .ls-dialogue-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.lingosync .ls-dialogue-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  color: #3b82f6;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
  font-size: 14px;
}

.lingosync .ls-dialogue-btn:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-1px);
}

.lingosync .ls-dialogue-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #94a3b8;
  border-color: #e2e8f0;
  background: #f8fafc;
  transform: none;
}

.lingosync .ls-dialogue-count {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
}

/* ─── RESPONSIVE DESIGN (TABLET & MOBILE) ─────────────────────────────── */

@media (max-width: 1024px) {
  .lingosync .ls-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  /* Hero */
  .lingosync .ls-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 16px;
    border-radius: 24px;
  }

  .lingosync .ls-title {
    font-size: 32px;
  }

  /* Verb Hero */
  .lingosync .ls-verb-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .lingosync .ls-verb-name {
    font-size: 32px;
  }

  .lingosync .ls-verb-name span {
    font-size: 22px;
  }

  /* ── Mobile Player Dock: compact single-row bar ── */

  /* The wrapper becomes one tight row — no wrapping */
  .lingosync .ls-controls-wrapper {
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 8px 10px;
    border-radius: 18px;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
  }

  /* Bigger play button on mobile */
  .lingosync .ls-play-btn {
    width: 54px;
    height: 54px;
    font-size: 22px;
    flex-shrink: 0;
  }

  /* Speed controls + Hide PL toggle: hidden by default on mobile */
  .lingosync .ls-speed-controls:not(.ls-tab-controls) {
    display: none;
  }

  /* When the drawer is open, reveal them in a second row */
  .lingosync .ls-controls-wrapper.ls-drawer-open .ls-speed-controls:not(.ls-tab-controls) {
    display: flex;
  }

  /* When drawer open: allow wrapper to wrap so second row appears */
  .lingosync .ls-controls-wrapper.ls-drawer-open {
    flex-wrap: wrap;
    border-radius: 20px;
  }

  /* Speed + Hide PL row fills full width when visible */
  .lingosync .ls-controls-wrapper.ls-drawer-open .ls-speed-controls:not(.ls-tab-controls) {
    flex: 1 1 auto;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
  }

  /* Speed buttons compact */
  .lingosync .ls-speed-btn {
    padding: 7px 10px;
    font-size: 12px;
    flex: 1;
    text-align: center;
  }

  /* Gear toggle button — always visible, sits right of play btn */
  .lingosync .ls-mobile-drawer-toggle {
    background: #f1f5f9;
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 22px;
    cursor: pointer;
    flex-shrink: 0;
    color: #64748b;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .lingosync .ls-mobile-drawer-toggle.is-open {
    background: #e0e7ff;
    color: #4338ca;
  }

  /* Tabs: compact pills, all on one row pushed to the right */
  .lingosync .ls-tab-controls {
    display: none !important;
  }

  /* Revealed only when TABS button is tapped */
  .lingosync .ls-controls-wrapper.ls-tabs-open .ls-tab-controls {
    display: flex !important;
    order: 20;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
    padding: 4px;
    border-radius: 14px;
  }

  /* Allow wrapper to wrap when tabs panel is open */
  .lingosync .ls-controls-wrapper.ls-tabs-open {
    flex-wrap: wrap;
    border-radius: 20px;
  }

  /* Tab buttons inside the expanded panel */
  .lingosync .ls-controls-wrapper.ls-tabs-open .ls-tab-controls .ls-speed-btn {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border-radius: 10px;
  }

  /* Full-width second row for speed drawer when both open */
  .lingosync .ls-controls-wrapper.ls-drawer-open .ls-tab-controls {
    order: 10;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  /* TABS pill button — always visible on mobile */
  .lingosync .ls-mobile-tabs-toggle {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 14px 18px;
    border-radius: 16px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .lingosync .ls-mobile-tabs-toggle.is-open {
    background: #e0e7ff;
    color: #4338ca;
  }

  .lingosync .ls-eye-toggle {
    flex: 0 0 auto;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Sentence Rows */
  .lingosync .ls-phrase-row {
    grid-template-columns: 40px 1fr;
    padding: 16px;
    gap: 12px;
  }

  .lingosync .ls-phrase-pl {
    grid-column: 2;
    /* Put Polish under English */
    margin-top: -6px;
    font-size: 14px;
  }

  .lingosync .ls-phrase-en {
    font-size: 16px;
  }

  /* Car Mode */
  .lingosync .ls-car-phrase {
    font-size: 26px;
    min-height: 60px;
  }

  .lingosync .ls-car-pl {
    font-size: 18px;
  }

  .lingosync .ls-car-display {
    padding: 24px 16px;
  }

  /* Dialogues */
  .lingosync .ls-bubble {
    max-width: 90%;
    padding: 12px 16px;
  }

  .lingosync .ls-dialogue-card {
    padding: 20px;
  }

  .lingosync .ls-dialogue-header .ls-phrase-en {
    font-size: 17px;
  }

  /* Practice Quizzes */
  .lingosync .ls-q-card {
    padding: 20px;
  }

  .lingosync .ls-q-prompt {
    font-size: 18px;
  }

  .lingosync .ls-option {
    font-size: 14px;
    padding: 12px 16px;
    width: 100%;
    /* Stack options vertically on phones */
  }
}

@media (max-width: 480px) {
  .lingosync {
    padding: 16px 12px;
  }

  .lingosync .ls-play-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .lingosync .ls-speed-btn {
    padding: 6px 7px;
    font-size: 11px;
  }

  .lingosync .ls-tab-controls .ls-speed-btn {
    padding: 4px 7px;
    font-size: 10px;
  }

  .lingosync .ls-mobile-drawer-toggle {
    padding: 7px 10px;
    font-size: 14px;
  }
}

/* --- Desktop / laptop adaptive player sizing refinements --- */
.lingosync .ls-controls-wrapper {
  min-width: 0;
}

.lingosync .ls-controls-wrapper>* {
  min-width: 0;
}

.lingosync .ls-play-btn {
  width: clamp(48px, 4.4vw, 64px);
  height: clamp(48px, 4.4vw, 64px);
  font-size: clamp(18px, 1.6vw, 26px);
}

.lingosync .ls-speed-controls {
  min-width: 0;
}

.lingosync .ls-tab-controls {
  min-width: 0;
  flex: 1 1 360px;
  justify-content: flex-end;
}

.lingosync .ls-speed-btn {
  padding: clamp(8px, 0.9vw, 10px) clamp(12px, 1.5vw, 20px);
  font-size: clamp(12px, 0.95vw, 14px);
}

@media (max-width: 1400px) {
  .lingosync .ls-controls-wrapper {
    gap: 12px;
    padding: 10px 14px 10px 10px;
  }

  .lingosync .ls-tab-controls {
    flex: 1 1 320px;
  }

  .lingosync .ls-speed-btn {
    padding: 8px 14px;
  }
}

@media (max-width: 1280px) {
  .lingosync .ls-controls-wrapper {
    gap: 10px;
    padding: 10px 12px 10px 10px;
    border-radius: 16px;
  }

  .lingosync .ls-play-btn {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }

  .lingosync .ls-speed-controls {
    padding: 4px;
    gap: 4px;
  }

  .lingosync .ls-speed-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .lingosync .ls-tab-controls {
    flex: 1 1 280px;
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .lingosync .ls-controls-wrapper {
    align-items: stretch;
  }

  .lingosync .ls-tab-controls {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .lingosync .ls-tab-controls .ls-speed-btn {
    flex: 1 1 0;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
  }
}


/* --- Responsive player dock correction: desktop + laptop widths --- */
.lingosync .ls-controls-wrapper {
  justify-content: flex-start;
  align-items: center;
}

.lingosync .ls-speed-controls {
  flex: 0 0 auto;
}

.lingosync .ls-tab-controls {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  margin-left: auto;
  display: inline-flex;
  justify-content: flex-end;
}

@media (max-width: 1600px) {
  .lingosync .ls-controls-wrapper {
    gap: 12px;
    padding: 10px 12px 10px 10px;
    border-radius: 30px;
  }

  .lingosync .ls-play-btn {
    width: 54px;
    height: 54px;
    font-size: 21px;
  }

  .lingosync .ls-speed-controls {
    padding: 4px;
    gap: 4px;
  }

  .lingosync .ls-speed-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .lingosync .ls-tab-controls {
    flex-wrap: nowrap;
  }
}

@media (max-width: 1420px) {
  .lingosync .ls-controls-wrapper {
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    row-gap: 10px;
  }

  .lingosync .ls-tab-controls {
    min-width: 0;
    width: 100%;
    justify-content: space-between;
  }

  .lingosync .ls-tab-controls .ls-speed-btn {
    flex: 1 1 0;
    text-align: center;
    padding: 8px 10px;
  }
}

@media (max-width: 1240px) {
  .lingosync .ls-controls-wrapper {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    /* Two-row layout: reduce roundness to align with verb box above */
    border-radius: 16px;
  }

  .lingosync .ls-tab-controls {
    grid-column: 1 / -1;
  }

  .lingosync .ls-play-btn {
    width: 50px;
    height: 50px;
    font-size: 19px;
  }

  .lingosync .ls-speed-btn {
    padding: 7px 10px;
    font-size: 12px;
  }
}


/* --- Dialogue section upgrade --- */
.lingosync .ls-dialogue-card {
  border-radius: 16px;
  padding: 36px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
}

.lingosync .ls-dialogue-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
}

.lingosync .ls-dialogue-header .ls-phrase-en {
  font-size: 24px;
  line-height: 1.2;
}

.lingosync .ls-bubble-row {
  margin-bottom: 24px;
}

.lingosync .ls-bubble {
  max-width: 86%;
  padding: 20px 24px;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
  will-change: transform;
}

.lingosync .ls-bubble:hover {
  transform: translateY(-3px) scale(1.025);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.10);
}

.lingosync .ls-bubble-en {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.65;
  margin-bottom: 10px;
}

.lingosync .ls-bubble-pl {
  font-size: 17px;
  line-height: 1.55;
}

.lingosync .ls-target-text {
  color: #dc2626;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(254, 226, 226, 0) 55%, rgba(254, 202, 202, 0.85) 55%);
  padding: 0 2px;
  border-radius: 6px;
  text-decoration: none;
}

@media (max-width: 768px) {
  .lingosync .ls-dialogue-card {
    padding: 22px;
    border-radius: 14px;
  }

  .lingosync .ls-dialogue-header .ls-phrase-en {
    font-size: 19px;
  }

  .lingosync .ls-bubble {
    max-width: 94%;
    padding: 14px 16px;
  }

  .lingosync .ls-bubble-en {
    font-size: 17px;
    line-height: 1.55;
  }

  .lingosync .ls-bubble-pl {
    font-size: 15px;
  }
}


/* --- Scenario drill / Scenes tab --- */
.lingosync .ls-scene-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.lingosync .ls-scene-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef2f7;
}

.lingosync .ls-scene-step {
  width: 40px;
  height: 40px;
  font-size: 14px;
  flex-shrink: 0;
}

.lingosync .ls-scene-prompt {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.lingosync .ls-scene-situation {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  border-radius: 22px;
  padding: 18px 20px;
  margin-bottom: 20px;
  animation: lsSlideUp 0.35s ease;
}

.lingosync .ls-scene-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #2563eb;
  font-weight: 800;
  margin-bottom: 8px;
}

.lingosync .ls-scene-text {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
  color: #0f172a;
}

.lingosync .ls-scene-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.lingosync .ls-scene-option {
  border: 2px solid #dbe3ee;
  background: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .03);
}

.lingosync .ls-scene-option:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.01);
  border-color: #93c5fd;
  box-shadow: 0 12px 24px rgba(59, 130, 246, .08);
}

.lingosync .ls-scene-option.is-correct {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.lingosync .ls-scene-option.is-wrong {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.lingosync .ls-scene-option.is-locked {
  cursor: default;
}

.lingosync .ls-scene-feedback {
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
  animation: lsSlideUp 0.25s ease;
}

.lingosync .ls-scene-feedback.is-correct {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #a7f3d0;
}

.lingosync .ls-scene-feedback.is-wrong {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (max-width: 768px) {
  .lingosync .ls-scene-card {
    padding: 22px;
    border-radius: 14px;
  }

  .lingosync .ls-scene-text {
    font-size: 16px;
  }

  .lingosync .ls-scene-options {
    grid-template-columns: 1fr;
  }

  .lingosync .ls-scene-option {
    font-size: 15px;
  }
}


/* --- Mobile scroll margin --- */
@media (max-width: 768px) {
  .lingosync .ls-main {
    scroll-margin-top: 12px;
  }
}


/* --- Dialogue + scene bilingual helpers --- */
.lingosync .ls-dialogue-step {
  width: 40px;
  height: 40px;
  font-size: 14px;
  flex-shrink: 0;
}

.lingosync .ls-dialogue-focus {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.01em;
}

.lingosync .ls-scene-text-pl {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: #64748b;
  font-weight: 500;
}

.lingosync .ls-scene-feedback-pl {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: inherit;
  opacity: 0.92;
}

.lingosync .ls-scene-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.lingosync .ls-scene-option-pl {
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  font-weight: 600;
}







/* =========================================
   Guided Speak Addon (Premium UI)
   ========================================= */

.lingosync .ls-gs-interaction {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lingosync .ls-gs-play-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.lingosync .ls-gs-play-premium {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  border: none;
  padding: 16px 36px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: lsPulsePlay 2.5s infinite;
  /* Uses your existing pulse animation! */
}

.lingosync .ls-gs-play-premium:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.4);
}

.lingosync .ls-gs-input-wrapper {
  display: flex;
  flex-direction: column;
}

.lingosync .ls-gs-input {
  width: 100%;
  min-height: 140px;
  padding: 20px 24px;
  border-radius: 20px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  font-family: inherit;
  font-size: 20px;
  line-height: 1.5;
  color: #0f172a;
  resize: vertical;
  transition: all 0.2s ease;
  box-shadow: inset 0 4px 6px rgba(15, 23, 42, 0.03);
}

.lingosync .ls-gs-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.lingosync .ls-gs-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), inset 0 4px 6px rgba(15, 23, 42, 0.03);
}

.lingosync .ls-gs-input:disabled {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
  border-color: #e2e8f0;
  box-shadow: none;
}

.lingosync .ls-gs-status {
  font-size: 15px;
  font-weight: 700;
  color: #3b82f6;
  animation: lsPulsePlay 1.5s infinite;
  padding-left: 4px;
}

@media (max-width: 768px) {
  .lingosync .ls-gs-play-premium {
    width: 100%;
    justify-content: center;
    padding: 16px 20px;
    font-size: 16px;
  }

  .lingosync .ls-gs-input {
    font-size: 18px;
    padding: 16px;
    min-height: 120px;
  }
}


/* --- Guided Speak Voice Input --- */
.lingosync .ls-gs-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.lingosync .ls-gs-label {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lingosync .ls-gs-mic {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.lingosync .ls-gs-mic:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.lingosync .ls-gs-mic.is-recording {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
  animation: lsPulseRecord 1.5s infinite;
}

@keyframes lsPulseRecord {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}




/* --- Polished Guided Speak UI --- */
.ls-gs-start-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.ls-gs-start-card {
  text-align: center;
  padding: 40px;
}

.ls-gs-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 16px 8px;
}

.ls-gs-toggles {
  display: flex;
  gap: 8px;
}

.ls-gs-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: #64748b;
  transition: 0.2s;
}

.ls-gs-toggle-btn.is-active {
  background: #3b82f6;
  color: white;
  border-color: #2563eb;
}

.ls-gs-stepper {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.ls-gs-step-dot {
  width: 30px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  transition: 0.3s;
}

.ls-gs-step-dot.is-active {
  background: #bfdbfe;
}

.ls-gs-step-dot.is-current {
  background: #3b82f6;
  width: 50px;
}

.ls-gs-mic-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 800;
  font-size: 12px;
  color: #94a3b8;
}

.ls-gs-mic-indicator.is-active {
  color: #ef4444;
}

.ls-gs-mic-wave {
  width: 10px;
  height: 10px;
  background: currentColor;
  border-radius: 50%;
}

.ls-gs-mic-indicator.is-active .ls-gs-mic-wave {
  animation: lsPulseRecord 1s infinite;
}

.ls-gs-input-wrapper:not(.is-typing) textarea {
  background: #f8fafc;
  border-style: dashed;
  pointer-events: none;
}


/* --- Premium Guided Speak Flow --- */
.lingosync .is-blurred {
  filter: blur(10px);
  opacity: 0.2;
  pointer-events: none;
}

.lingosync .ls-gs-status-badge {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.lingosync .ls-gs-status-badge.listening .ls-mic-active {
  color: #ef4444;
  animation: lsPulsePlay 1s infinite;
}

.lingosync .ls-gs-visual-feedback {
  min-height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lingosync .ls-gs-big-result {
  text-align: center;
  width: 100%;
  padding: 20px;
  border-radius: 20px;
}

.lingosync .ls-gs-big-result.is-correct {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
}

.lingosync .ls-gs-result-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 8px;
}

.lingosync .ls-gs-result-text {
  font-size: 24px;
  font-weight: 900;
  color: #166534;
  /* Green */
  margin-bottom: 12px;
}

.lingosync .ls-gs-big-result.is-wrong .ls-gs-result-text {
  color: #991b1b;
  /* Reddish */
}

.lingosync .ls-gs-next-indicator {
  font-size: 12px;
  color: #22c55e;
  font-weight: 800;
}

.lingosync .ls-gs-live-transcript {
  font-size: 18px;
  font-style: italic;
  color: #3b82f6;
  text-align: center;
  padding: 10px;
  border: 2px dashed #dbeafe;
  border-radius: 12px;
}

.lingosync .ls-gs-question-zone {
  background: #f8fafc;
  padding: 30px;
  border-radius: 24px;
  margin-bottom: 20px;
  border: 1px solid #f1f5f9;
}


/* --- Coaching UI Styles --- */
.lingosync .ls-gs-big-result.is-coaching {
  background: #fffbeb;
  border: 2px solid #fde68a;
  animation: lsPulseCoaching 2s infinite;
}

@keyframes lsPulseCoaching {
  0% {
    border-color: #fde68a;
  }

  50% {
    border-color: #f59e0b;
  }

  100% {
    border-color: #fde68a;
  }
}

.lingosync .ls-gs-status-badge .ls-mic-active {
  color: #22c55e;
  /* Green when learner should talk */
  font-weight: 900;
}

.lingosync .ls-gs-visual-feedback {
  margin: 10px 0;
}



.ls-gs-success-icon {
  width: 80px;
  height: 80px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 900;
  margin: 0 auto 20px auto;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.1);
  animation: lsSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#gs-restart-btn {
  background: #16a34a;
  border-color: #15803d;
  padding: 18px 40px;
}

#gs-restart-btn:hover {
  background: #15803d;
  box-shadow: 0 10px 20px rgba(21, 128, 61, 0.3);
}

/* Update this existing class */
.lingosync .ls-gs-start-card {
  text-align: center;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Forces horizontal centering of all children */
  justify-content: center;
  width: 100%;
}

/* Add this to ensure the large buttons are centered specifically */
.lingosync .ls-gs-play-premium#gs-start-btn,
.lingosync .ls-gs-play-premium#gs-restart-btn {
  margin-left: auto;
  margin-right: auto;
  display: inline-flex;
  /* Ensures the button doesn't stretch to full width */
  justify-content: center;
  align-items: center;
}


/* --- Car Mode UI Enhancements --- */
.ls-car-toggle-wrap {
  margin-bottom: 20px;
}

.ls-car-mode-btn {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}

.ls-car-mode-btn.is-active {
  background: #0f172a;
  color: #fbbf24;
  /* Safety Yellow */
  border-color: #fbbf24;
}

/* Transform the Drill Layout for Car */
.lingosync .ls-car-layout .ls-car-card {
  background: #0f172a !important;
  /* Dark mode for driving */
  color: #ffffff !important;
  padding: 50px 20px !important;
}

.lingosync .ls-car-layout .ls-gs-question-zone {
  background: transparent !important;
  border: none !important;
}

.lingosync .ls-car-layout .ls-phrase-en {
  font-size: 36px !important;
  /* Massive text */
  line-height: 1.2;
  color: #ffffff !important;
}

.lingosync .ls-car-layout .ls-gs-live-transcript {
  font-size: 28px !important;
  color: #fbbf24 !important;
  border: none !important;
}

.lingosync .ls-car-layout .ls-gs-result-text {
  font-size: 32px !important;
  color: #4ade80 !important;
  /* Bright green */
}

/* Hands-free mode hide button distraction */
.lingosync .ls-car-layout .ls-dialogue-nav {
  display: none;
}




/* =========================================================
   LINGOSYNC PREMIUM - COMPLETE MASTER STYLESHEET
   Includes: Phrases, Practice, Scenes, Guided Speak & Car Mode
   ========================================================= */

/* --- Base & Reset --- */
.lingosync {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #0f172a;
  padding: 24px;
  background: #f8fafc;
  min-height: 100%;
  box-sizing: border-box;
}

.lingosync * {
  box-sizing: border-box;
}

/* --- Premium Animations --- */
@keyframes lsSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lsPulsePlay {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(37, 99, 235, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@keyframes lsPulseRecord {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.lingosync .ls-animate-slide {
  animation: lsSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Hero & Sidebar --- */
.lingosync .ls-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 32px 40px;
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 16px;
  box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.08);
}

.lingosync .ls-title {
  margin: 0;
  font-size: 38px;
  font-weight: 900;
  background: linear-gradient(to right, #1e3a8a, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lingosync .ls-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

.lingosync .ls-sidebar .ls-unit-btn,
.lingosync .ls-sidebar .ls-verb-btn {
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 8px;
  transition: 0.2s;
}

.lingosync .ls-unit-btn.is-active,
.lingosync .ls-verb-btn.is-active {
  background: #2563eb;
  color: #ffffff;
}

/* --- Player Dock --- */
.lingosync .ls-controls-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  margin-bottom: 32px;
  position: sticky;
  top: 10px;
  z-index: 100;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.lingosync .ls-play-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lingosync .ls-speed-controls {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 999px;
}

.lingosync .ls-speed-btn,
.lingosync .ls-eye-toggle {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
}

.lingosync .ls-speed-btn.is-active,
.lingosync .ls-eye-toggle.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* --- Phrases Grid (Sentences) --- */
.lingosync .ls-phrase-row {
  display: grid;
  grid-template-columns: 48px 1fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
  margin-bottom: 12px;
  cursor: pointer;
}

.lingosync .ls-phrase-row.is-active-sync {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
}

.lingosync.ls-translation-hidden .ls-blur-target {
  filter: blur(6px);
  opacity: 0.3;
  pointer-events: none;
}

/* --- FIXED: Practice & Scene Choice Buttons (Screenshots 1 & 2) --- */
.lingosync .ls-q-options,
.lingosync .ls-scene-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.lingosync .ls-option,
.lingosync .ls-scene-option {
  border: 2px solid #e2e8f0;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  color: #475569;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.lingosync .ls-option:hover,
.lingosync .ls-scene-option:hover {
  border-color: #3b82f6;
  background: #f8fbff;
  transform: translateY(-2px);
}

/* Feedback States */
.lingosync .is-correct,
.lingosync .ls-option.is-correct,
.lingosync .ls-scene-option.is-correct {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.lingosync .is-wrong,
.lingosync .ls-option.is-wrong,
.lingosync .ls-scene-option.is-wrong {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

/* --- Scenes Situation Box --- */
.lingosync .ls-scene-situation {
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
}

.lingosync .ls-scene-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: #3b82f6;
  margin-bottom: 8px;
}

/* --- Guided Speak UI --- */
.lingosync .ls-gs-start-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 350px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.lingosync .ls-gs-status-badge .ls-mic-active {
  color: #22c55e;
  animation: lsPulseRecord 1.5s infinite;
}

.lingosync .ls-gs-big-result {
  text-align: center;
  width: 100%;
  padding: 32px;
  border-radius: 24px;
  margin-bottom: 24px;
}

.lingosync .ls-gs-result-text {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
}

/* --- Global Car Mode --- */
.lingosync.ls-global-car-mode {
  background: #0f172a !important;
  color: #ffffff !important;
}

.ls-global-car-mode .ls-hero,
.ls-global-car-mode .ls-panel {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.ls-global-car-mode .ls-phrase-en {
  font-size: 42px !important;
  color: white !important;
}

.ls-global-car-mode .ls-phrase-pl {
  display: none !important;
}

/* --- Mobile Adaptive --- */
@media (max-width: 768px) {
  .lingosync .ls-layout {
    grid-template-columns: 1fr;
  }

  .lingosync .ls-phrase-row {
    grid-template-columns: 40px 1fr;
  }

  .lingosync .ls-phrase-pl {
    grid-column: 2;
    margin-top: -5px;
  }
}

/* =========================================================
   Desktop + inline choice refinement patch
   Added for larger dialogue boxes and inline options
   ========================================================= */

/* Bigger dialogue bubbles on desktop */
@media (min-width: 1025px) {
  .lingosync .ls-dialogue-card {
    padding: 42px 46px;
  }

  .lingosync .ls-dialogue-body {
    max-width: 1180px;
    margin: 0 auto;
  }

  .lingosync .ls-bubble {
    max-width: min(980px, 92%);
    padding: 26px 30px;
    border-radius: 14px;
  }

  .lingosync .ls-bubble-en {
    font-size: 22px;
    line-height: 1.72;
  }

  .lingosync .ls-bubble-pl {
    font-size: 18px;
    line-height: 1.58;
  }
}

/* Practice choices inline on desktop/tablet */
.lingosync .ls-q-options {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.lingosync .ls-option {
  width: auto;
  min-width: 180px;
  max-width: 100%;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
}

/* Scenes choices inline + cleaner grid */
.lingosync .ls-scene-options,
.lingosync .ls-scene-choices,
.lingosync .ls-scene-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.lingosync .ls-scene-option,
.lingosync .ls-scene-choice,
.lingosync .ls-scene-answer,
.lingosync .ls-scene-btn {
  width: auto;
  min-width: 220px;
  max-width: 100%;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
  white-space: normal;
}

/* If scene buttons reuse generic option class, keep them inline too */
.lingosync .ls-scene-card .ls-option {
  width: auto;
  min-width: 220px;
  flex: 0 1 auto;
}

/* Keep mobile stacked */
@media (max-width: 768px) {

  .lingosync .ls-q-options,
  .lingosync .ls-scene-options,
  .lingosync .ls-scene-choices,
  .lingosync .ls-scene-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .lingosync .ls-option,
  .lingosync .ls-scene-option,
  .lingosync .ls-scene-choice,
  .lingosync .ls-scene-answer,
  .lingosync .ls-scene-btn,
  .lingosync .ls-scene-card .ls-option {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
}

/* =========================================================
   DESKTOP INLINE CHOICES PATCH
   Added to keep Practice and Scenes answers in one horizontal row
   on desktop/tablet while preserving stacked mobile layout.
   ========================================================= */

/* Bigger dialogue bubbles on desktop */
@media (min-width: 769px) {
  .lingosync .ls-dialogue-card {
    padding: 42px;
    border-radius: 16px;
  }

  .lingosync .ls-bubble {
    max-width: 94%;
    padding: 24px 30px;
    border-radius: 14px;
  }

  .lingosync .ls-bubble-en {
    font-size: 22px;
    line-height: 1.7;
  }

  .lingosync .ls-bubble-pl {
    font-size: 18px;
    line-height: 1.6;
  }

  /* Practice choices inline */
  .lingosync .ls-q-options {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: stretch;
  }

  .lingosync .ls-option {
    width: 100% !important;
    min-width: 0;
    min-height: 76px;
    padding: 16px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  /* Scenes choices inline */
  .lingosync .ls-scene-options,
  .lingosync .ls-scene-choices,
  .lingosync .ls-scene-answers {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    align-items: stretch;
  }

  .lingosync .ls-scene-option,
  .lingosync .ls-scene-choice,
  .lingosync .ls-scene-answer,
  .lingosync button.ls-scene-option,
  .lingosync button.ls-scene-choice,
  .lingosync button.ls-scene-answer {
    width: 100% !important;
    min-width: 0;
    min-height: 90px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
}

/* Stronger desktop enforcement for the viewport shown in screenshot */
@media (min-width: 1100px) {
  .lingosync .ls-q-options {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .lingosync .ls-scene-options,
  .lingosync .ls-scene-choices,
  .lingosync .ls-scene-answers {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Keep phone layout stacked */
@media (max-width: 768px) {

  .lingosync .ls-q-options,
  .lingosync .ls-scene-options,
  .lingosync .ls-scene-choices,
  .lingosync .ls-scene-answers {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
  }

  .lingosync .ls-option,
  .lingosync .ls-scene-option,
  .lingosync .ls-scene-choice,
  .lingosync .ls-scene-answer,
  .lingosync button.ls-scene-option,
  .lingosync button.ls-scene-choice,
  .lingosync button.ls-scene-answer {
    width: 100% !important;
    min-height: auto;
  }
}



/* --- Story Tab Styles --- */
.lingosync .ls-story-panel {
  max-width: 800px;
  margin: 0 auto;
}

.lingosync .ls-story-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.lingosync .ls-story-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: #f1f5f9;
}

.lingosync .ls-story-content {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}

.lingosync .ls-story-en {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  color: #1e293b;
  transition: all 0.3s ease;
}

.lingosync .ls-story-pl {
  font-size: 22px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.3s ease;
}

/* Active Speaking Highlight */
.lingosync .is-speaking {
  color: #2563eb;
  transform: scale(1.05);
  text-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

.lingosync .ls-story-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.lingosync .ls-story-play-btn {
  background: #0f172a;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  min-width: 160px;
  transition: all 0.2s;
}

.lingosync .ls-story-play-btn:hover {
  transform: translateY(-2px);
  background: #1e293b;
}

.lingosync .ls-story-nav-btn {
  background: #f1f5f9;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}

.lingosync .ls-story-footer {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 24px;
}

/* --- Mobile player dock fix: compact 3-row layout with visible content area --- */
@media (max-width: 768px) {
  .lingosync .ls-controls-wrapper {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "play speed toggle"
      "tabs tabs tabs";
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 8px !important;
    width: 100%;
    max-width: 100%;
    padding: 10px !important;
    margin-bottom: 16px !important;
    border-radius: 18px !important;
    position: static !important;
    top: auto !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden;
  }

  .lingosync .ls-play-btn {
    grid-area: play;
    width: 52px !important;
    height: auto !important;
    min-height: 44px;
    border-radius: 14px !important;
    font-size: 18px !important;
    padding: 0 !important;
    justify-self: stretch;
    align-self: stretch;
  }

  .lingosync .ls-controls-wrapper>.ls-speed-controls:nth-of-type(1) {
    grid-area: speed;
  }

  .lingosync .ls-controls-wrapper>.ls-speed-controls:nth-of-type(2) {
    grid-area: toggle;
  }

  .lingosync .ls-speed-controls {
    min-width: 0;
    width: 100%;
    padding: 4px !important;
    gap: 4px !important;
    border-radius: 12px !important;
    background: #f1f5f9;
  }

  .lingosync .ls-tab-controls {
    grid-area: tabs;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .lingosync .ls-tab-controls .ls-speed-btn {
    width: 100%;
  }

  .lingosync .ls-speed-btn {
    min-width: 0;
    padding: 8px 6px !important;
    font-size: 12px !important;
    line-height: 1.15;
    border-radius: 10px !important;
    white-space: normal !important;
    word-break: break-word;
    text-align: center;
  }

  .lingosync .ls-dynamic-content,
  .lingosync .ls-panel,
  .lingosync .ls-q-card,
  .lingosync .ls-dialogue-card,
  .lingosync .ls-scene-card {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .lingosync .ls-controls-wrapper {
    grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px !important;
    padding: 8px !important;
    border-radius: 16px !important;
  }

  .lingosync .ls-play-btn {
    width: 46px !important;
    min-height: 40px;
    font-size: 16px !important;
    border-radius: 12px !important;
  }

  .lingosync .ls-tab-controls {
    gap: 5px !important;
  }

  .lingosync .ls-speed-btn {
    padding: 7px 4px !important;
    font-size: 11px !important;
  }
}



/* ─── OPTIMIZED COMPACT MOBILE PLAYER DOCK ─── */

@media (max-width: 768px) {
  .lingosync .ls-controls-wrapper {
    display: grid !important;
    /* 3-column top row, full-width bottom row */
    grid-template-columns: 44px 1fr 1fr;
    grid-template-areas:
      "play speed toggle"
      "tabs tabs tabs";
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12) !important;
    position: sticky !important;
    top: 8px !important;
    margin-bottom: 20px !important;
  }

  /* Micro Play Button */
  .lingosync .ls-play-btn {
    grid-area: play;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2) !important;
  }

  /* Compact Horizontal Containers */
  .lingosync .ls-speed-controls {
    padding: 3px !important;
    gap: 2px !important;
    border-radius: 10px !important;
    background: #f1f5f9;
  }

  .lingosync .ls-controls-wrapper>.ls-speed-controls:nth-of-type(1) {
    grid-area: speed;
  }

  .lingosync .ls-controls-wrapper>.ls-speed-controls:nth-of-type(2) {
    grid-area: toggle;
  }

  /* Tab Navigation - Slim Grid */
  .lingosync .ls-tab-controls {
    grid-area: tabs;
    display: grid !important;
    /* 3 buttons per row to keep them small and neat */
    grid-template-columns: repeat(3, 1fr);
    gap: 4px !important;
    margin: 0 !important;
    padding-top: 4px !important;
    border-top: 1px solid #f1f5f9;
  }

  .lingosync .ls-speed-btn {
    padding: 6px 4px !important;
    font-size: 11px !important;
    font-weight: 700;
    border-radius: 8px !important;
    line-height: 1.1;
    text-align: center;
  }

  /* Active State Refinement */
  .lingosync .ls-speed-btn.is-active {
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }
}

/* Extra small devices (iPhone SE, etc) */
@media (max-width: 380px) {
  .lingosync .ls-controls-wrapper {
    padding: 6px !important;
    gap: 6px !important;
  }

  .lingosync .ls-play-btn {
    width: 40px !important;
    height: 40px !important;
  }

  .lingosync .ls-tab-controls {
    grid-template-columns: repeat(3, 1fr);
  }

  .lingosync .ls-speed-btn {
    font-size: 10px !important;
    padding: 5px 2px !important;
  }
}



/* --- Speak Tab: Grid Selection --- */
.lingosync .ls-speak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.lingosync .ls-speak-card-thumb {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.lingosync .ls-speak-card-thumb:hover {
  transform: translateY(-4px);
  border-color: #3b82f6;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.1);
}

.lingosync .ls-speak-card-thumb .ls-phrase-en {
  font-size: 15px;
  color: #1e293b;
  font-weight: 700;
}



/* --- Speak Tab: Dialogue Bubbles --- */
.lingosync .ls-speak-dialogue-area {
  margin-bottom: 30px;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

/* Purple Bubble (System Part) */
.lingosync .ls-bubble.ls-speak-purple {
  background: #f5f3ff !important;
  /* Soft Purple */
  border: 1px solid #ddd6fe !important;
  color: #5b21b6;
}

/* Green Bubble (Learner Part) */
.lingosync .ls-bubble.ls-speak-green {
  background: #f0fdf4 !important;
  /* Soft Green */
  border: 1px solid #bbf7d0 !important;
  color: #166534;
}

/* Blur Effect when "Start Talk" is clicked */
.lingosync .ls-speak-dialogue-area.is-blurred {
  filter: blur(12px);
  opacity: 0.15;
  pointer-events: none;
}



/* --- Speak Tab: Transcription & Feedback --- */
.lingosync .ls-gs-live-transcript {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  border-radius: 16px;
  padding: 20px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  margin: 20px 0;
  transition: all 0.3s ease;
}

/* Red Box (Incorrect / Try Again) */
.lingosync .ls-gs-live-transcript.ls-ts-error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
  animation: lsShake 0.4s ease;
}

/* Green Box (Correct) */
.lingosync .ls-gs-live-transcript.ls-ts-success {
  background: #f0fdf4;
  border-color: #10b981;
  color: #14532d;
}

.lingosync .ls-mic-active {
  color: #ef4444;
  font-weight: 900;
  animation: lsPulseRecord 1s infinite;
}


/* =========================================================
   SPEAK TAB: DIALOGUE GRID & CARDS
   ========================================================= */

/* 1. The Grid Layout */
.lingosync .ls-speak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
  padding: 10px 0;
}

/* 2. The Individual Dialogue Cards */
.lingosync .ls-speak-card-thumb {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  text-align: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  min-height: 140px;
  position: relative;
  overflow: hidden;
  /* contain the loader bar inside the card */
}

.lingosync .ls-speak-card-thumb:hover {
  transform: translateY(-5px);
  border-color: #3b82f6;
  background: #f8fbff;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.12);
}

/* While any card is loading, non-loading cards are dimmed and unclickable */
.lingosync .ls-speak-grid.is-loading-tts .ls-speak-card-thumb.is-tts-waiting {
  opacity: 0.4;
  filter: grayscale(0.5);
  pointer-events: none;
  cursor: default;
}

/* The card being loaded: cursor wait, no hover transform */
.lingosync .ls-speak-card-thumb.is-tts-loading {
  cursor: wait;
  pointer-events: none;
}

.lingosync .ls-speak-card-thumb.is-tts-loading:hover {
  transform: none;
}

/* The Animated Border Layer — paints green around the card */
.lingosync .ls-speak-card-thumb.is-tts-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  /* Border thickness */
  border-radius: 24px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #10b981 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background-size: 200% auto;
  animation: lsBorderPaint 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes lsBorderPaint {
  0% {
    opacity: 0;
    background-position: 100% 0;
  }

  10% {
    opacity: 1;
  }

  100% {
    background-position: 0% 0;
  }
}

.lingosync .ls-speak-card-thumb .ls-phrase-index {
  background: #eff6ff;
  color: #2563eb;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Index badge turns solid green on the loading card */
.lingosync .ls-speak-card-thumb.is-tts-loading .ls-phrase-index {
  background: #10b981 !important;
  color: white !important;
  transform: scale(1.1);
}

.lingosync .ls-speak-card-thumb .ls-phrase-en {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

/* 3. Dialogue Bubble Color Coding (Purple & Green) */
/* Purple = System Prompt */
.lingosync .ls-bubble.ls-speak-purple {
  background: #f5f3ff !important;
  border: 2px solid #ddd6fe !important;
  color: #5b21b6 !important;
}

/* Green = Learner Response */
.lingosync .ls-bubble.ls-speak-green {
  background: #f0fdf4 !important;
  border: 2px solid #bbf7d0 !important;
  color: #166534 !important;
}

/* 4. Active Drill States */
.lingosync .ls-speak-dialogue-area {
  transition: filter 0.4s ease, opacity 0.4s ease;
}

/* Blur effect when speaking starts */
.lingosync .ls-speak-dialogue-area.is-blurred {
  filter: blur(14px);
  opacity: 0.2;
  pointer-events: none;
}

/* =========================================================
   SPEAK TAB: ERROR FEEDBACK LAYOUT
   Layout order (top → bottom) when answer is incorrect:
     1. Red transcript box  ← learner's spoken text
     2. Correct sentence hint
     3. Try Again button (pulsating)
   ========================================================= */

/* The interaction area becomes a flex column so we can control order */
.lingosync .ls-gs-interaction {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 28px;
}

/* 5. Live Transcription box — sits at the TOP of the interaction area */
.lingosync .ls-gs-live-transcript {
  order: 1;
  min-height: 90px;
  border-radius: 20px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 24px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
  color: #334155;
  margin: 0 0 16px 0;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Success State (Green) */
.lingosync .ls-gs-live-transcript.ls-ts-success {
  background: #f0fdf4;
  border: 2px solid #10b981;
  color: #14532d;
  animation: none;
}

/* Error State (Red) — transcript box turns red, shakes once */
.lingosync .ls-gs-live-transcript.ls-ts-error {
  background: #fef2f2;
  border: 2px solid #ef4444;
  color: #991b1b;
  animation: lsShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Status badge (🔊 / 🎤) — sits below transcript */
.lingosync .ls-gs-status-badge {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #64748b;
  min-height: 32px;
  margin-bottom: 8px;
}

/* Correct answer hint text — sits below status badge */
.lingosync .ls-speak-error-hint {
  order: 3;
  text-align: center;
  color: #b91c1c;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  padding: 12px 16px;
  background: #fff1f1;
  border-radius: 14px;
  margin-bottom: 24px;
}

.lingosync .ls-speak-error-hint strong {
  display: block;
  font-size: 19px;
  font-weight: 900;
  color: #991b1b;
  margin-top: 4px;
}

/* Start Talk button (idle state) — centred */
.lingosync #speak-start-btn {
  order: 4;
  align-self: center;
}

/* =========================================================
   SPEAK TAB: scene-card override
   The global .ls-scene-card has overflow:hidden which clips
   the Try Again button and collapses bottom space. In the
   Speak tab the card must scroll/grow freely.
   ========================================================= */
.lingosync .ls-speak-dialogue-area~.ls-gs-interaction,
.lingosync .ls-gs-interaction {
  padding-bottom: 8px;
  /* keep inner breathing room */
}

/* The scene-card that wraps the speak drill must not clip */
.lingosync .ls-panel .ls-scene-card {
  overflow: visible;
  padding-bottom: 40px;
  /* generous space below the button */
}

/* Extra bottom margin on the whole panel so nothing kisses the edge */
.lingosync .ls-panel {
  padding-bottom: 32px;
}

/* =========================================================
   TRY AGAIN BUTTON — pulsating, prominent
   ========================================================= */
.lingosync #speak-retry-btn {
  order: 4;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 40px;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
  animation: lsRetryPulse 1.6s ease-in-out infinite;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 180px;
  letter-spacing: 0.02em;
  /* Push the button away from the hint above it */
  margin-top: 4px;
  /* Ensure it is never clipped by a parent */
  position: relative;
  z-index: 1;
}

.lingosync #speak-retry-btn:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 14px 32px rgba(239, 68, 68, 0.5);
  animation: none;
}

.lingosync #speak-retry-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Pulsating glow keyframes for Try Again */
@keyframes lsRetryPulse {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35),
      0 0 0 0 rgba(239, 68, 68, 0);
  }

  50% {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45),
      0 0 0 10px rgba(239, 68, 68, 0.12);
  }
}

/* 6. Responsive Grid for Mobile */
@media (max-width: 768px) {
  .lingosync .ls-speak-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .lingosync .ls-speak-card-thumb {
    padding: 16px;
    min-height: 110px;
    border-radius: 18px;
  }

  .lingosync .ls-speak-card-thumb .ls-phrase-en {
    font-size: 15px;
  }

  .lingosync .ls-speak-error-hint {
    font-size: 15px;
  }

  .lingosync .ls-speak-error-hint strong {
    font-size: 17px;
  }

  /* ── MOBILE SPEAK TAB: correct layout ──────────────────────────────────
     Problems identified from screenshot:
       1. ls-scene-card padding (22px sides + 40px bottom) wastes space
       2. ls-speak-dialogue-area margin-bottom: 30px (desktop) pushes
          interaction zone down — never had a mobile override
       3. ls-gs-interaction margin-top: 28px (desktop) adds more gap
       4. max-height on dialogue area was wrong — it cut the green bubble
       5. Badge/transcript DOM order is now fixed in JS (badge first in HTML)
          so no CSS order tricks needed; remove conflicting order rules.

     Layout intent (top to bottom inside ls-scene-card):
       ─ dialogue bubbles (A purple, B green) — fully visible, no clip
       ─ [8px gap]
       ─ badge: "YOUR TURN" orange box  (idle: nothing here)
       ─ transcript: dashed box showing speech  (idle: nothing here)
       ─ hint + retry button  (only on error)
       ─ Start Talk button  (only on idle)
  ─────────────────────────────────────────────────────────────────────── */

  /* Scene card: reduce padding so bubbles + interaction fit on screen */
  .lingosync .ls-panel .ls-scene-card {
    padding: 16px 16px 20px 16px;
  }

  /* Dialogue area: kill the 30px bottom margin — 10px is enough */
  .lingosync .ls-speak-dialogue-area {
    margin-bottom: 10px;
    /* NO max-height — both bubbles must be fully visible */
  }

  /* Interaction zone: minimal top gap, tight column */
  .lingosync .ls-gs-interaction {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding-bottom: 4px;
  }

  /* Badge: prominent orange box, no order tricks (badge is first in DOM now) */
  .lingosync .ls-gs-status-badge {
    background: #fff8f0;
    border: 2px solid #fb923c;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 900;
    color: #c2410c;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 14px rgba(251, 146, 60, 0.18);
    margin: 0;
  }

  /* mic-active label inside badge */
  .lingosync .ls-gs-status-badge .ls-mic-active {
    color: #dc2626;
    font-size: 15px;
    font-weight: 900;
    animation: lsPulseRecord 1s infinite;
  }

  /* Transcript box: compact, no extra margin */
  .lingosync .ls-gs-live-transcript {
    min-height: 56px;
    font-size: 17px;
    padding: 12px 14px;
    margin: 0;
  }

  /* Error hint: no extra bottom margin */
  .lingosync .ls-speak-error-hint {
    margin-bottom: 0;
  }

  /* Start Talk and Try Again: full width, easy to tap */
  .lingosync #speak-start-btn,
  .lingosync #speak-retry-btn {
    width: 100%;
    min-width: unset;
    font-size: 16px;
    padding: 15px 20px;
    margin-top: 0;
    align-self: stretch;
    box-sizing: border-box;
  }
}

/* ── MOBILE PLAYER: final cascade override ──────────────────────────────
   Must stay at the END of the file so it wins over all desktop rules
   (including the bare display:inline-flex and display:grid rules above
   that apply at all widths and would otherwise show tabs on mobile).
   ──────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Tabs always hidden by default — overrides everything above */
  .lingosync .ls-tab-controls {
    display: none !important;
  }

  /* Revealed only when TABS button is tapped */
  .lingosync .ls-controls-wrapper.ls-tabs-open .ls-tab-controls {
    display: flex !important;
    flex-wrap: wrap;
    width: 100%;
    order: 20;
    margin-left: 0;
    gap: 6px;
    padding: 6px 4px 2px;
    background: transparent;
    border-radius: 0;
  }

  /* Tab buttons in expanded panel */
  .lingosync .ls-controls-wrapper.ls-tabs-open .ls-tab-controls .ls-speed-btn {
    flex: 1 1 auto;
    min-width: calc(33% - 6px);
    padding: 9px 8px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    white-space: normal;
    line-height: 1.2;
  }

  .lingosync .ls-controls-wrapper.ls-tabs-open .ls-tab-controls .ls-speed-btn.is-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    border-color: transparent;
  }

  /* Allow wrapper to wrap when tabs panel is open */
  .lingosync .ls-controls-wrapper.ls-tabs-open {
    flex-wrap: wrap !important;
    border-radius: 20px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════
   MOBILE PLAYER — DEFINITIVE FINAL OVERRIDE
   Appended last so it wins every cascade conflict above.
   Desktop is untouched — all rules here are inside max-width: 768px.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* 1. Wrapper: simple single flex row, no grid, no overflow hidden */
  .lingosync .ls-controls-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 22px !important;
    margin-bottom: 16px !important;
    position: sticky !important;
    top: 16px !important;
    z-index: 50 !important;
    overflow: visible !important;
    width: auto !important;
    max-width: none !important;
  }

  /* 2. Play button: big, circular, SVG-friendly — no emoji hacks needed */
  .lingosync .ls-play-btn {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    /* kill any leftover emoji sizing */
    padding: 0 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    grid-area: unset !important;
    align-self: auto !important;
    justify-self: auto !important;
  }

  /* SVG icons inside play button */
  .lingosync .ls-play-btn svg {
    width: 28px !important;
    height: 28px !important;
    display: block;
    flex-shrink: 0;
  }

  /* 3. Gear (⚙) and TABS buttons — sized to match play-btn height */
  .lingosync .ls-mobile-drawer-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 52px !important;
    padding: 14px 18px !important;
    font-size: 22px !important;
    border-radius: 16px !important;
    flex-shrink: 0 !important;
  }

  .lingosync .ls-mobile-tabs-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 52px !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    border-radius: 16px !important;
    flex-shrink: 0 !important;
  }

  /* 4. Speed/hide controls: hidden until gear opened */
  .lingosync .ls-speed-controls:not(.ls-tab-controls) {
    display: none !important;
  }

  .lingosync .ls-controls-wrapper.ls-drawer-open .ls-speed-controls:not(.ls-tab-controls) {
    display: flex !important;
    flex: 1 1 auto;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
  }

  .lingosync .ls-controls-wrapper.ls-drawer-open {
    flex-wrap: wrap !important;
    border-radius: 20px !important;
  }

  /* 5. Tabs: hidden until TABS tapped */
  .lingosync .ls-tab-controls {
    display: none !important;
    grid-area: unset !important;
  }

  .lingosync .ls-controls-wrapper.ls-tabs-open .ls-tab-controls {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    order: 20;
    margin-left: 0 !important;
    gap: 6px !important;
    padding: 6px 0 2px !important;
    background: transparent !important;
    grid-area: unset !important;
  }

  .lingosync .ls-controls-wrapper.ls-tabs-open {
    flex-wrap: wrap !important;
    border-radius: 20px !important;
  }

  .lingosync .ls-controls-wrapper.ls-tabs-open .ls-tab-controls .ls-speed-btn {
    flex: 1 1 calc(33% - 6px) !important;
    padding: 9px 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-align: center !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    white-space: normal !important;
    line-height: 1.2 !important;
  }

  .lingosync .ls-controls-wrapper.ls-tabs-open .ls-tab-controls .ls-speed-btn.is-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    border-color: transparent !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE — FIXED BOTTOM NAV (Dialogue & Scenes prev/next)
   Must be last in file to win all cascade conflicts.
   Desktop is completely untouched — all rules inside max-width: 768px.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Fixed bar anchored to the bottom of the viewport */
  .lingosync .ls-dialogue-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 200 !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  /* Buttons: grow to fill, big tap targets */
  .lingosync .ls-dialogue-nav .ls-dialogue-btn {
    flex: 1 1 0 !important;
    justify-content: center !important;
    padding: 13px 12px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
    min-height: 48px !important;
  }

  /* Count badge stays centred and doesn't stretch */
  .lingosync .ls-dialogue-nav .ls-dialogue-count {
    flex: 0 0 auto !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    color: #64748b !important;
  }

  /* Push page content up so the last card isn't hidden behind the fixed bar.
     Targets the scrollable panel that contains .ls-dialogue-nav. */
  .lingosync .ls-panel,
  .lingosync .ls-dialogue-card,
  .lingosync .ls-scene-card {
    padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE — HIDE TAB INSTRUCTION HEADINGS & DESCRIPTIONS
   Hides the section title (ls-block-title) and its description paragraph
   inside each main-panel tab on mobile to save vertical space.
   Rules are scoped to .ls-main so sidebar block titles stay visible.
   Desktop is completely untouched — all rules inside max-width: 768px.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Hide the panel-level instruction title in the main content area.
     .ls-panel > .ls-block-title  = direct child (Phrases, Practice, Car, Speak)
     .ls-panel > div > .ls-block-title = one div wrapper deep (Dialogue, Scenes) */
  .lingosync .ls-main .ls-panel>.ls-block-title,
  .lingosync .ls-main .ls-panel>div>.ls-block-title {
    display: none !important;
  }

  /* Hide the description <p> that directly follows the hidden title.
     The adjacent-sibling combinator (+) ensures only the intro paragraph
     is hidden, not any content paragraphs further down. */
  .lingosync .ls-main .ls-panel>.ls-block-title+p,
  .lingosync .ls-main .ls-panel>div>.ls-block-title+p {
    display: none !important;
  }
}

/* =========================================================
   X FLOW DEMO — locks + sales preview layer
   ========================================================= */
html,body{margin:0;background:#f8fafc;min-height:100%;}
.demo-shell{max-width:1440px;margin:0 auto;}
.demo-topbar{position:sticky;top:0;z-index:100;background:rgba(248,250,252,.92);backdrop-filter:blur(18px);border-bottom:1px solid #e2e8f0;}
.demo-topbar-inner{max-width:1440px;margin:0 auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;}
.demo-brand{display:flex;align-items:center;gap:12px;font-weight:900;color:#0f172a;letter-spacing:-.03em}.demo-brand-mark{width:38px;height:38px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#2563eb,#4f46e5);color:white;box-shadow:0 12px 28px rgba(37,99,235,.28)}
.demo-top-actions{display:flex;gap:10px;align-items:center}.demo-chip{font-size:12px;font-weight:900;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;border-radius:999px;padding:8px 12px}.demo-unlock{border:0;border-radius:999px;padding:12px 18px;background:linear-gradient(135deg,#2563eb,#4f46e5);color:white;font-weight:900;text-decoration:none;box-shadow:0 12px 24px rgba(37,99,235,.25);white-space:nowrap}
.lingosync .ls-hero{position:relative;overflow:hidden}.lingosync .ls-hero:after{content:"DEMO";position:absolute;right:28px;top:24px;font-size:12px;font-weight:900;letter-spacing:.16em;color:#2563eb;background:#dbeafe;border:1px solid #bfdbfe;border-radius:999px;padding:7px 12px}.lingosync .ls-hero-demo-note{margin-top:14px;display:flex;gap:10px;flex-wrap:wrap}.lingosync .ls-hero-pill{font-size:12px;font-weight:800;color:#475569;background:#fff;border:1px solid #e2e8f0;border-radius:999px;padding:8px 12px}
.lingosync .ls-unit-btn.is-locked,.lingosync .ls-verb-btn.is-locked{opacity:.72;background:#fff;color:#64748b;position:relative}.lingosync .ls-unit-btn.is-locked:hover,.lingosync .ls-verb-btn.is-locked:hover{transform:none;box-shadow:0 2px 8px rgba(15,23,42,.02);border-color:transparent}.lingosync .ls-lock{font-size:14px;color:#94a3b8}.lingosync .ls-active-free{font-size:11px;color:#22c55e;font-weight:900;background:#dcfce7;border-radius:999px;padding:4px 8px}
.lingosync .ls-controls-wrapper{position:sticky!important;top:78px!important}.lingosync .ls-main{position:relative}.demo-upgrade-strip{background:linear-gradient(135deg,#0f172a,#1e3a8a);color:white;border-radius:24px;margin:24px 0 0;padding:24px;display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center;box-shadow:0 24px 50px rgba(15,23,42,.18)}.demo-upgrade-strip h3{margin:0 0 6px;font-size:22px;font-weight:900}.demo-upgrade-strip p{margin:0;color:#bfdbfe;line-height:1.6}.demo-upgrade-strip a{background:white;color:#1d4ed8;border-radius:999px;padding:14px 20px;text-decoration:none;font-weight:900;white-space:nowrap}
.lingosync .ls-tab-controls .ls-speed-btn.is-locked-tab{color:#94a3b8}.lingosync .ls-tab-controls .ls-speed-btn.is-locked-tab::after{content:' 🔒'}
.demo-locked-panel{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:24px;padding:32px;box-shadow:0 18px 44px rgba(15,23,42,.06);overflow:hidden}.demo-locked-panel:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.64),rgba(248,250,252,.92));backdrop-filter:blur(3px);z-index:2}.demo-locked-content{filter:blur(4px);opacity:.56;pointer-events:none}.demo-lock-overlay{position:absolute;inset:0;z-index:3;display:grid;place-items:center;padding:24px}.demo-lock-card{max-width:520px;background:rgba(255,255,255,.94);border:1px solid #dbeafe;border-radius:24px;padding:26px;text-align:center;box-shadow:0 24px 60px rgba(15,23,42,.18)}.demo-lock-card .icon{width:54px;height:54px;border-radius:18px;background:#eff6ff;color:#2563eb;display:grid;place-items:center;margin:0 auto 12px;font-size:24px}.demo-lock-card h3{margin:0 0 10px;font-size:24px;font-weight:900;color:#0f172a;letter-spacing:-.03em}.demo-lock-card p{margin:0 0 18px;color:#64748b;line-height:1.65}.demo-lock-card a{display:inline-flex;border-radius:999px;background:linear-gradient(135deg,#2563eb,#4f46e5);color:white;text-decoration:none;font-weight:900;padding:13px 20px}
.lingosync .ls-demo-tag{margin-left:8px;font-size:11px;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;padding:4px 8px;border-radius:999px;font-weight:900}.demo-full-teaser{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:22px}.demo-teaser-card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:18px;box-shadow:0 8px 20px rgba(15,23,42,.035)}.demo-teaser-card strong{display:block;color:#0f172a;font-weight:900;margin-bottom:6px}.demo-teaser-card span{color:#64748b;font-size:14px;line-height:1.5}.ls-progress-meta{display:flex;justify-content:space-between;align-items:center;margin-top:18px;color:#64748b;font-size:13px;font-weight:800}.ls-car-controls{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:24px}.ls-car-small-btn{border:1px solid #e2e8f0;background:#fff;color:#334155;border-radius:999px;padding:10px 15px;font-weight:800;cursor:pointer}.ls-car-small-btn:hover{border-color:#bfdbfe;color:#1d4ed8}.ls-phrase-row.is-preview-limited:nth-of-type(n+4){position:relative}.ls-phrase-row.is-preview-limited:nth-of-type(n+4)::after{content:'Pełna lista zdań i ćwiczenia dostępne po odblokowaniu';position:absolute;inset:0;border-radius:24px;background:rgba(255,255,255,.72);backdrop-filter:blur(2px);display:grid;place-items:center;color:#2563eb;font-weight:900;font-size:13px;opacity:0;transition:.25s}.ls-phrase-row.is-preview-limited:nth-of-type(n+4):hover::after{opacity:1}.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%) translateY(20px);opacity:0;background:#0f172a;color:white;padding:13px 18px;border-radius:999px;box-shadow:0 20px 44px rgba(15,23,42,.24);font-family:Inter,system-ui,sans-serif;font-weight:800;z-index:500;transition:.25s}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:1024px){.demo-upgrade-strip{grid-template-columns:1fr}.demo-full-teaser{grid-template-columns:1fr}.lingosync .ls-controls-wrapper{top:68px!important}}
@media(max-width:768px){.demo-topbar-inner{padding:10px 12px}.demo-chip{display:none}.demo-unlock{padding:10px 12px;font-size:13px}.lingosync .ls-hero:after{right:18px;top:18px}.demo-upgrade-strip{padding:20px}.lingosync .ls-sidebar{display:block}.lingosync .ls-block{margin-bottom:16px}.demo-lock-card{padding:22px}.lingosync .ls-controls-wrapper{top:58px!important}}


/* ═══════════════════════════════════════════════════════════════════════
   DEMO V3 FIXES — desktop/mobile controls + car play sequence
   ═══════════════════════════════════════════════════════════════════════ */

/* Gear and TABS are mobile-only. On desktop/tablet wide screens they must never show. */
.lingosync .ls-mobile-drawer-toggle,
.lingosync .ls-mobile-tabs-toggle {
  display: none !important;
}

@media (max-width: 768px) {
  .lingosync .ls-mobile-drawer-toggle,
  .lingosync .ls-mobile-tabs-toggle {
    display: inline-flex !important;
  }
}

/* Car Listen visual cue for the learner's repetition pause */
.lingosync .ls-car-status {
  min-height: 24px;
}
.lingosync .ls-car-status:has(+ .ls-car-phrase) {
  letter-spacing: .12em;
}

/* Safer fallback: when status text is long, keep it clean on mobile */
@media (max-width: 480px) {
  .lingosync .ls-car-status {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
}
