#headerWrapper {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: center;
  margin-left: auto;
  right: 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
}

a {
  text-decoration: none;
  color: var(--link);
}

h1 a {
  text-decoration: none;
  color: var(--text-primary);
}

#aiTab section {
  background: var(--ls-navyblue-50);
  border-radius: 1rem;
  padding: 1.5rem;
  gap: 1rem;
  display: flex;
  flex-direction: column;
}

label[for="topicInput"] {
  padding: 0.5rem 0 0 0;
}

#aiTopicForm p {
  margin: 0;
  padding: 0.5rem;
}

#aiTab h3 {
  font-size: 2rem;
  margin: 0;
  position: absolute;
  left: -1rem;
  top: -1rem;
  width: 3rem;
  height: 3rem;
  background: var(--ls-aquagreen-300);
  border-radius: 9999px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#aiTab section:first-of-type .flex > h3 {
  background: var(--ls-amberorange-300);
}

#aiTab h4 {
  padding-left: 2.6rem;
}

#interfaceLangWrapper {
  display: flex;
  gap: 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  padding: 0.4rem;
}

#interfaceLangWrapper:hover {
  background: var(--ls-navyblue-50);
  cursor: pointer;
}

#interfaceLangWrapper select {
  -webkit-appearance: none;
  appearance: none;
  font-size: 1rem;
  padding: 0 1.5rem 0 0;
  border: none;
  background: transparent;
  background-image: url("/static/img/select-chevron.svg");
  background-position: right 0.35rem center;
  background-size: 9px 5px;
  background-repeat: no-repeat;
}

#interfaceLangWrapper select:hover {
  cursor: pointer;
}

#interfaceLangWrapper:hover p {
  margin: 0;
}

h4 {
  margin: 0;
}

#tabs {
  text-align: center;
  position: relative;
  gap: 1rem;
  display: flex;
  justify-content: center;
}

.main-container {
  display: flex;
  max-width: 100%;
  flex: 1 1 auto;
  flex-direction: row;
}

.left-pane,
.right-pane {
  flex: 1 1 0;
}

.left-pane {
  position: relative;
  overflow: hidden;
  min-width: 400px;
  overflow-y: auto;
  box-sizing: border-box;
  background: white;
  padding: 1rem;
  border-right: 1px solid var(--border-subtle);
  z-index: 2;
  overflow: visible;
}

.toggle-pane-btn {
  position: absolute;
  top: 4%;
  right: -26px;
  transform: translateY(-50%);
  width: 34px;
  height: 46px;
  z-index: 9999;
  border: none;
  cursor: pointer;
  background: center/contain no-repeat url("/static/img/btn-sidebar-open.png");
}

.toggle-pane-btn:hover {
  background-image: url("/static/img/btn-sidebar-open-hover.png");
  background-color: transparent;
}

body.left-collapsed .left-pane:hover .toggle-pane-btn {
  background-image: url("/static/img/btn-sidebar-closed-hover.png");
  background-color: transparent;
}

body.left-collapsed .left-pane .toggle-pane-btn {
  background-image: url("/static/img/btn-sidebar-closed.png");
  background-color: transparent;
}

body.left-collapsed .left-pane {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
}

body.left-collapsed .left-pane .left-content {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#aiTab {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

#ttsFormManual {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--ls-navyblue-50);
  border-radius: 1rem;
  padding: 1.5rem;
}

#aiTopicForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.right-pane {
  flex: 1;
  min-width: 400px;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 500;
  border-radius: 1rem;
  z-index: 1;
  overflow: hidden;
  overscroll-behavior: contain;
}

#rightOutput {
  gap: 1rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--footer-text);
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  height: 80vh;
  max-width: 720px;
}

#ttsFormAI {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

/* --- REMOVED generic input/textarea/select/label styles here --- */

#aiText {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --- REMOVED global label rule --- */

/* --- REMOVED global button rules; keep only component-scoped ones below --- */

#tabs button {
  border-radius: 0.5rem 0.5rem 0 0;
  width: auto;
  margin: 0;
}

