.ce-admin-card {
  position: relative;
  padding: 0;
  overflow: visible;
  min-height: 100%;
  height: 100%;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

#panel-commentary_slides > .admin-card:not(.ce-admin-card),
#panel-commentary_courses > .admin-card:not(.ce-admin-card) {
  display: none;
}

.ce-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--color-line);
  background: #fff;
}

.ce-header-left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ce-header h2 {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 auto;
}

.ce-status {
  font-size: 0.78rem;
  color: #6b7280;
  min-width: 110px;
  text-align: right;
}

.ce-shell {
  display: grid;
  width: 100%;
  flex: 1;
  min-height: 0;
  height: auto;
  background: #eef2f0;
}

.ce-slide-shell {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.ce-course-shell {
  grid-template-columns: 240px 240px minmax(220px, 0.8fr) minmax(260px, 1fr);
}

.ce-dropdown-panel {
  display: none;
  position: fixed;
  z-index: 10010;
  width: 310px;
  max-height: min(70vh, 620px);
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.ce-dropdown-panel.open {
  display: flex;
  flex-direction: column;
}

.ce-library-dropdown {
  height: min(70vh, 620px);
}

.ce-screen-dropdown {
  overflow: auto;
  padding: 0.75rem;
}

.ce-pane {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--color-line);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.ce-pane-title {
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent-strong);
  border-bottom: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ce-library-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.ce-list {
  flex: 1;
  overflow: auto;
  padding: 0.5rem;
}

.ce-form {
  border-top: 1px solid var(--color-line);
  padding: 0.65rem;
  background: #fbfcfa;
}

.ce-form textarea {
  min-height: 58px;
}

.ce-form-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.ce-panel-actions {
  padding: 0.55rem;
  border-top: 1px solid var(--color-line);
  flex-wrap: wrap;
  margin-top: 0;
}

.ce-search {
  padding: 0.55rem;
  border-bottom: 1px solid var(--color-line);
  background: #fbfcfa;
}

.ce-search input {
  width: 100%;
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  padding: 0.42rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  background: #fff;
}

.ce-list-empty,
.ce-error {
  padding: 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #8b949e;
}

.ce-error {
  color: #9f1239;
  background: #fff5f7;
}

.ce-deck-item,
.ce-unit-item,
.ce-slide-item {
  width: 100%;
  border: 1px solid transparent;
  background: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 0.35rem;
  color: #1f2937;
}

.ce-deck-item:hover,
.ce-unit-item:hover,
.ce-slide-item:hover {
  background: var(--color-hover);
}

.ce-deck-item.active,
.ce-unit-item.active,
.ce-slide-item.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.ce-deck-title,
.ce-slide-title {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ce-deck-meta,
.ce-slide-meta {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.72rem;
  color: #7a838d;
}

.ce-workbench {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ce-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--color-line);
  background: #fff;
}

.ce-tool-sep {
  width: 1px;
  height: 24px;
  background: var(--color-line);
  margin: 0 0.15rem;
}

.ce-btn {
  border: 1px solid var(--color-line-strong);
  background: #fff;
  color: #263238;
  border-radius: 5px;
  padding: 0.34rem 0.55rem;
  min-height: 30px;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ce-btn:hover {
  background: var(--color-hover);
}

.ce-btn.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.ce-btn.danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff7f7;
}

.ce-toggle-btn.active,
.ce-toggle-btn[aria-expanded="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-weight: 700;
}

.ce-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.ce-stage-scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0.65rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.ce-stage-wrap {
  width: max-content;
  min-width: max-content;
  padding: 0.65rem;
  margin: 0 auto;
}

.ce-canvas,
.cv-canvas {
  position: relative;
  box-sizing: content-box;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
}

.ce-element,
.cv-element {
  position: absolute;
  box-sizing: border-box;
  overflow: hidden;
}

.ce-element {
  cursor: move;
}
.ce-el-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.3rem 0.45rem;
  border: 2px dashed rgba(37, 99, 235, 0.78);
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.2;
}

.ce-link-label {
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.ce-link-url {
  overflow: hidden;
  color: rgba(29, 78, 216, 0.82);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-el-link {
  display: block;
  border: 0;
  background: transparent;
  color: transparent;
  text-decoration: none;
  cursor: pointer;
}

.cv-el-link.disabled {
  pointer-events: none;
}.cv-unit-path-badge {
  position: absolute;
  left: 1px;
  top: 1px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 2px);
  min-height: 28px;
  padding: 0.28rem 0.58rem 0.28rem 0.5rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.84);
  border: 0;
  box-shadow: none;
  color: #000000;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  pointer-events: none;
}

.cv-unit-path-badge::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  align-self: stretch;
  min-height: 18px;
  margin-right: 0.45rem;
  border-radius: 3px;
  background: var(--color-accent-strong);
}

