[hidden],
.hidden {
  display: none !important;
}

.section-line-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.section-line-head h2,
.section-line-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.025em;
}

.section-line-head .line {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.library-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
}

.library-toolbar .search-field {
  width: min(420px, 100%);
}

.lightbox-sheet {
  width: min(1180px, 100%);
  height: min(860px, calc(100svh - 40px));
  max-height: calc(100svh - 40px);
  background: var(--surface-dark);
  border-color: rgba(255,255,255,.12);
  overflow: hidden;
}

.lightbox-content {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
}

.lightbox-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--on-dark);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.lightbox-head strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-head .btn,
.lightbox-head .icon-btn {
  color: var(--on-dark);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}

.lightbox-stage {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 18px;
  overflow: auto;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.confirm-content {
  padding: 26px;
}

.confirm-content h2 {
  max-width: 560px;
  margin: 10px 0 28px;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.1;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 720px) {
  .library-toolbar {
    overflow-x: auto;
  }

  .lightbox-sheet {
    height: 100svh;
    max-height: 100svh;
    border-radius: 0;
  }
}

/* «Мой план» (гант) на дашборде: блок на всю ширину сетки. */
.workspace-my-plan {
  min-width: 0;
}

.workspace-my-plan[hidden] {
  display: none;
}
