/* LevelUp Kompendium V2.4 — isolated trainer module */
:root {
  --lu-cmp-bg: #090a0d;
  --lu-cmp-panel: #111217;
  --lu-cmp-panel-soft: #15161c;
  --lu-cmp-line: rgba(255, 255, 255, 0.075);
  --lu-cmp-line-strong: rgba(255, 255, 255, 0.12);
  --lu-cmp-text: #f3f3f5;
  --lu-cmp-muted: #9296a1;
  --lu-cmp-gold: #d5b36b;
  --lu-cmp-gold-bright: #f0d48d;
  --lu-cmp-red: #f28484;
  --lu-cmp-green: #78c99e;
}

html.lu-compendium-v2-open main.mainContent {
  position: relative;
}

html.lu-compendium-v2-open main.mainContent > .moduleView {
  visibility: hidden !important;
  pointer-events: none !important;
}

#luCompendiumV2,
#luCompendiumV2 * {
  box-sizing: border-box;
}

#luCompendiumV2 {
  position: absolute;
  z-index: 24;
  inset: 117px 26px 20px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: var(--lu-cmp-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border: 1px solid var(--lu-cmp-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 78% -10%, rgba(213, 179, 107, 0.08), transparent 32%),
    var(--lu-cmp-bg);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

#luCompendiumV2 button,
#luCompendiumV2 input,
#luCompendiumV2 textarea,
#luCompendiumV2 select {
  font: inherit;
}

#luCompendiumV2 button {
  border: 0;
}

#luCompendiumV2 button:focus-visible,
#luCompendiumV2 input:focus-visible,
#luCompendiumV2 textarea:focus-visible,
#luCompendiumV2 select:focus-visible,
#luCompendiumV2 [contenteditable="true"]:focus-visible {
  outline: 2px solid rgba(213, 179, 107, 0.62);
  outline-offset: 2px;
}

.lu-cmp-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
}

.lu-cmp-folders {
  min-width: 0;
  min-height: 0;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 35%),
    #0d0e12;
  border-right: 1px solid var(--lu-cmp-line);
}

.lu-cmp-brand {
  min-height: 118px;
  padding: 3px 8px 11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--lu-cmp-line);
}

.lu-cmp-brand img {
  display: block;
  width: min(100%, 112px);
  max-height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
}

.lu-cmp-folder-head {
  padding: 20px 6px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lu-cmp-folder-head > div {
  display: grid;
  gap: 3px;
}

.lu-cmp-folder-head span,
.lu-cmp-content-title small,
.lu-cmp-modal header small {
  color: var(--lu-cmp-gold);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.lu-cmp-folder-head strong {
  font-size: 16px;
  letter-spacing: -0.025em;
}

.lu-cmp-folder-head > button {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  color: #17130b;
  background: var(--lu-cmp-gold);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 500;
  transition: transform 150ms ease, background 150ms ease;
}

.lu-cmp-folder-head > button:hover {
  background: var(--lu-cmp-gold-bright);
  transform: translateY(-1px);
}

.lu-cmp-search {
  height: 39px;
  margin: 0 5px 12px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.026);
  border: 1px solid var(--lu-cmp-line);
  border-radius: 11px;
}

.lu-cmp-search:focus-within {
  border-color: rgba(213, 179, 107, 0.35);
  background: rgba(255, 255, 255, 0.038);
}

.lu-cmp-search svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #777c87;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.lu-cmp-search input {
  width: 100%;
  min-width: 0;
  color: var(--lu-cmp-text);
  background: transparent;
  border: 0;
  outline: 0 !important;
  font-size: 11px;
}

.lu-cmp-search input::placeholder {
  color: #626670;
}

.lu-cmp-folder-list {
  min-height: 0;
  padding: 0 3px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(213, 179, 107, 0.25) transparent;
}

.lu-cmp-folder-row {
  min-height: 57px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background 140ms ease, border-color 140ms ease;
}

.lu-cmp-folder-row:hover {
  background: rgba(255, 255, 255, 0.027);
}

.lu-cmp-folder-row.active {
  background: linear-gradient(90deg, rgba(213, 179, 107, 0.12), rgba(213, 179, 107, 0.025));
  border-color: rgba(213, 179, 107, 0.16);
}