#resultArea {
  max-width: 720px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 400;
}

audio,
video {
  display: block;
  width: 100%;
}

p span {
  font-weight: 600;
}

#manualLangMsg {
  font-size: 0.95rem;
}

div > button#tabAI,
div > button#tabManual {
  display: inline-block;
  margin: 0;
  min-width: 180px;
  font-size: 1rem;
  border: none;
}

#tabs button:not(.active-tab) {
  background-color: rgba(255, 255, 255, 0.4);
  color: var(--text-primary);
  font-weight: 400;
}

.logo-link {
  display: inline-block;
  width: 18rem;
  height: auto;
  background: url("/static/img/ls_logo.svg") no-repeat center;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
  position: relative;
  top: 0;
}

#tabs button.active-tab {
  background-color: var(--ls-navyblue-50);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 0.5rem 0.5rem 0 0;
}

.language-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.language-row .form-group {
  flex: 1;
  min-width: 200px;
}

/* --- REMOVED textarea[readonly] (move to common.css if you still want it) --- */

.no-select {
  user-select: none;
  pointer-events: none;
  background-color: var(--ls-navyblue-50);
  color: var(--text-primary);
}

label:has(> input#pauseCheckboxAI),
label:has(> input#pauseCheckboxManual) {
  padding: 0;
}

p:has(> span#charCount) {
  text-align: right;
  font-size: 0.75rem;
  margin: 0;
}

p:has(> span#manualCharCount) {
  text-align: right;
  font-size: 0.75rem;
  align-items: center;
  display: flex;
  margin: 0 0 0 auto;
  /* margin-left: auto; */
}

#manualCharLine {
  display: flex;
  justify-content: space-between;
}

#translatedOutput {
  white-space: pre-wrap;
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.5;
  text-align: left;
}

.generation-limit-info {
  background-color: var(--ls-coralred-600);
  color: white;
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin: 1rem;
  font-size: 0.95em;
  text-align: center;
}

.generation-limit-info a {
  color: var(--ls-aquagreen-300);
}

.translation-select-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  justify-content: center;
}

.translation-select-label {
  font-size: 0.95rem;
  color: var(--ls-navyblue-800);
  white-space: nowrap;
}

.translation-toggle {
  display: inline-flex;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  overflow: hidden;
  background: var(--ls-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.translation-toggle .toggle-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ls-navyblue-700);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.translation-toggle .toggle-btn.is-active {
  background: var(--ls-amberorange-200);
  color: var(--ls-navyblue-900);
}

.translation-toggle .toggle-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--ls-navyblue-500);
}

.action-row button {
  width: 100%;
  margin: 0;
  /* padding removed so .btn sizing from common.css wins */
}

.share-dropdown {
  position: relative;
  width: 100%;
}

.action-row .share-dropdown {
  flex: 1;
}

.share-dropdown .btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.share-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  display: inline-block;
}

.share-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  padding: 0.25rem 0;
  min-width: 220px;
  width: max(220px, 100%);
  display: none;
  z-index: 6;
}

.share-dropdown.open .share-dropdown-menu {
  display: block;
}

.share-option {
  width: 100%;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text-primary);
}

.share-option:hover,
.share-option:focus-visible {
  background: var(--ls-navyblue-50);
  outline: none;
}

.download-buttons.disabled a {
  pointer-events: none;
  opacity: 0.5;
  text-decoration: none;
  cursor: default;
}

.action-row {
  width: 100%;
  display: flex;
  gap: 1rem;
}

div[data-i18n="outputPlaceholder"] {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#progress,
#progressStart {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 720px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 400;
}

#postVideoActions {
  max-height: fit-content;
  position: relative;
}

.post-video-buttons {
  display: none;
  position: fixed;
  left: 12px;
  top: 70%;
  height: 100%;
  transform: translateY(-50%);
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
  opacity: 0;
}

.post-video-buttons button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.5rem;
  background: rgba(255, 247, 235, 0.6);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  margin: 0;
}