.cv-unit-path-badge span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ce-rich-text {
  cursor: text;
  user-select: text;
}

.ce-rich-body {
  width: 100%;
  max-height: 100%;
  min-height: 1.35em;
  outline: 0;
  overflow: hidden;
  scrollbar-width: none;
  white-space: pre;
  word-break: normal;
  line-height: inherit;
  text-align: inherit;
  cursor: text;
  user-select: text;
}

.ce-rich-body:focus {
  outline: 0;
}

.cv-rich-body {
  width: 100%;
  max-height: 100%;
  min-height: 1.35em;
  overflow: hidden;
  scrollbar-width: none;
  white-space: pre;
  word-break: normal;
  line-height: inherit;
  text-align: inherit;
}

::highlight(ce-rich-selection) {
  background: rgba(37, 99, 235, 0.28);
  color: inherit;
}

.ce-canvas.ce-edge-hover,
.ce-rich-text.edge-hover,
.ce-rich-text.edge-hover *,
.ce-el-table.edge-hover,
.ce-el-table.edge-hover * {
  cursor: move;
}

.ce-rich-text.resize-hover,
.ce-rich-text.resize-hover * {
  cursor: nwse-resize;
}

.ce-el-table.resize-col-hover,
.ce-el-table.resize-col-hover * {
  cursor: col-resize;
}

.ce-el-table.resize-row-hover,
.ce-el-table.resize-row-hover * {
  cursor: row-resize;
}

.ce-canvas.ce-dragging,
.ce-canvas.ce-dragging .ce-element {
  cursor: move;
}

.ce-canvas.ce-resizing,
.ce-canvas.ce-resizing .ce-element {
  cursor: nwse-resize;
}

.ce-rich-text.editing {
  cursor: text;
  user-select: text;
}

.ce-rich-text.editing * {
  cursor: text;
}

.ce-rich-text.editing.edge-hover,
.ce-rich-text.editing.edge-hover * {
  cursor: move;
}

.ce-rich-text.editing.resize-hover,
.ce-rich-text.editing.resize-hover * {
  cursor: nwse-resize;
}

.ce-rich-text .ce-resize {
  cursor: nwse-resize;
  user-select: none;
}

.ce-rich-text,
.ce-rich-text *,
.cv-el-text,
.cv-el-text *,
.cv-el-shape,
.cv-el-shape * {
  text-decoration-color: currentColor;
}

.ce-element.selected {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.ce-el-text,
.cv-el-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
}

.ce-el-shape,
.cv-el-shape {
  min-width: 4px;
  min-height: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
}

.ce-el-line,
.cv-el-line {
  --arrow-head-length: max(9px, calc(var(--line-width, 2px) * 3));
  --arrow-head-height: max(10px, calc(var(--line-width, 2px) * 3.6));
  overflow: visible;
}

.ce-el-line::before,
.cv-el-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: var(--line-width, 2px);
  background: var(--line-color, #111827);
  transform: translateY(-50%);
}

.ce-el-line.arrow-end::before,
.cv-el-line.arrow-end::before {
  right: calc(var(--arrow-head-length) - 2px);
}

.ce-el-line.arrow-end::after,
.cv-el-line.arrow-end::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: var(--arrow-head-length);
  height: var(--arrow-head-height);
  border: 0;
  background: var(--line-color, #111827);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateY(-50%);
}

.ce-table,
.cv-table {
  width: 100%;
  height: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font: inherit;
}

