.deck-page,
.slides-index-page {
  background: #f2f3f5;
}

.deck-page {
  padding-top: var(--zj-nav-height);
}

.slides-language {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

html[data-authenticated="false"] .deck-page #deck-viewer:not([hidden]) .slides-language {
  margin-top: 0.8rem;
}

#zj-slides-root {
  height: min(78vh, 920px);
  overflow: hidden;
  border: 1px solid #cfd4da;
  border-radius: 0.55rem;
  background: #fff;
  box-shadow: 0 0.6rem 2rem rgb(33 37 41 / 9%);
}

#zj-slides-deck {
  height: 100%;
}

#zj-slides-deck.reveal.overview .slides > section,
#zj-slides-deck.reveal.overview .slides > section > section {
  display: block !important;
}

.zj-lang-cn .lang-en,
.zj-lang-en .lang-cn {
  display: none !important;
}

.zj-outline-list li.zj-outline-done,
.zj-outline-badges .badge.zj-outline-done {
  opacity: 0.45;
}

.zj-outline-list li.zj-outline-current {
  color: var(--bs-primary);
  font-weight: 700;
}

.zj-outline-badges .badge.zj-outline-current {
  border: 1px solid var(--bs-primary);
  color: var(--bs-primary) !important;
  background: #fff !important;
  font-weight: 700;
}

#zj-slides-deck .slides img,
#zj-slides-deck .slides video {
  margin: 0.25rem 0 !important;
}

#zj-slides-deck .slides section > .container-fluid + .container-fluid {
  margin-top: 1rem;
}

#zj-slides-deck .editor-text-body {
  font-size: var(--r-main-font-size) !important;
}

#zj-slides-deck .editor-text-fs-title {
  font-size: 100px !important;
  line-height: 1.08 !important;
}

#zj-slides-deck .editor-text-fs-1 {
  font-size: 40px !important;
}

#zj-slides-deck .editor-text-small,
#zj-slides-deck .editor-text-fs-3 {
  font-size: 28px !important;
}

#zj-slides-deck .editor-text-tiny,
#zj-slides-deck .editor-text-fs-4 {
  font-size: 24px !important;
}

#zj-slides-deck .editor-text-fs-5 {
  font-size: 20px !important;
}

#zj-slides-deck .editor-text-fs-6 {
  font-size: 16px !important;
}

#zj-slides-deck.is-editing .slides section.present {
  box-shadow: inset 0 0 0 4px rgb(13 110 253 / 20%);
}

#zj-slides-deck.is-editing .slide-grid-column {
  outline: 2px dashed rgb(13 110 253 / 28%);
  outline-offset: -2px;
}

#zj-slides-deck.is-editing iframe,
#zj-slides-deck.is-editing video {
  pointer-events: none;
}

.deck-grid-dialog {
  width: min(94vw, 760px);
}

.deck-grid-columns {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

.deck-grid-config-row {
  display: grid;
  grid-template-columns: 5rem minmax(9rem, 1fr) minmax(12rem, 1.35fr);
  align-items: end;
  gap: 0.7rem;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.65rem;
}

.deck-grid-config-row__number {
  align-self: center;
  color: #495057;
  font-size: 0.82rem;
  font-weight: 800;
}

.deck-grid-config-row label {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  color: #495057;
  font-size: 0.76rem;
  font-weight: 600;
}

.deck-grid-inline-actions {
  display: flex;
  justify-content: flex-start;
  margin: -0.3rem 0 0.75rem;
}

.deck-grid-total {
  margin: -0.25rem 0 0.75rem;
  color: #198754;
  font-size: 0.84rem;
  font-weight: 800;
}

.deck-grid-total.is-invalid {
  color: #dc3545;
}

.deck-access-control {
  width: 10.5rem;
  margin: 0;
}

.deck-history-list {
  display: grid;
  max-height: min(52vh, 28rem);
  gap: 0.6rem;
  margin-top: 1rem;
  overflow-y: auto;
}

.deck-history-empty {
  margin: 0;
  border: 1px dashed #adb5bd;
  border-radius: 0.45rem;
  padding: 1rem;
  text-align: center;
}

.deck-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
  background: #fff;
}