body.video-complete .post-video-buttons {
  opacity: 1;
}

body.video-complete .left-pane {
  min-width: 0 !important;
  width: 0;
}

body.video-complete .right-pane {
  justify-content: center;
  padding: 1rem;
  max-width: max-content;
  margin: 0 auto;
  flex: 1 0 100%;
  max-height: fit-content;
  position: relative;
}

body.video-complete .right-pane video {
  height: auto;
  align-self: center;
}

.pro-feature {
  position: relative;
  pointer-events: none;
}

.pro-feature::after {
  content: "PRO";
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--ls-aquagreen-700);
  color: #fff;
  font-size: 0.6rem;
  line-height: 1;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.pro-feature.btn-green[disabled] {
  background: var(--ls-aquagreen-200);
  color: #fff;
}

.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.user-dropdown img {
  border-radius: 50%;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  min-width: 180px;
  z-index: 10;
  overflow: hidden;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: background 0.2s;
}

.user-dropdown button:hover {
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  background-color: white;
  box-sizing: border-box;
}

.user-dropdown.open .dropdown-menu {
  display: block;
}

.user-dropdown-container {
  position: relative;
  display: inline-block;
}

.user-button {
  background: transparent;
  color: var(--text-primary);
  display: flex;
  text-align: left;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.7rem;
  transition: background 0.2s;
  border: 1px solid var(--border-subtle);
}

.user-button:hover {
  background: var(--ls-navyblue-50);
}

.user-button img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--border-subtle);
  color: #fff;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

.user-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-name {
  font-weight: bold;
}

.user-email {
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--footer-text);
}

.dropdown-arrow {
  margin-left: auto;
  width: 12px;
  height: 8px;
  background-image: url("/static/img/select-chevron.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

.hamburger-icon {
  display: inline-block;
  width: 20px;
  height: 14px;
  background-image: linear-gradient(var(--text-primary), var(--text-primary)),
    linear-gradient(var(--text-primary), var(--text-primary)),
    linear-gradient(var(--text-primary), var(--text-primary));
  background-repeat: no-repeat;
  background-size: 100% 2px, 100% 2px, 100% 2px;
  background-position: 0 0, 0 6px, 0 12px;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  margin-top: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  min-width: 220px;
  z-index: 10;
}

.user-dropdown-container .open + .user-dropdown-menu,
.user-dropdown-container .user-button.open + .user-dropdown-menu {
  display: flex;
}

div.user-button:hover {
  background: none;
}

.user-dropdown-menu a {
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.user-dropdown-menu a:hover {
  background-color: var(--ls-navyblue-50);
}

.menu-icon {
  width: 20px;
  display: inline-block;
  text-align: center;
}

.ai-text-wrapper {
  position: relative;
  width: 100%;
}

/* --- REMOVED .ai-text-wrapper textarea visual styles (move to common.css if needed) --- */

.lock-icon {
  position: absolute;
  bottom: 8px;
  right: 48px;
  font-size: 1rem;
  opacity: 0.75;
  z-index: 10;
  pointer-events: none;
}

.pro-badge {
  position: absolute;
  bottom: 10px;
  right: 8px;
  background-color: var(--ls-aquagreen-700);
  color: #fff;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

#manualWrapper {
  margin-top: 0 !important;
}

#aiVoiceWrapper,
#manualWrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "voice translationLang"
    "pause translationCheckbox ";
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

#aiVoice {
  width: 100%;
}

#aiVoiceWrapper select,
#aiVoiceWrapper label {
  display: block;
  width: 100%;
  position: relative;
}

#aiVoiceWrapper > span,
#manualVoiceWrapper > span {
  grid-area: voice;
}

.pause-settings {
  grid-area: pause;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#aiVoiceWrapper label[for="includeTranslation"],
#manualWrapper label[for="includeTranslationManual"] {
  grid-area: translationCheckbox;
}

#translationLangWrapper,
#translationLangManualWrapper {
  grid-area: translationLang;
}