.ce-table td,
.cv-table td {
  position: relative;
  border: 0 solid transparent;
  padding: 0;
  vertical-align: top;
  overflow: hidden;
  min-height: 0;
  word-break: break-word;
}

.ce-table td {
  outline: 0;
  cursor: default;
}

.ce-table-cell-body,
.cv-table-cell-body {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--cell-body-top, 0);
  bottom: var(--cell-body-bottom, auto);
  box-sizing: border-box;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: hidden;
  scrollbar-width: none;
  padding: 0.28em 0.42em;
  line-height: inherit;
  white-space: normal;
  word-break: break-word;
  transform: var(--cell-body-transform, none);
}

.ce-table-cell-body {
  outline: 0;
  cursor: text;
}

.ce-rich-body::-webkit-scrollbar,
.cv-rich-body::-webkit-scrollbar,
.ce-table-cell-body::-webkit-scrollbar,
.cv-table-cell-body::-webkit-scrollbar {
  display: none;
}

.ce-table td.selected {
  box-shadow: inset 0 0 0 2px #2563eb;
}

.ce-table td.resize-col,
.ce-table td.resize-col .ce-table-cell-body {
  cursor: col-resize;
}

.ce-table td.resize-row,
.ce-table td.resize-row .ce-table-cell-body {
  cursor: row-resize;
}

