/* Quiet course controls: straight edges, immediate feedback, a true bottom bar. */
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-card {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-card > .tabs {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100% !important;
  margin: 0 !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #e3e7ee !important;
  border-radius: 0 !important;
  background: #fff !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  scroll-behavior: auto;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs .tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 48px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  color: #6b7483 !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs .tab.active {
  color: #344a7d !important;
  background: #f7f9fc !important;
  border-bottom-color: #344a7d !important;
  font-weight: 650 !important;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs .tab:not(.active):hover {
  background: #f6f7fa !important;
  color: #303c51 !important;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs .tab:focus-visible {
  outline: 2px solid #657cab !important;
  outline-offset: -4px;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs :is(.st-ink, .st-tab-progress) {
  display: none !important;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs .tab-complete {
  width: 13px !important;
  height: 13px !important;
  color: #30735d !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* One fixed row at every width. Narrow screens scroll the controls horizontally. */
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-layout > .lesson-tools,
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-layout > .lesson-tools[data-open="false"] {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  min-height: 56px;
  margin: 0;
  padding: 5px max(16px, calc((100% - 1360px) / 2)) calc(5px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px), calc((100% - 1360px) / 2));
  padding-right: max(16px, env(safe-area-inset-right, 0px), calc((100% - 1360px) / 2));
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-top: 1px solid #dde3ec;
  border-radius: 0;
  background: #fff;
  backdrop-filter: none;
  box-shadow: none;
  overflow: visible !important;
  container-type: normal;
  container-name: none;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools .lesson-tools-content {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 24px;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-padding-inline: 4px;
  touch-action: pan-x;
  opacity: 1;
  visibility: visible;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools[data-open="false"] {
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  min-height: 56px;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools[data-open="false"] .lesson-tools-content {
  display: none !important;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools-toggle {
  width: 36px;
  height: 44px;
  min-width: 36px;
  min-height: 36px !important;
  padding: 0;
  align-self: center;
  border-radius: 0;
  background: transparent;
  color: #657184;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-toggle > .lesson-tools-collapse {
  font-size: 20px;
  line-height: 1;
  rotate: none;
  transform: none;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-toggle::before,
html.atelier-theme body #app .main.page-lesson .lesson-tools-progress {
  display: none !important;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-reading {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  min-width: max-content;
  flex: 0 0 auto;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-content::-webkit-scrollbar {
  display: none;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-reading > :not(:first-child),
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-switch + .st-switch {
  border-left: 0;
  padding-left: 0;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .lesson-tool-field {
  gap: 8px;
  min-height: 36px;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools :is(.lesson-tool-field, .st-switch) > [data-i18n] {
  font-size: 12px;
  font-weight: 500;
  color: #6c7686;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-seg {
  min-height: 34px;
  padding: 0;
  gap: 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-seg button {
  min-height: 34px !important;
  min-width: 36px;
  padding: 4px 9px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  color: #606c7f;
  background: transparent;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-seg button.on {
  color: #344a7d;
  font-weight: 650;
  background: #edf2f9;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-seg button:not(.on):hover {
  background: #f6f7fa;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-seg-thumb {
  display: none;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-toggles {
  flex-wrap: nowrap;
  gap: 18px;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-switch {
  min-height: 36px !important;
  gap: 7px;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-switch-ui {
  width: 15px;
  height: 15px;
  border: 1px solid #b7c1cf;
  border-radius: 0;
  background: #fff;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-switch-ui::after {
  display: none;
  content: "✓";
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  font: 600 12px/13px Arial, sans-serif;
  text-align: center;
  transform: none;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-switch input:checked + .st-switch-ui {
  border-color: #405b8e;
  background: #405b8e;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-switch input:checked + .st-switch-ui::after {
  display: block;
  transform: none;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools .st-switch input:focus-visible + .st-switch-ui {
  outline: 2px solid #657cab;
  outline-offset: 3px;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-operations {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin-left: auto;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools-more {
  min-width: 54px;
  min-height: 36px !important;
  padding: 4px 10px;
  gap: 6px;
  border: 1px solid #e0e5ed;
  border-radius: 0;
  background: #fff;
  color: #465775;
  font-size: 12px;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-more::before {
  content: none;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools-extra {
  top: auto;
  bottom: calc(100% + 12px);
  right: 0;
  width: 280px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - var(--lesson-top) - var(--lesson-tools-space) - 24px);
  padding: 8px;
  gap: 6px;
  border: 1px solid #dce3ee;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 4px 18px rgb(35 49 75 / 10%);
  overflow-y: auto;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools-extra .lesson-tools-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6eaf0;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools-extra :is(.lesson-tools-actions .btn, .lesson-tools-links .btn) {
  width: 100%;
  height: auto !important;
  min-height: 36px !important;
  justify-content: flex-start !important;
  padding: 7px 10px !important;
  gap: 8px !important;
  border: 0;
  border-radius: 0;
  color: #465775;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-extra .btn:hover,
html.atelier-theme body #app .main.page-lesson .lesson-tools-toggle:hover {
  background: #f3f6fa !important;
}
html.atelier-theme body #app .main.page-lesson .lesson-tools-options {
  padding: 4px 8px 10px;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools :focus-visible {
  outline: 2px solid #657cab !important;
  outline-offset: 2px;
  box-shadow: none !important;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools-content :focus-visible {
  outline-offset: -3px;
}

/* No motion on either bar, regardless of OS/account animation preferences. */
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools :is(button, .btn, .st-seg, .st-switch-ui) {
  border-radius: 0 !important;
}
html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson :is(.tabs, .tabs *, .tabs *::before, .tabs *::after, .lesson-tools, .lesson-tools *, .lesson-tools *::before, .lesson-tools *::after) {
  animation: none !important;
  transition: none !important;
  translate: none !important;
  transform: none !important;
  scroll-behavior: auto !important;
}

@media (max-width: 640px), (pointer: coarse) {
  html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools :is(button, .st-switch) {
    min-height: 44px !important;
  }
  html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-layout > .lesson-tools {
    padding-inline: max(8px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-right, 0px));
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px;
  }
  html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .lesson-tools-toggle {
    width: 44px;
    min-width: 44px;
  }
  html.atelier-theme body #app .main.page-lesson .lesson-tools .st-seg button {
    padding-inline: 8px;
  }
  html.atelier-theme body #app .main.page-lesson .lesson-tools .st-toggles {
    gap: 16px;
  }
  html.atelier-theme body #app .main.page-lesson .lesson-tools .st-switch {
    gap: 7px;
  }
  html.atelier-theme body #app .main.page-lesson .lesson-tools :is(.lesson-tool-field, .st-switch) > [data-i18n] {
    font-size: 12px;
  }
}
@media (max-width: 640px) {
  html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs .tab {
    min-height: 44px !important;
    padding-inline: 2px !important;
    font-size: 12px !important;
  }
  html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs .tab > .icon {
    display: none;
  }
  html.atelier-theme body #app .shell.workspace-shell .main[class].page-lesson .tabs .tab-complete {
    display: none !important;
  }
}
@media (max-width: 380px) {
  html.atelier-theme body.english #app .shell.workspace-shell .main[class].page-lesson .tabs .tab {
    font-size: 10px !important;
  }
}