button .pro-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 1;
}

#tabs button {
  position: relative;
}

#tabs .pro-badge {
  position: absolute;
  top: 7px;
  right: -21px;
  font-size: 0.6rem;
  padding: 2px 5px;
  border-radius: 4px;
  background-color: var(--ls-aquagreen-700);
  color: white;
  font-weight: bold;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  height: fit-content;
}

label[for="includeTranslation"],
label[for="includeTranslationManual"] {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  display: inline;
}

.pause-slider {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pause-slider__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.pause-slider__status {
  font-weight: 600;
  color: var(--ls-navyblue-800);
}

.pause-slider input[type="range"] {
  width: 100%;
  accent-color: var(--ls-aquagreen-600);
  cursor: pointer;
  color: var(--ls-white);
  --pause-slider-track: var(--ls-white);
  --pause-slider-active: var(--ls-aquagreen-600);
  --pause-slider-fill: 0%;
}

.pause-slider input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    var(--pause-slider-active) 0%,
    var(--pause-slider-active) var(--pause-slider-fill),
    var(--pause-slider-track) var(--pause-slider-fill),
    var(--pause-slider-track) 100%
  );
  height: 6px;
  border-radius: 999px;
}

.pause-slider input[type="range"]::-moz-range-track {
  background: linear-gradient(
    to right,
    var(--pause-slider-active) 0%,
    var(--pause-slider-active) var(--pause-slider-fill),
    var(--pause-slider-track) var(--pause-slider-fill),
    var(--pause-slider-track) 100%
  );
  height: 6px;
  border-radius: 999px;
}

.pause-slider input[type="range"]::-ms-track {
  background: linear-gradient(
    to right,
    var(--pause-slider-active) 0%,
    var(--pause-slider-active) var(--pause-slider-fill),
    var(--pause-slider-track) var(--pause-slider-fill),
    var(--pause-slider-track) 100%
  );
  border-color: transparent;
  color: transparent;
  height: 6px;
}

.pause-slider input[type="range"]::-ms-fill-lower,
.pause-slider input[type="range"]::-ms-fill-upper {
  background: var(--pause-slider-track);
  border-radius: 999px;
}

.pause-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: var(--ls-aquagreen-600);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 3px solid #fff;
  box-shadow: 0 2px 4px rgba(7, 28, 62, 0.2);
}

.pause-slider input[type="range"]::-moz-range-thumb {
  background: var(--ls-aquagreen-600);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  box-shadow: 0 2px 4px rgba(7, 28, 62, 0.2);
}

.pause-slider input[type="range"]::-ms-thumb {
  background: var(--ls-aquagreen-600);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  box-shadow: 0 2px 4px rgba(7, 28, 62, 0.2);
}

.pause-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.pause-slider-labels span {
  flex: 1;
  text-align: center;
}

.pause-slider-labels span.active {
  font-weight: 600;
  color: var(--ls-navyblue-800);
  opacity: 1;
}

.pause-slider.is-disabled {
  opacity: 0.4;
}

.pause-slider.is-disabled input[type="range"] {
  cursor: not-allowed;
}

/* --- REMOVED select option:disabled (move to common.css if needed) --- */

.pro-header-badge {
  position: relative;
  bottom: 1rem;
  left: -6rem;
  background-color: var(--ls-aquagreen-700);
  color: #fff;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.legal-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  line-height: 1.7;
  color: var(--ls-navyblue-900);
}

.legal-page h1 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin-bottom: 1rem;
  color: var(--ls-navyblue-950);
}

.legal-page .legal-intro {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--ls-navyblue-800);
}

.legal-section {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--ls-navyblue-100);
  background: #fff;
  box-shadow: 0 5px 20px rgba(7, 28, 62, 0.05);
}

.legal-section h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--ls-navyblue-900);
}

.legal-section p {
  margin: 0.5rem 0 1rem;
}

.legal-section ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.legal-section li {
  margin-bottom: 0.4rem;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--ls-navyblue-600);
}