.ce-table-actions {
  display: grid;
  grid-template-columns: auto minmax(38px, 1fr) minmax(38px, 1fr) auto minmax(38px, 1fr) minmax(38px, 1fr);
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.ce-table-action-label {
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.ce-table-actions button {
  min-height: 26px;
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  padding: 0 0.35rem;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.ce-table-actions button:hover:not(:disabled) {
  background: var(--color-hover);
}

.ce-table-actions button:disabled {
  color: #9ca3af;
  cursor: not-allowed;
  background: #f9fafb;
}

.ce-table-cell-props {
  border-top: 1px solid var(--color-line);
  padding-top: 0.65rem;
}

.ce-prop-subtitle {
  margin-bottom: 0.45rem;
  color: var(--color-accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.ce-border-sides {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.ce-border-side-buttons button {
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.ce-border-side-buttons button:hover:not(:disabled) {
  background: var(--color-hover);
  color: var(--color-accent-strong);
}

.ce-border-side-buttons button:disabled {
  color: #9ca3af;
  background: #f9fafb;
  cursor: not-allowed;
}

.ce-image,
.cv-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.ce-file,
.cv-file {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  padding: 0.45rem 0.6rem;
}

.ce-resize {
  position: absolute;
  right: -9px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  background: #2563eb;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: nwse-resize;
  z-index: 20;
}

.ce-rotate {
  position: absolute;
  right: -33px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2563eb;
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
  cursor: grab;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  z-index: 21;
}

.ce-rotate::before {
  content: "↻";
  transform: translateY(-1px);
}

.ce-rotate:active {
  cursor: grabbing;
}

.ce-el-line .ce-resize,
.ce-el-line .ce-rotate {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.ce-props {
  border-right: 0;
}

.ce-prop-scroll {
  flex: 1;
  overflow: auto;
  padding: 0.75rem;
}

.ce-element-props {
  min-height: 0;
}

.ce-field {
  margin-bottom: 0.65rem;
}

.ce-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #4b5563;
}

.ce-field input,
.ce-field textarea,
.ce-field select {
  width: 100%;
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  padding: 0.42rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  background: #fff;
}

.ce-color-input {
  background:
    linear-gradient(var(--ce-color-preview), var(--ce-color-preview)) 0.45rem 50% / 0.9rem 0.9rem no-repeat,
    #fff !important;
  padding-left: 1.7rem !important;
  cursor: pointer;
}

.ce-color-overlay {
  position: fixed;
  z-index: 10020;
  width: 184px;
  padding: 0.65rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.ce-color-title {
  margin-bottom: 0.45rem;
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 700;
}

.ce-color-grid {
  display: grid;
  grid-template-columns: repeat(5, 24px);
  gap: 0.28rem;
}

.ce-color-swatch,
.ce-color-none {
  width: 24px;
  height: 24px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  cursor: pointer;
}

.ce-color-swatch {
  background: var(--swatch);
}

.ce-color-none {
  background:
    linear-gradient(135deg, transparent 46%, #ef4444 47%, #ef4444 53%, transparent 54%),
    linear-gradient(45deg, #f3f4f6 25%, transparent 25%),
    linear-gradient(-45deg, #f3f4f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f4f6 75%),
    linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
  background-color: #fff;
  background-size: 100% 100%, 10px 10px, 10px 10px, 10px 10px, 10px 10px;
  overflow: hidden;
  text-indent: -999px;
  color: #374151;
}

.ce-color-swatch:hover,
.ce-color-none:hover {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.ce-color-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 700;
}

.ce-color-custom input {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}

.ce-color-custom input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.ce-color-custom input::-webkit-color-swatch {
  border: 0;
  border-radius: 2px;
}

.ce-table-size-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.18);
}

.ce-table-size-panel {
  position: relative;
  width: min(92vw, 360px);
  padding: 0.8rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.24);
}

.ce-table-size-title {
  margin-bottom: 0.55rem;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 800;
}

.ce-table-size-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.ce-table-size-row label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.ce-table-size-row input {
  width: 72px;
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  padding: 0.4rem 0.45rem;
  font: inherit;
  font-size: 0.82rem;
}

.ce-table-size-row button {
  min-height: 34px;
  border: 1px solid var(--color-accent);
  border-radius: 5px;
  padding: 0 0.75rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.ce-table-size-close {
  position: absolute;
  top: 0.4rem;
  right: 0.45rem;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.ce-table-size-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.ce-table-size-error {
  min-height: 1rem;
  margin-top: 0.45rem;
  color: #b91c1c;
  font-size: 0.74rem;
  font-weight: 700;
}

.ce-field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.45;
}

.ce-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.ce-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.ce-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #4b5563;
}

.ce-check input {
  width: auto;
}

.ce-style-toggles {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.ce-align-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.ce-segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  background: #fff;
}

.ce-linked-path-toggle {
  margin: -0.15rem 0 0.65rem;
  color: #4b5563;
  font-size: 0.78rem;
}

.ce-segment button {
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-right: 1px solid var(--color-line);
  background: #fff;
  color: #4b5563;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.ce-segment button:last-child {
  border-right: 0;
}

.ce-segment button:hover {
  background: var(--color-hover);
}

.ce-segment button.active {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-weight: 700;
}

.ce-segment button:disabled {
  color: #9ca3af;
  background: #f9fafb;
  cursor: not-allowed;
}

.cv-empty {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 3rem 2rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 420px;
  margin: 5rem auto;
}

.cv-search-overlay {
  position: fixed;
  top: calc(54px + 0.75rem);
  right: 1rem;
  width: min(340px, calc(100vw - 230px));
  z-index: 40;
  pointer-events: none;
}

.cv-search-box {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(209, 213, 219, 0.95);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 0.25rem;
}

.cv-search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263238;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.34rem 0.42rem;
}

.cv-search-box button {
  width: 1.55rem;
  height: 1.75rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #7b8794;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
}

.cv-search-box button:disabled {
  color: #c3cbd3;
  cursor: default;
}

.cv-search-box button:disabled:hover {
  background: transparent;
  color: #c3cbd3;
}

.cv-search-box button:hover {
  background: var(--color-hover);
  color: var(--color-accent-strong);
}

.cv-viewer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  margin-top: 0.4rem;
  pointer-events: auto;
}

.cv-export-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.3rem;
}

.cv-export-btn {
  border: 1px solid rgba(209, 213, 219, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: #263238;
  border-radius: 5px;
  padding: 0.28rem 0.5rem;
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.cv-export-btn:hover:not(:disabled) {
  background: #fff;
  color: var(--color-accent-strong);
}

.cv-present-btn:disabled,
.cv-export-btn:disabled {
  color: #a8b0b8;
  background: rgba(255, 255, 255, 0.72);
  cursor: not-allowed;
}

.cv-export-status {
  min-height: 1rem;
  color: #6b7280;
  font-size: 0.74rem;
  line-height: 1.35;
  text-align: right;
}

.cv-search-count {
  flex: 0 0 auto;
  min-width: 2.7rem;
  color: #6b7280;
  font-size: 0.74rem;
  text-align: center;
  white-space: nowrap;
}

.cv-search-results {
  display: none;
  pointer-events: auto;
  margin-top: 0.35rem;
  max-height: min(380px, calc(100vh - 150px));
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(209, 213, 219, 0.95);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.cv-search-overlay.open .cv-search-results {
  display: block;
}

.cv-search-result,
.cv-search-empty {
  width: 100%;
  display: block;
  padding: 0.62rem 0.72rem;
  border: 0;
  border-bottom: 1px solid var(--color-line-subtle);
  background: #fff;
  color: #333;
  font: inherit;
  text-align: left;
}

.cv-search-result {
  cursor: pointer;
}

.cv-search-result:last-child,
.cv-search-empty:last-child {
  border-bottom: 0;
}

.cv-search-result:hover,
.cv-search-result.selected {
  background: var(--color-hover);
}

.cv-search-result-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--color-accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.cv-search-page {
  flex: 0 0 auto;
  color: #8a949e;
  font-size: 0.72rem;
  font-weight: 700;
}

.cv-search-path,
.cv-search-snippet {
  display: block;
  margin-top: 0.24rem;
  color: #7b8794;
  font-size: 0.74rem;
  line-height: 1.45;
}

.cv-search-snippet {
  color: #4b5563;
}

.cv-search-hit {
  background: #fef08a;
  color: inherit;
  border-radius: 2px;
  padding: 0 0.05em;
}

.cv-single-view {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #eef2f0;
}

.cv-slide-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--color-line);
  background: #fff;
}

.cv-slide-head-main {
  min-width: 0;
}

.cv-slide-kicker {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-slide-head h1 {
  margin: 0;
  color: var(--color-accent-strong);
  font-size: 1rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-slide-actions {
  position: absolute;
  right: 0.9rem;
  bottom: 0.75rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cv-fit-info {
  color: #4b5563;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: 5px;
  padding: 0.28rem 0.45rem;
  font-size: 0.78rem;
  white-space: nowrap;
  pointer-events: none;
}

.cv-present-btn {
  border: 1px solid rgba(209, 213, 219, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: #263238;
  border-radius: 5px;
  padding: 0.38rem 0.62rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.cv-present-btn:hover {
  background: #fff;
  color: var(--color-accent-strong);
}

.cv-present-btn:disabled:hover {
  color: #a8b0b8;
  background: rgba(255, 255, 255, 0.72);
}

.cv-fit-area {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.cv-slide-single {
  position: relative;
  flex: 0 0 auto;
}

.cv-present-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #111;
  color: #fff;
}

.cv-present-root.active {
  display: block;
}

.cv-present-root:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #111;
}

.cv-present-root.fallback {
  width: 100vw;
  height: 100vh;
}

.cv-present-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cv-present-slide {
  position: relative;
  flex: 0 0 auto;
}

.cv-present-canvas {
  box-shadow: none;
}

.cv-present-count {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 10001;
  padding: 0.22rem 0.45rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
}

.cv-export-root {
  position: fixed;
  left: -100000px;
  top: 0;
  z-index: 100000;
  pointer-events: none;
}

.cv-export-slide {
  position: relative;
  overflow: hidden;
}

.cv-export-canvas {
  position: absolute;
  inset: 0;
}

.cv-export-count {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 10001;
  padding: 0.22rem 0.45rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
}

.cv-deck-head {
  max-width: 980px;
  margin: 0 auto 1rem;
}

.cv-deck-head h1 {
  font-size: 1.25rem;
  color: var(--color-accent-strong);
  margin-bottom: 0.35rem;
}

.cv-deck-head p {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.7;
}

.cv-slide {
  width: min(100%, 980px);
  margin: 0 auto 1.25rem;
}

.cv-slide-no {
  margin-bottom: 0.35rem;
  font-size: 0.76rem;
  color: #7a838d;
}

.ca-card {
  min-height: calc(100vh - 102px);
}

.ca-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ca-layout {
  display: grid;
  grid-template-columns: 300px minmax(320px, 1fr) 340px;
  min-height: 620px;
  border: 1px solid var(--color-line);
  background: #fff;
}

.ca-panel {
  min-width: 0;
  border-right: 1px solid var(--color-line);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.ca-panel:last-child {
  border-right: 0;
}

.ca-panel h3 {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-accent-strong);
  font-size: 0.84rem;
}

.ca-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.8rem;
}

.ca-form label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #52606d;
}

.ca-form input,
.ca-form textarea,
.ca-tools input,
.ca-tools select {
  width: 100%;
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  padding: 0.46rem 0.55rem;
  background: #fff;
  color: #263238;
  font: inherit;
  font-size: 0.82rem;
}

.ca-form textarea {
  resize: vertical;
  line-height: 1.55;
}

.ca-file-drop {
  border: 1px dashed var(--color-line-strong);
  border-radius: 6px;
  padding: 0.8rem;
  background: #fbfcfa;
  cursor: pointer;
}

.ca-file-drop input {
  display: none;
}

.ca-file-drop span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-accent-strong);
}

.ca-status {
  min-height: 1.2rem;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.45;
}

.ca-status.error {
  color: #b91c1c;
}

.ca-status.ok {
  color: #1e7e34;
}

.ca-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 0.5rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--color-line);
  background: #fbfcfa;
}

.ca-asset-list {
  flex: 1;
  overflow: auto;
  padding: 0.55rem;
}

.ca-asset-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 0.55rem;
  text-align: left;
  cursor: pointer;
  color: #263238;
  font: inherit;
}

.ca-asset-item + .ca-asset-item {
  margin-top: 0.4rem;
}

.ca-asset-item:hover {
  background: var(--color-hover);
}

.ca-asset-item.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.ca-thumb {
  width: 54px;
  height: 42px;
  border: 1px solid var(--color-line);
  border-radius: 5px;
  background: #f5f7f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #7a838d;
  font-size: 0.72rem;
  font-weight: 700;
}

.ca-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ca-asset-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 700;
}

.ca-asset-meta {
  display: block;
  margin-top: 0.15rem;
  color: #7a838d;
  font-size: 0.72rem;
  line-height: 1.35;
}

.ca-detail-empty {
  padding: 1.2rem;
  color: #8b949e;
  font-size: 0.84rem;
}

.ca-preview {
  margin: 0.8rem;
  border: 1px solid var(--color-line);
  background: #f7f9f8;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a838d;
  overflow: hidden;
}

.ca-preview img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.ca-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.8rem 0.8rem;
}

.ce-law-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 42, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ce-law-panel {
  width: min(1120px, 96vw);
  height: min(720px, 92vh);
  background: #fff;
  border: 1px solid var(--color-line-strong);
  border-radius: 7px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ce-law-head,
.ce-law-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--color-line);
}