.lu-cmp-folder-main {
  min-width: 0;
  height: 55px;
  padding: 0 6px 0 8px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.lu-cmp-folder-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--lu-cmp-line);
  border-radius: 10px;
  font-size: 16px;
}

.lu-cmp-folder-row.active .lu-cmp-folder-icon {
  background: rgba(213, 179, 107, 0.11);
  border-color: rgba(213, 179, 107, 0.18);
}

.lu-cmp-folder-main > span:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lu-cmp-folder-main strong {
  overflow: hidden;
  color: #dadbe0;
  font-size: 13px;
  font-weight: 730;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lu-cmp-folder-row.active .lu-cmp-folder-main strong {
  color: #f3dfad;
}

.lu-cmp-folder-main small {
  color: #727681;
  font-size: 10.5px;
}

.lu-cmp-folder-actions {
  width: 53px;
  display: flex;
  gap: 2px;
  overflow: visible;
  opacity: 1;
}

.lu-cmp-folder-actions button {
  width: 24px;
  height: 28px;
  color: #898e98;
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
}

.lu-cmp-folder-actions button:hover {
  color: #f1f1f3;
  background: rgba(255, 255, 255, 0.06);
}

.lu-cmp-folder-actions button:last-child:hover {
  color: #ffabab;
  background: rgba(242, 132, 132, 0.08);
}

.lu-cmp-fixed-section {
  margin: 10px 3px 0;
  padding: 12px 0 0;
  display: grid;
  border-top: 1px solid rgba(213, 179, 107, 0.18);
}

.lu-cmp-training-info-button {
  min-height: 58px;
  padding: 7px 7px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #aeb1b9;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--lu-cmp-line) !important;
  border-radius: 12px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.lu-cmp-training-info-button:hover,
.lu-cmp-training-info-button.active {
  color: #f0dcaa;
  background: linear-gradient(90deg, rgba(213, 179, 107, 0.12), rgba(213, 179, 107, 0.025));
  border-color: rgba(213, 179, 107, 0.22) !important;
}

.lu-cmp-training-info-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #17130b;
  background: var(--lu-cmp-gold);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
}

.lu-cmp-training-info-button > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lu-cmp-training-info-button strong {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lu-cmp-training-info-button small {
  overflow: hidden;
  color: #747985;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lu-cmp-training-info-button > b {
  color: #6e727c;
  font-size: 18px;
  font-weight: 500;
}

.lu-cmp-folder-foot {
  margin: 12px 5px 0;
  padding: 13px 4px 2px;
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--lu-cmp-line);
}

.lu-cmp-folder-foot small {
  color: #656974;
  font-size: 8px;
}

.lu-cmp-save-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9296a0;
  font-size: 9px;
  font-weight: 700;
}

.lu-cmp-save-status i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: #777b85;
  border-radius: 50%;
}