.hidden {
  display: none !important;
}

body.player-view.left-collapsed .left-pane {
  max-width: 0;
  flex-basis: 0;
}

body.player-view .right-pane {
  margin: 0 auto;
  display: flex;
  gap: 1rem;
}

.player-area {
  flex: 1;
  display: grid;
  gap: 1rem;
  justify-items: start;
}

body.player-view #postVideoActions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

body.player-view #postVideoActions > :is(button, a) {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

body.player-view .tab-buttons {
  display: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 560px) {
  body.player-view #postVideoActions {
    flex-wrap: wrap;
  }
  body.player-view #postVideoActions > :is(button, a) {
    flex: 1 1 12rem;
  }
}

.right-pane.lib-grid {
  display: grid !important;
  max-width: 90% !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem 3rem !important;
}

.right-pane.lib-grid #backToLibraryLink {
  grid-column: 1 / -1;
  grid-row: 1;
}

.right-pane.lib-grid #playerArea {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.right-pane.lib-grid #rightOutput {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

#backToLibraryLink {
  display: inline-flex;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted, #555);
  text-decoration: none;
}

#backToLibraryLink:hover {
  color: var(--accent-color, #0a7cff);
  text-decoration: underline;
}

.vocab-autosave-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.2s ease;
  background: var(--ls-aquagreen-50);
  color: var(--ls-aquagreen-900);
  border: 1px solid var(--ls-aquagreen-200);
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 9999;
}

.vocab-autosave-toast.error {
  background: var(--ls-coralred-50);
  color: var(--ls-coralred-800);
  border-color: var(--ls-coralred-100);
}

.vocab-autosave-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.right-pane.with-vocab {
  gap: var(--gap-2);
  align-items: flex-start;
  align-content: flex-start;
  overflow: scroll;
}

body.left-collapsed .right-pane.with-vocab {
  flex-direction: row;
}

body:not(.left-collapsed) .right-pane.with-vocab {
  flex-direction: column;
}

body.left-collapsed .right-pane.with-vocab #playerArea {
  flex: 1 1 60%;
  min-width: 0;
}

body.left-collapsed .right-pane.with-vocab .vocab-panel {
  flex: 1 1 auto;
  min-width: 50%;
}

body:not(.left-collapsed) .right-pane.with-vocab #playerArea,
body:not(.left-collapsed) .right-pane.with-vocab .vocab-panel {
  flex: 0 0 auto;
  width: 100%;
}

.right-pane.with-vocab #rightOutput {
  grid-column: auto;
}

body:not(.left-collapsed) .right-pane.with-vocab {
  overflow-y: auto;
  overscroll-behavior: contain;
}

body:not(.left-collapsed) .right-pane.with-vocab #playerArea {
  flex: 0 0 auto;
}

body:not(.left-collapsed) .right-pane.with-vocab .vocab-panel {
  flex: 1 1 auto;
  overflow-y: auto;
}

.player-area video {
  width: 100%;
  height: auto;
  max-width: 100%;
}

html[data-hydrate="true"] .left-pane {
  max-width: 0 !important;
  flex: 0 0 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

html[data-hydrate="true"] .right-pane {
  flex: 1 1 auto;
}

@media (max-width: 960px) {
  .logo-link {
    background: url("/static/img/ls_icon.svg") no-repeat center;
    background-size: contain;
    margin-right: 0;
  }

  h1 {
    margin: 0;
  }

  .main-container {
    flex-direction: column;
    height: auto;
  }

  .left-pane,
  .right-pane {
    height: auto;
    min-width: unset;
  }
}

.share-login-card {
  width: 33% !important;
  max-height: 88vh !important;
  padding: 3rem !important;
}

.share-login-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: center;
  gap: 2rem;
}

.share-login-illustration {
  width: 15rem;
  height: auto;
  margin: 0 auto;
}

body.pending-share #rightOutput,
body.pending-share .empty-state,
body.pending-share [data-empty] {
  display: none !important;
}

.share-login-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