.ce-law-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--color-line);
  border-bottom: 0;
}

.ce-law-close {
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.ce-law-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 0.9fr 1fr 1.25fr;
}

.ce-law-body section {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
}

.ce-law-body section:last-child {
  border-right: 0;
}

.ce-law-tools {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.65rem;
  background: #fbfcfa;
  border-bottom: 1px solid var(--color-line);
}

.ce-law-tools input,
.ce-law-tools select {
  min-width: 0;
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  padding: 0.42rem 0.5rem;
  background: #fff;
  color: #263238;
  font: inherit;
  font-size: 0.8rem;
}

.ce-law-tools input:only-child {
  grid-column: 1 / -1;
}

.ce-law-list,
.ce-law-preview {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.55rem;
}

.ce-law-row {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  padding: 0.55rem 0.6rem;
  text-align: left;
  color: #263238;
  cursor: pointer;
  font: inherit;
}

.ce-law-row + .ce-law-row {
  margin-top: 0.35rem;
}

.ce-law-row:hover {
  background: var(--color-hover);
}

.ce-law-row.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.ce-law-row strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
}

.ce-law-row span {
  display: block;
  margin-top: 0.18rem;
  color: #7a838d;
  font-size: 0.72rem;
  line-height: 1.4;
}

.ce-law-preview {
  white-space: pre-wrap;
  line-height: 1.7;
  color: #263238;
  font-size: 0.84rem;
}