.lu-cmp-save-status.saved i { background: var(--lu-cmp-green); }
.lu-cmp-save-status.saving i { background: var(--lu-cmp-gold); animation: luCmpPulse 0.9s infinite; }
.lu-cmp-save-status.dirty i { background: #e3b96a; }
.lu-cmp-save-status.error { color: #efa0a0; }
.lu-cmp-save-status.error i { background: var(--lu-cmp-red); }

@keyframes luCmpPulse {
  50% { opacity: 0.35; transform: scale(0.8); }
}

.lu-cmp-side-empty {
  min-height: 145px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #747985;
  text-align: center;
}

.lu-cmp-side-empty > span { font-size: 22px; filter: grayscale(0.25); }
.lu-cmp-side-empty strong { color: #a1a5af; font-size: 11px; }
.lu-cmp-side-empty small { font-size: 9px; }

.lu-cmp-workspace {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lu-cmp-loading,
.lu-cmp-empty {
  height: 100%;
  padding: 32px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.lu-cmp-loading > span {
  width: 35px;
  height: 35px;
  margin-bottom: 8px;
  border: 2px solid rgba(213, 179, 107, 0.16);
  border-top-color: var(--lu-cmp-gold);
  border-radius: 50%;
  animation: luCmpSpin 0.8s linear infinite;
}

@keyframes luCmpSpin { to { transform: rotate(360deg); } }

.lu-cmp-loading strong { font-size: 13px; }
.lu-cmp-loading small { margin-top: 5px; color: var(--lu-cmp-muted); font-size: 9px; }

.lu-cmp-empty-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
  display: grid;
  place-items: center;
  background: rgba(213, 179, 107, 0.075);
  border: 1px solid rgba(213, 179, 107, 0.13);
  border-radius: 20px;
  font-size: 28px;
}

.lu-cmp-empty > small {
  color: var(--lu-cmp-gold);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.17em;
}

.lu-cmp-empty h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 2.2vw, 34px);
  letter-spacing: -0.045em;
}

.lu-cmp-empty p {
  max-width: 500px;
  margin: 12px 0 22px;
  color: var(--lu-cmp-muted);
  font-size: 12px;
  line-height: 1.65;
}

.lu-cmp-empty button,
.lu-cmp-head-actions .primary,
.lu-cmp-modal footer .primary,
.lu-cmp-editor-foot .publish {
  min-height: 40px;
  padding: 0 16px;
  color: #17130b;
  background: var(--lu-cmp-gold);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease;
}

.lu-cmp-empty button:hover,
.lu-cmp-head-actions .primary:hover,
.lu-cmp-modal footer .primary:hover,
.lu-cmp-editor-foot .publish:hover {
  background: var(--lu-cmp-gold-bright);
  transform: translateY(-1px);
}

.lu-cmp-folder-view {
  min-height: 0;
  height: 100%;
  padding: 21px 22px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lu-cmp-content-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.lu-cmp-content-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lu-cmp-big-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: rgba(213, 179, 107, 0.085);
  border: 1px solid rgba(213, 179, 107, 0.14);
  border-radius: 15px;
  font-size: 24px;
}

.lu-cmp-content-title > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lu-cmp-content-title h2 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(20px, 2vw, 29px);
  letter-spacing: -0.045em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lu-cmp-content-title p {
  margin: 0;
  overflow: hidden;
  color: var(--lu-cmp-muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lu-cmp-head-actions,
.lu-cmp-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lu-cmp-head-actions .secondary,
.lu-cmp-editor-actions .secondary {
  min-height: 40px;
  padding: 0 13px;
  color: #b7bac2;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid var(--lu-cmp-line);
  border-radius: 11px;
  font-size: 10px;
  font-weight: 700;
}

.lu-cmp-head-actions .secondary:hover,
.lu-cmp-editor-actions .secondary:hover {
  color: #f0f0f2;
  border-color: var(--lu-cmp-line-strong);
}

.lu-cmp-head-actions .danger {
  min-height: 40px;
  padding: 0 13px;
  color: #e29a9a;
  background: rgba(242, 132, 132, 0.055);
  border: 1px solid rgba(242, 132, 132, 0.13);
  border-radius: 11px;
  font-size: 10px;
  font-weight: 750;
}

.lu-cmp-head-actions .danger:hover {
  color: #ffc0c0;
  background: rgba(242, 132, 132, 0.1);
  border-color: rgba(242, 132, 132, 0.23);
}

.lu-cmp-entry-summary {
  min-height: 53px;
  margin-top: 17px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: #767b85;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--lu-cmp-line);
  border-radius: 13px;
  font-size: 9px;
}

.lu-cmp-entry-summary span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.lu-cmp-entry-summary b {
  color: #d8d9dd;
  font-size: 13px;
}

.lu-cmp-entry-grid {
  min-height: 0;
  padding: 16px 2px 3px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(213, 179, 107, 0.23) transparent;
}

.lu-cmp-entry-card,
.lu-cmp-new-card {
  min-width: 0;
  min-height: 178px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  color: inherit;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--lu-cmp-line) !important;
  border-radius: 15px;
  text-align: left;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.lu-cmp-entry-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(213, 179, 107, 0.19) !important;
  transform: translateY(-2px);
}

.lu-cmp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lu-cmp-entry-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--lu-cmp-gold-bright);
  background: rgba(213, 179, 107, 0.09);
  border-radius: 9px;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
}

.lu-cmp-publish-pill,
.lu-cmp-publish-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #858a94;
  font-size: 8px;
  font-weight: 750;
}