.deck-history-item__time {
  display: block;
  color: #212529;
  font-size: 0.9rem;
  font-weight: 700;
}

.deck-history-item__preview {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  color: #6c757d;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.65rem;
  color: #6c757d;
  font-size: 0.78rem;
}

.deck-help kbd {
  min-width: 1.45rem;
  margin: 0 0.08rem;
  padding: 0.12rem 0.45rem;
  text-align: center;
}

.access-panel {
  display: grid;
  min-height: min(72vh, 760px);
  place-items: center;
  border: 1px solid #cfd4da;
  border-radius: 0.55rem;
  padding: 2rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 0.6rem 2rem rgb(33 37 41 / 8%);
}

.access-panel__content {
  max-width: 520px;
}

.access-panel__icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  color: #6c757d;
  background: #e9ecef;
  font-size: 1.45rem;
}

.access-panel h2 {
  font-weight: 800;
}

.access-panel__warning {
  margin-top: 1.2rem;
  border-radius: 0.4rem;
  padding: 0.65rem 0.8rem;
  color: #664d03;
  background: #fff3cd;
  font-size: 0.8rem;
  text-align: left;
}

.slides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.25rem;
}

.slide-card-item {
  position: relative;
  min-width: 0;
}

.slide-card-item[hidden] {
  display: none;
}

.slide-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d5d9dd;
  border-radius: 0.7rem;
  color: inherit;
  background: #fff;
  box-shadow: 0 0.4rem 1.4rem rgb(33 37 41 / 7%);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.slide-card-delete,
.slide-card-subtitle-edit {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid #f1aeb5;
  border-radius: 50%;
  color: #b02a37;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 0.25rem 0.8rem rgb(33 37 41 / 12%);
}

.slide-card-subtitle-edit {
  right: 3.65rem;
  border-color: #9ec5fe;
  color: #0d6efd;
}

.slide-card-delete[hidden],
.slide-card-subtitle-edit[hidden] {
  display: none;
}

.slide-card-delete:hover {
  color: #fff;
  background: #dc3545;
}

.slide-card-subtitle-edit:hover {
  color: #fff;
  background: #0d6efd;
}

.slide-card:hover {
  color: inherit;
  box-shadow: 0 0.8rem 2rem rgb(33 37 41 / 13%);
  transform: translateY(-3px);
}

.slide-card__preview {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 2rem;
  background: linear-gradient(145deg, #fff, #f4f6f8);
  text-align: center;
}

.slide-card__preview strong {
  display: block;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  letter-spacing: -0.035em;
}

.slide-card__preview-lines {
  margin-top: 0.65rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.slide-card__preview-lines span {
  display: block;
}

.slide-card__preview-lines span + span {
  margin-top: 0.2rem;
}

.slide-card__body {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid #e9ecef;
  padding: 1rem 1.1rem;
}

.slide-card__copy {
  flex: 1;
}

.slide-card__copy p {
  margin: 0;
  color: #6c757d;
  font-size: 0.82rem;
}

.slide-card__copy .slide-card__subtitle {
  margin-top: 0.4rem;
  overflow: hidden;
  color: #343a40;
  font-size: 0.86rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slide-card__copy .slide-card__subtitle.is-placeholder {
  color: #9aa1a9;
  font-style: italic;
  font-weight: 500;
}

.slide-card__arrow {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #0d6efd;
  background: #e7f1ff;
}

@media (max-width: 767px) {
  .deck-grid-config-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .slides-grid {
    grid-template-columns: 1fr;
  }

  .slide-card__preview {
    min-height: 150px;
  }
}