.cl-card {
  min-height: calc(100vh - 102px);
}

.cl-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cl-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.cl-actions select {
  border: 1px solid var(--color-line-strong);
  border-radius: 5px;
  padding: 0.45rem 0.5rem;
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
}

.cl-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 620px;
  border: 1px solid var(--color-line);
  background: #fff;
}

.cl-list {
  min-width: 0;
  border-right: 1px solid var(--color-line);
  overflow: auto;
  padding: 0.55rem;
}

.cl-ref-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  padding: 0.6rem;
  text-align: left;
  color: #263238;
  cursor: pointer;
  font: inherit;
}

.cl-ref-item + .cl-ref-item {
  margin-top: 0.45rem;
}

.cl-ref-item:hover {
  background: var(--color-hover);
}

.cl-ref-item.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.cl-ref-title {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.cl-ref-meta {
  display: block;
  margin-top: 0.18rem;
  color: #7a838d;
  font-size: 0.72rem;
  line-height: 1.45;
}

.cl-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #eef2f0;
  color: #52606d;
  font-size: 0.68rem;
  font-weight: 700;
}

.cl-badge.changed,
.cl-badge.missing {
  background: #fff1f2;
  color: #be123c;
}

.cl-badge.current,
.cl-badge.applied {
  background: #e6f4ea;
  color: #1e7e34;
}

