.lms-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
body:has(.lms) { overflow: hidden; height: 100dvh; margin: 0; }
.lms {
  display: grid;
  grid-template-columns: 280px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #f4f1ea;
  color: #161410;
  font-family: "Segoe UI", system-ui, sans-serif;
}
.lms-side {
  background: #161410;
  color: #f4f1ea;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}
.lms-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.lms-brand img { height: 72px; width: auto; }
.lms-brand strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.lms-brand em { display: block; font-size: 12px; font-style: normal; color: #c4b89a; }
.lms-safehaul-blurb {
  margin-top: 20mm;
  color: #d8d0c2;
  font-size: 11px;
  line-height: 1.45;
}
.lms-safehaul-blurb strong {
  display: block;
  color: #e8d9a0;
  margin-bottom: 8px;
  font-size: 13px;
}
.lms-safehaul-blurb em { font-style: italic; display: block; }
.lms-main { padding: 24px 28px 40px; overflow: auto; }
.lms-editor { max-width: 720px; }
.lms-editor-wrap {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) 340px;
  gap: 24px;
  align-items: start;
  max-width: 1120px;
}
.lms-editor-wrap .lms-editor { max-width: none; }
.course-banner {
  background: #161410;
  color: #f4f1ea;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.course-banner-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a227;
  font-weight: 800;
}
.course-banner h1 { color: #fff; margin: 4px 0 0; font-size: 22px; }
.course-banner .muted { color: #c4b89a; margin: 4px 0 0; }
.course-switch { max-width: 320px; margin: 10px 0 0; color: #e8d9a0; }
.lms-table.compact th, .lms-table.compact td {
  padding: 2px 8px;
  line-height: 1.25;
}
.pager {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  font-size: 12px; font-weight: 700; margin: 10px 0;
}
.pager select { padding: 4px 8px; border-radius: 8px; border: 1px solid #c9c2b4; }
.xfer {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  gap: 10px;
  align-items: stretch;
  max-width: 920px;
  margin: 8px 0 16px;
}
.xfer-col {
  border: 1px solid #c9c2b4;
  border-radius: 12px;
  background: #fff;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.xfer-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 10px; border-bottom: 1px solid #eee8dc; font-size: 12px; font-weight: 800;
}
.xfer-search { flex: 1; min-width: 0; padding: 4px 8px; border: 1px solid #c9c2b4; border-radius: 8px; font-weight: 600; }
.xfer-list { overflow: auto; max-height: 320px; padding: 4px 0; }
.xfer-item {
  display: block; width: 100%; text-align: left;
  padding: 6px 10px; font-size: 13px; font-weight: 600;
  background: transparent;
  border: none !important;
  border-radius: 0;
  box-shadow: none;
  outline: none;
}
.xfer-item:hover { background: #f7f3ea; }
.xfer-item.on { background: #161410; color: #f4f1ea; }
.xfer-btns { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.xfer-btns .lms-btn { min-width: 44px; justify-content: center; }
.img-drop img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #111;
  border-radius: 8px;
  display: block;
  margin-bottom: 8px;
}
.block-row.image-row { grid-template-columns: 140px 1fr; }
.lms-saved.show { display: inline; }
.lms-wide { max-width: 980px; }
.lms-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.lms-toolbar h1, .lms-editor h1, .lms-wide h1 { font-size: 26px; margin: 0 0 14px; }
.field input, .field select, .field textarea { max-width: 100%; width: 100%; box-sizing: border-box; }
.block-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; margin: 8px 0; align-items: start; }
.block-row textarea { min-height: 88px; }
.save-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.lms-saved { font-size: 13px; font-weight: 800; color: #15803d; min-height: 1em; }
.pick-filter { width: 100%; max-width: 420px; padding: 8px 10px; border: 1px solid #c9c2b4; border-radius: 10px; margin-bottom: 8px; }
.pick-list {
  max-width: 420px;
  max-height: 240px;
  overflow: auto;
  border: 1px solid #c9c2b4;
  border-radius: 10px;
  background: #fff;
}
.pick-list label {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 10px; font-weight: 600; font-size: 13px; margin: 0;
}
.pick-list label:hover { background: #f7f3ea; }
.pick-count { font-size: 12px; color: #6b6458; margin-top: 6px; }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  align-items: end; margin-bottom: 14px;
  max-width: 980px;
}
.filter-bar label { font-size: 11px; font-weight: 800; display: flex; flex-direction: column; gap: 4px; }
.filter-bar input, .filter-bar select {
  padding: 6px 8px; border: 1px solid #c9c2b4; border-radius: 8px; font-weight: 600;
}
.filter-bar .score-in { width: 4.5rem; }
.q-card textarea { width: 100%; box-sizing: border-box; }
.opt-choice input[type="text"], .opt-choice input:not([type="radio"]) { flex: 1; max-width: 360px; }
.lms-side nav { display: flex; flex-direction: column; gap: 4px; }
.lms-side nav button {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  color: #d8d0c2; font-size: 13px; font-weight: 600; text-align: left;
}
.lms-side nav button.on, .lms-side nav button:hover { background: #2a261f; color: #fff; }
.lms-driver-link {
  margin-top: auto; color: #c9a227; font-size: 12px; font-weight: 700; padding: 8px 12px;
}
.site-footer-lms {
  position: static;
  transform: none;
  left: auto;
  max-width: none;
  background: #161410;
  color: #c4b89a;
  padding: 14px 24px 16px;
  font-size: 11px;
  letter-spacing: 0.02em;
  border-top: 0;
  z-index: auto;
}
.site-footer-lms p { margin: 2px 0; }
.lms-main { padding: 24px 28px 40px; overflow: auto; }
.lms-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; align-items: flex-start; }
.lms-top h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; margin: 0; }
.lms-top p { margin: 4px 0 0; color: #5c564c; font-size: 13px; }
.lms-top-actions { display: flex; gap: 8px; align-items: center; }
.lms-btn { cursor: pointer; }
.lms .hidden { display: none !important; }
.new-row { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; max-width: 720px; }
.new-row input { flex: 1; padding: 8px 10px; border: 1px solid #c9c2b4; border-radius: 8px; }
.lms-btn.primary { background: #161410; color: #f4f1ea; }
.lms-btn.ghost { border: 1px solid #c9c2b4; background: #fff; }
.lms-btn.sm { padding: 6px 10px; font-size: 12px; }
.lms-saved { font-size: 12px; font-weight: 700; color: #15803d; }
.lms-card {
  background: #fff; border: 1px solid #ddd6c8; border-radius: 16px; padding: 16px; margin-bottom: 14px;
}
.lms-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lms-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b5500; padding: 8px; }
.lms-table td { padding: 10px 8px; border-top: 1px solid #eee8dc; vertical-align: top; }
.lms-table tr.sel { background: #f7f3ea; }
.linkish { font-weight: 700; color: #161410; }
.lms .muted { color: #6b6458; font-size: 12px; margin-top: 4px; }
.pill { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid #c9c2b4; }
.pill.published { color: #15803d; border-color: #15803d; }
.pill.draft { color: #92400e; border-color: #d97706; }
.pill.archived { color: #6b6458; }
.icon-btn { padding: 6px; color: #6b6458; }
.lms-course-pick { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.lms-course-pick label { font-size: 12px; font-weight: 700; }
.lms-dates { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-top: 4px; }
.field.date-field { width: auto; }
.field.date-field input[type="date"] {
  width: 11.5rem;
  max-width: 100%;
}
.lms-course-pick select, .field input, .field select, .field textarea, .block-row select, .block-row textarea, .q-card textarea, .opt-row input[type="text"], .opt-row input:not([type="radio"]) {
  border: 1px solid #c9c2b4; border-radius: 10px; padding: 8px 10px; background: #fff; width: 100%;
}
.field.date-field input[type="date"] { width: 11.5rem; }
.lms-split { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.lms-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.lesson-card { padding: 12px; }
.lesson-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.block-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; margin: 8px 0; align-items: start; }
.lms-preview-col {
  position: sticky;
  top: 8px;
  align-self: start;
  z-index: 4;
  background: #f4f1ea;
  padding-bottom: 16px;
}
.preview-label { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: #6b5500; margin-bottom: 8px; }
.phone-mock {
  width: 320px; height: 640px; background: #111; border-radius: 32px; padding: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}
.phone-notch { height: 10px; }
.phone-screen { height: calc(100% - 10px); background: #f3f0e8; border-radius: 22px; overflow: auto; color: #12100c; }
.phone-bar { padding: 10px 12px; font-size: 11px; font-weight: 800; border-bottom: 1px solid #ddd6c8; }
.phone-body { padding: 12px; }
.phone-kicker { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #6b5500; font-weight: 800; }
.phone-body h2 { font-size: 18px; margin: 4px 0 6px; }
.phone-sub { font-size: 12px; color: #5c564c; margin-bottom: 10px; }
.bk-h { font-size: 15px; font-weight: 800; margin: 10px 0 6px; }
.bk-p { font-size: 13px; line-height: 1.5; margin: 0 0 8px; }
.bk-ul { margin: 0 0 8px 18px; font-size: 13px; line-height: 1.45; }
.bk-call {
  background: #fff7dc; border-left: 3px solid #b8860b; padding: 8px 10px;
  font-size: 13px; margin: 8px 0; border-radius: 0 8px 8px 0;
}
.lms-help { font-size: 13px; color: #5c564c; margin-bottom: 12px; }
.opt-row { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; margin: 6px 0; font-size: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 650; margin-top: 10px; }
.mark { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 12px; }
.mark.pass { color: #15803d; }
.mark.fail { color: #b91c1c; }
.subhead { margin: 18px 0 8px; font-size: 14px; }
.status-list { list-style: none; padding: 0; }
.status-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee8dc; }
.pad { padding: 16px; }
.opt-choice { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; margin: 6px 0; }
.panel-back { color: var(--primary); font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.img-drop {
  border: 1px dashed #c9c2b4;
  border-radius: 10px;
  padding: 10px;
  background: #faf8f3;
  min-width: 0;
}
.img-drop img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #111;
  border-radius: 8px;
  display: block;
  margin-bottom: 8px;
}
.img-drop-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b6458;
  font-size: 12px;
  font-weight: 650;
  padding: 18px 8px;
}
.img-drop-actions { display: flex; flex-direction: column; gap: 8px; }
.img-caption {
  border: 1px solid #c9c2b4;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  width: 100%;
  font-size: 12px;
}
.img-drop-hint { font-size: 11px; color: #6b6458; margin: 6px 0 0; }
.img-drop-err { font-size: 12px; color: #b91c1c; margin: 6px 0 0; font-weight: 700; }
.reset-all-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.phone-body .bk-fig img { max-width: 100%; }

@media (max-width: 980px) {
  .lms { grid-template-columns: 1fr; }
  .lms-side { flex-direction: row; flex-wrap: wrap; }
  .lms-split { grid-template-columns: 1fr; }
  .lms-side nav { flex-direction: row; flex-wrap: wrap; }
}
.lms-gate {
  max-width: 520px;
  margin: 36px auto;
  text-align: center;
  font-family: Segoe UI, system-ui, sans-serif;
  color: #161410;
  padding: 12px 16px 40px;
}
.lms-gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.lms-gate-brand img { height: 88px; width: auto; }
.lms-gate h1 { font-size: 28px; margin: 8px 0 0; letter-spacing: -0.03em; }
.lms-gate .lms-gate-sub { color: #6b5500; font-weight: 800; margin: 0; }
.lms-gate-blurb {
  font-style: italic;
  text-align: left;
  color: #5c564c;
  margin: 16px 0 8px;
  font-size: 13px;
  line-height: 1.5;
}
.lms-gate a { color: #b8860b; font-weight: 700; }
.lms-gate-form { text-align: left; margin: 24px 0 20px; padding: 18px; border: 1px solid #ddd6c8; border-radius: 16px; background: #fff; }
.lms-gate-form label { display: block; font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.lms-gate-form input { width: 100%; padding: 10px 12px; border: 1px solid #c9c2b4; border-radius: 10px; margin-bottom: 12px; font-size: 16px; }
.lms-gate-form #lms-phone { max-width: 12rem; }
.lms-gate-form .lms-btn { width: 100%; justify-content: center; margin-bottom: 8px; }
.lms-gate-form .hidden { display: none !important; }
.lms-gate-form .lms-consent { font-size: 13px; line-height: 1.5; color: #161410; margin: 0 0 12px; }
.lms-gate-form .lms-consent a { color: #161410; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lms-gate .muted { color: #6b6458; font-size: 13px; }
.lms-table { width: 100%; border-collapse: collapse; }
.lms-table th, .lms-table td { text-align: left; padding: 8px; border-bottom: 1px solid #eee8dc; }
.lms-btn { display: inline-flex; gap: 6px; padding: 8px 12px; border-radius: 8px; border: 0; cursor: pointer; font-weight: 650; }
.lms-btn.primary { background: #161410; color: #f4f1ea; }
.lms-btn.ghost { background: #fff; border: 1px solid #c9c2b4; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { padding: 8px 10px; border: 1px solid #c9c2b4; border-radius: 8px; }
.date-field input { width: 11.5rem; }

.lms-table th.sortable { cursor: pointer; user-select: none; }
.lms-table th.sortable:hover { color: #6b5500; }
.lms-table tr.result-row { cursor: pointer; }
.lms-table tr.result-row:hover { background: #f7f1de; }
.lms-table td.ans-ok { color: #15803d; font-weight: 800; }
.lms-table td.ans-bad { color: #b91c1c; font-weight: 800; }
.lms-pop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lms-pop-card {
  background: #fff; max-width: 720px; width: 100%; max-height: 80vh; overflow: auto;
  border-radius: 14px; padding: 18px; color: #161410;
}
.lms-pop-card h2 { margin: 8px 0 4px; }
.phone-body .lesson-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.phone-body .btn {
  width: 100%; padding: 8px; border-radius: 10px; font-size: 12px; font-weight: 800;
  border: 1px solid #c9c2b4; background: #fff;
}
.phone-body .btn-primary { background: #b8860b; color: #1a1200; border: none; }
.phone-body .quiz-progress { font-size: 12px; font-weight: 800; color: #6b5500; margin: 4px 0 8px; }
.phone-body .quiz-opt { display: block; padding: 8px; border: 1px solid #ddd6c8; border-radius: 8px; margin: 6px 0; font-size: 13px; }
.bk-ul { list-style: disc; }
ol.bk-ul { list-style: decimal; }