.lu-cmp-publish-pill i,
.lu-cmp-publish-state i {
  width: 6px;
  height: 6px;
  background: #737781;
  border-radius: 50%;
}

.lu-cmp-publish-pill.published,
.lu-cmp-publish-state.published { color: #9ad9b6; }
.lu-cmp-publish-pill.published i,
.lu-cmp-publish-state.published i { background: var(--lu-cmp-green); }

.lu-cmp-entry-card > strong {
  margin-top: 15px;
  overflow: hidden;
  color: #ececef;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lu-cmp-entry-card > p {
  margin: 8px 0 14px;
  display: -webkit-box;
  overflow: hidden;
  color: #818690;
  font-size: 9.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.lu-cmp-entry-card footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #686d76;
  font-size: 8px;
}

.lu-cmp-entry-card footer b {
  color: #b9a16e;
  font-size: 8px;
}

.lu-cmp-new-card {
  align-items: center;
  justify-content: center;
  color: #858a94;
  background: transparent;
  border-style: dashed !important;
  text-align: center;
}

.lu-cmp-new-card:hover {
  color: #d9c696;
  background: rgba(213, 179, 107, 0.025);
  border-color: rgba(213, 179, 107, 0.24) !important;
}

.lu-cmp-new-card > span {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  display: grid;
  place-items: center;
  background: rgba(213, 179, 107, 0.07);
  border-radius: 11px;
  font-size: 20px;
}

.lu-cmp-new-card strong { color: #b4b7bf; font-size: 11px; }
.lu-cmp-new-card small { margin-top: 5px; color: #686d77; font-size: 8px; }

.lu-cmp-editor-view {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 15%, rgba(213, 179, 107, 0.035), transparent 38%),
    rgba(255, 255, 255, 0.006);
}

.lu-cmp-editor-view > .lu-cmp-editor-head,
.lu-cmp-editor-view > .lu-cmp-title-input,
.lu-cmp-editor-view > .lu-cmp-toolbar,
.lu-cmp-editor-view > .lu-cmp-paper-wrap,
.lu-cmp-editor-view > .lu-cmp-editor-foot {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.lu-cmp-editor-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lu-cmp-breadcrumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #747983;
  font-size: 11.5px;
}

.lu-cmp-breadcrumb button {
  width: 32px;
  height: 32px;
  margin-right: 2px;
  color: #a3a7b0;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--lu-cmp-line);
  border-radius: 9px;
}

.lu-cmp-breadcrumb button:hover { color: white; }
.lu-cmp-breadcrumb strong { overflow: hidden; color: #bbbfc7; white-space: nowrap; text-overflow: ellipsis; }
.lu-cmp-breadcrumb i { color: #4e5159; font-style: normal; }

.lu-cmp-title-input {
  width: 100%;
  height: 50px;
  padding: 0 6px;
  color: #f1f1f3;
  background: transparent;
  border: 0;
  outline: 0 !important;
  font-size: clamp(21px, 2vw, 29px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.lu-cmp-title-input::placeholder { color: #555963; }

.lu-cmp-title-input.fixed {
  color: #f0d99f;
  cursor: default;
}

.lu-cmp-toolbar {
  min-height: 47px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  background: #111217;
  border: 1px solid var(--lu-cmp-line);
  border-radius: 14px 14px 0 0;
  scrollbar-width: none;
}

.lu-cmp-toolbar::-webkit-scrollbar { display: none; }

.lu-cmp-toolbar > i {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  flex: 0 0 auto;
  background: var(--lu-cmp-line);
}

.lu-cmp-toolbar button,
.lu-cmp-toolbar select {
  height: 33px;
  flex: 0 0 auto;
  color: #b8bbc3;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11px;
}

.lu-cmp-toolbar button {
  min-width: 33px;
  padding: 0 8px;
}

.lu-cmp-toolbar button:hover,
.lu-cmp-toolbar select:hover {
  color: #f1f1f3;
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--lu-cmp-line);
}

.lu-cmp-toolbar select {
  min-width: 76px;
  padding: 0 7px;
  outline: 0;
}

.lu-cmp-toolbar select:first-child { min-width: 112px; }
.lu-cmp-toolbar option { color: #efeff1; background: #17181d; }

.lu-cmp-paper-wrap {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #f8f8f6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 0;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.lu-cmp-paper-scroll {
  width: 100%;
  height: 100%;
  padding: 24px 30px 88px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.lu-cmp-document-logo {
  width: 122px;
  height: 106px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  pointer-events: none;
  user-select: none;
}

.lu-cmp-document-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lu-cmp-paper-brand {
  position: absolute;
  z-index: 1;
  right: 22px;
  bottom: 17px;
  width: 62px;
  height: 56px;
  object-fit: contain;
  opacity: 0.08;
  filter: grayscale(1);
  pointer-events: none;
  user-select: none;
}

.lu-cmp-editor {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: calc(100% - 124px);
  height: auto;
  padding: 0;
  overflow: visible;
  color: #15161a;
  outline: 0 !important;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.68;
}

.lu-cmp-editor:empty::before {
  color: #a4a4a1;
  content: attr(data-placeholder);
  pointer-events: none;
}

.lu-cmp-editor p,
.lu-cmp-editor div { margin: 0 0 0.75em; }
.lu-cmp-editor h2 { margin: 0 0 0.55em; font-size: 26px; }
.lu-cmp-editor h3 { margin: 0 0 0.55em; font-size: 21px; }
.lu-cmp-editor ul,
.lu-cmp-editor ol { padding-left: 1.65em; }
.lu-cmp-editor a {
  color: #8a641b;
  background: rgba(213, 179, 107, 0.12);
  border-radius: 4px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  cursor: pointer;
}
.lu-cmp-editor blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid #d5b36b; }

.lu-cmp-editor-foot {
  min-height: 54px;
  padding-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lu-cmp-editor-foot > div:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lu-cmp-editor-foot > div:first-child small {
  overflow: hidden;
  color: #686d77;
  font-size: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lu-cmp-editor-foot > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lu-cmp-editor-foot .danger-text {
  min-height: 38px;
  padding: 0 12px;
  color: #eda0a0;
  background: rgba(242, 132, 132, 0.055);
  border: 1px solid rgba(242, 132, 132, 0.13) !important;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
}

.lu-cmp-editor-foot .danger-text:hover { color: #ffc1c1; background: rgba(242, 132, 132, 0.11); }

.lu-cmp-modal-layer {
  position: fixed;
  z-index: 100200;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(3, 4, 6, 0.72);
  backdrop-filter: blur(8px);
  animation: luCmpFade 150ms ease both;
}

@keyframes luCmpFade { from { opacity: 0; } }

.lu-cmp-modal {
  width: min(480px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  background: #121318;
  border: 1px solid var(--lu-cmp-line-strong);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: luCmpModalIn 180ms ease both;
}

@keyframes luCmpModalIn { from { opacity: 0; transform: translateY(8px) scale(0.985); } }

.lu-cmp-modal header {
  padding: 19px 20px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--lu-cmp-line);
}

.lu-cmp-modal header > div { display: grid; gap: 4px; }
.lu-cmp-modal h3 { margin: 0; font-size: 20px; letter-spacing: -0.035em; }
.lu-cmp-modal header p { margin: 3px 0 0; color: var(--lu-cmp-muted); font-size: 9px; line-height: 1.5; }

.lu-cmp-modal header > button {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  color: #92969f;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 9px;
  font-size: 18px;
}

.lu-cmp-modal-body {
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}

.lu-cmp-field,
.lu-cmp-icon-field {
  display: grid;
  gap: 7px;
}

.lu-cmp-field > span,
.lu-cmp-icon-field > span {
  color: #a6aab3;
  font-size: 9px;
  font-weight: 720;
}

.lu-cmp-field input,
.lu-cmp-field textarea {
  width: 100%;
  color: #efeff1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lu-cmp-line);
  border-radius: 10px;
  outline: 0;
  font-size: 11px;
}

.lu-cmp-field input { height: 42px; padding: 0 12px; }
.lu-cmp-field textarea { padding: 11px 12px; resize: vertical; line-height: 1.5; }
.lu-cmp-field input:focus,
.lu-cmp-field textarea:focus { border-color: rgba(213, 179, 107, 0.34); }

.lu-cmp-icon-field > div {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}

.lu-cmp-icon-field button {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--lu-cmp-line) !important;
  border-radius: 9px;
  font-size: 16px;
}

.lu-cmp-icon-field button:hover,
.lu-cmp-icon-field button.active {
  background: rgba(213, 179, 107, 0.1);
  border-color: rgba(213, 179, 107, 0.3) !important;
}

.lu-cmp-warning {
  min-height: 68px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(242, 132, 132, 0.055);
  border: 1px solid rgba(242, 132, 132, 0.12);
  border-radius: 12px;
}

.lu-cmp-warning span {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #ffb0b0;
  background: rgba(242, 132, 132, 0.1);
  border-radius: 10px;
  font-weight: 850;
}

.lu-cmp-warning p { margin: 0; color: #bdc0c7; font-size: 10px; line-height: 1.5; }

.lu-cmp-modal footer {
  padding: 13px 20px 17px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.lu-cmp-modal footer button {
  min-height: 39px;
  padding: 0 14px;
  color: #aeb1b9;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--lu-cmp-line);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 750;
}

.lu-cmp-modal footer .danger {
  color: #ffd1d1;
  background: rgba(215, 78, 78, 0.16);
  border-color: rgba(242, 132, 132, 0.22);
}

.lu-cmp-modal footer button:disabled { opacity: 0.55; pointer-events: none; }

.lu-cmp-toasts {
  position: fixed;
  z-index: 100300;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.lu-cmp-toast {
  max-width: 360px;
  padding: 11px 14px;
  color: #dfe1e5;
  background: #181a20;
  border: 1px solid var(--lu-cmp-line-strong);
  border-radius: 11px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.35);
  font-size: 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.lu-cmp-toast.show { opacity: 1; transform: none; }
.lu-cmp-toast.error { color: #ffc5c5; border-color: rgba(242, 132, 132, 0.2); }

@media (max-width: 1260px) {
  .lu-cmp-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .lu-cmp-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  #luCompendiumV2 { inset: 112px 18px 16px; }
  .lu-cmp-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .lu-cmp-entry-grid { grid-template-columns: 1fr; }
  .lu-cmp-entry-card { min-height: 155px; }
  .lu-cmp-entry-summary { gap: 13px; }
  .lu-cmp-editor-actions [data-save-status] { display: none; }
  .lu-cmp-toolbar { justify-content: flex-start; }
}

@media (max-width: 760px) {
  #luCompendiumV2 { inset: 96px 8px 8px; border-radius: 15px; }
  .lu-cmp-shell { grid-template-columns: 1fr; grid-template-rows: 252px minmax(0, 1fr); }
  .lu-cmp-folders { padding: 10px; border-right: 0; border-bottom: 1px solid var(--lu-cmp-line); }
  .lu-cmp-brand { display: none; }
  .lu-cmp-folder-head { padding: 2px 3px 8px; }
  .lu-cmp-folder-head > div { display: flex; align-items: baseline; gap: 8px; }
  .lu-cmp-search { margin-bottom: 8px; }
  .lu-cmp-folder-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .lu-cmp-folder-row { min-width: 180px; }
  .lu-cmp-fixed-section { margin-top: 7px; padding-top: 7px; }
  .lu-cmp-training-info-button { min-height: 46px; }
  .lu-cmp-folder-foot { display: none; }
  .lu-cmp-folder-view { padding: 15px 13px 12px; }
  .lu-cmp-content-head { align-items: flex-start; }
  .lu-cmp-content-title p { display: none; }
  .lu-cmp-head-actions .secondary { display: none; }
  .lu-cmp-head-actions .danger { display: none; }
  .lu-cmp-entry-summary { overflow-x: auto; white-space: nowrap; }
  .lu-cmp-editor-view { padding: 8px; }
  .lu-cmp-editor-head { min-height: 35px; }
  .lu-cmp-editor-actions .secondary { min-height: 33px; }
  .lu-cmp-title-input { height: 44px; }
  .lu-cmp-paper-scroll { padding: 18px 20px 68px; }
  .lu-cmp-document-logo { width: 100px; height: 88px; margin-bottom: 14px; }
  .lu-cmp-editor-foot > div:first-child small { display: none; }
  .lu-cmp-icon-field > div { grid-template-columns: repeat(6, 1fr); }
}