.cl-badge.custom {
  margin-left: 0.3rem;
  background: #fff7ed;
  color: #c2410c;
}

.cl-detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cl-empty {
  padding: 1.2rem;
  color: #8b949e;
  font-size: 0.84rem;
}

.cl-detail-head {
  padding: 0.8rem;
  border-bottom: 1px solid var(--color-line);
}

.cl-detail-head strong {
  display: block;
  color: var(--color-accent-strong);
}

.cl-compare {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cl-text-pane {
  min-width: 0;
  border-right: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
}

.cl-text-pane:last-child {
  border-right: 0;
}

.cl-text-pane h3 {
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.78rem;
  color: #52606d;
}

.cl-text-pane pre {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 0.8rem;
  white-space: pre-wrap;
  word-break: keep-all;
  line-height: 1.7;
  font-family: inherit;
  font-size: 0.82rem;
  color: #263238;
}

.cl-apply-editor {
  border-top: 1px solid var(--color-line);
  padding: 0.75rem 0.8rem;
  background: #fbfcfd;
}

.cl-apply-editor label {
  display: block;
  margin-bottom: 0.4rem;
  color: #263238;
  font-size: 0.78rem;
  font-weight: 700;
}

.cl-apply-editor textarea {
  width: 100%;
  min-height: 150px;
  max-height: 260px;
  resize: vertical;
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  padding: 0.7rem;
  background: #fff;
  color: #263238;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.65;
}

.cl-apply-editor textarea:disabled {
  background: #f3f5f7;
  color: #8b949e;
}

.cl-apply-editor p {
  margin-top: 0.35rem;
  color: #7a838d;
  font-size: 0.72rem;
  line-height: 1.45;
}

.cl-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border-top: 1px solid var(--color-line);
}

@media (max-width: 1000px) {
  .ce-slide-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .ce-slide-shell .ce-props {
    grid-column: 1 / -1;
    min-height: 260px;
    border-top: 1px solid var(--color-line);
  }
  .ce-course-shell {
    grid-template-columns: 1fr 1fr;
  }
  .ca-layout {
    grid-template-columns: 1fr;
  }
  .ca-panel {
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }
  .ce-law-body {
    grid-template-columns: 1fr;
  }
  .ce-law-body section {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }
  .cl-layout,
  .cl-compare {
    grid-template-columns: 1fr;
  }
  .cl-list,
  .cl-text-pane {
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }
}

@media (max-width: 768px) {
  .ce-shell {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .ce-pane,
  .ce-props {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }
  .ce-stage-scroll {
    min-height: 420px;
    justify-content: flex-start;
  }
  .cv-slide-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }
  .cv-search-overlay {
    right: 0.75rem;
    width: 260px;
  }
  .cv-fit-info {
    white-space: normal;
  }
}
