.yy-v8-kind-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.yy-v8-kind-button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  padding: 0 13px;
  color: #8ca1b2;
  background: #ffffff05;
  font-size: 11px;
}

.yy-v8-kind-button:hover,
.yy-v8-kind-button.active {
  border-color: var(--collection-accent, var(--cyan));
  color: #effaff;
  background: color-mix(in srgb, var(--collection-accent, var(--cyan)) 12%, transparent);
}

.yy-v8-filter-count {
  color: #72879a;
  white-space: nowrap;
  font-size: 11px;
}

.yy-v8-kind-badge {
  flex: none;
  margin-left: auto;
  pointer-events: none;
  border: 1px solid #7ca6bf52;
  padding: 4px 8px;
  color: #8fa9ba;
  background: #07121de8;
  letter-spacing: .08em;
  font-size: 9px;
}

.landing-card-footer {
  gap: 10px;
}

.collection-switcher {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.yy-v8-kind-badge[data-kind="view"] {
  border-color: #5bdef36b;
  color: #8aeafb;
}

.yy-v8-kind-badge[data-kind="holding"] {
  border-color: #d9a66f73;
  color: #e6bd90;
}

.landing-report-card[hidden] {
  display: none !important;
}

.yy-v8-filter-empty {
  border: 1px solid #d7a66f24;
  margin-top: 24px;
  padding: 70px 24px;
  color: #aaa29a;
  text-align: center;
  font-size: 14px;
}

.yy-v8-view-note {
  grid-column: 1 / -1;
  flex: 1 0 100%;
  width: 100%;
  border: 1px solid #5bdef33d;
  padding: 10px 12px;
  color: #91dbe7;
  background: #5bdef30a;
  font-size: 11px;
  line-height: 1.65;
}

.yy-v8-documents {
  grid-column: 1 / -1;
  flex: 1 0 100%;
  display: grid;
  gap: 10px;
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 15px;
}

.yy-v8-documents > strong {
  color: #c8dce6;
  font-size: 12px;
}

.yy-v8-document-list {
  display: grid;
  gap: 7px;
}

.yy-v8-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  min-height: 58px;
  padding: 9px 11px;
  background: #ffffff05;
}

.yy-v8-document-row.primary {
  border-color: #5bdef348;
}

.yy-v8-document-row > span:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.yy-v8-document-row b {
  overflow: hidden;
  color: #d7e7ed;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yy-v8-document-row small {
  color: #61798d;
  font-size: 9px;
}

.yy-v8-document-row > span:last-child {
  display: flex;
  gap: 6px;
}

.yy-v8-document-row a,
.yy-v8-document-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #5bdef344;
  padding: 0 10px;
  color: #9beaf5;
  background: #5bdef308;
  text-decoration: none;
  font-size: 10px;
}

.yy-v8-document-modal[hidden] {
  display: none !important;
}

.yy-v8-document-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  padding: 14px;
  background: #02070df2;
}

.yy-v8-document-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #6f94aa36;
  border-bottom: 0;
  padding: 0 16px;
  color: #dceaf0;
  background: #07131f;
}

.yy-v8-document-modal-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.yy-v8-document-modal-close {
  flex: none;
  min-height: 35px;
  border: 1px solid #78a1b94a;
  padding: 0 14px;
  color: #b9d4df;
  background: #ffffff08;
}

.yy-v8-document-frame {
  width: 100%;
  height: 100%;
  border: 1px solid #6f94aa36;
  background: #20252a;
}

.yy-v8-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .collection-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection-library .landing-library-tools {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .yy-v8-kind-controls {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .yy-v8-kind-button {
    flex: 1 1 auto;
    min-height: 44px;
  }

  .yy-v8-filter-count {
    order: 4;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .collection-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yy-v8-document-row {
    grid-template-columns: 1fr;
  }

  .yy-v8-document-row > span:last-child {
    width: 100%;
  }

  .yy-v8-document-row a,
  .yy-v8-document-open {
    flex: 1;
    min-height: 44px;
  }

  .yy-v8-document-modal {
    grid-template-rows: 58px minmax(0, 1fr);
    padding: 0;
  }
}
