.plaza-page {
  min-height: 0;
  height: 100%;
}

/* —— Filters —— */
.plaza-filters-panel {
  margin: 8px var(--padding-medium) 0;
  padding: 10px 12px;
  flex-shrink: 0;
  border: 1px solid var(--shadow-light-color, rgba(127, 127, 127, .18));
  border-radius: 10px;
  background: var(--hover-background-color, rgba(127, 127, 127, .04));
}

.plaza-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  min-width: 0;
}

.plaza-filters-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--secondary-text-color);
}

.plaza-filter-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.plaza-user-cloud {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--shadow-light-color, rgba(127, 127, 127, .14));
}

.plaza-user-cloud:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.plaza-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 3px 9px;
  max-width: 100%;
  border: 1px solid var(--shadow-light-color, rgba(127, 127, 127, .22));
  border-radius: 999px;
  background: var(--background-color);
  color: var(--primary-text-color);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  width: auto;
  min-width: 0;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.plaza-chip > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.plaza-chip:hover {
  background: var(--hover-background-color, rgba(127, 127, 127, .1));
}

.plaza-chip.is-active {
  background: hsla(var(--accent-hsl), .12);
  border-color: hsla(var(--accent-hsl), .4);
  color: var(--accent-color, #1988e0);
}

.plaza-chip-count {
  color: var(--secondary-text-color);
  font-size: 11px;
  flex-shrink: 0;
}

.plaza-chip.is-active .plaza-chip-count {
  color: inherit;
  opacity: .75;
}

.plaza-search-form {
  flex: 1;
  min-width: 0;
  max-width: 280px;
  margin-left: auto;
}

.plaza-search-form .field-_0Dm {
  position: relative;
}

.plaza-search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--secondary-text-color);
  background: var(--background-color);
  border: 1px solid var(--shadow-light-color, rgba(127, 127, 127, .25));
  border-radius: 4px;
  padding: 2px 5px;
  pointer-events: none;
  opacity: .85;
}

.plaza-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px var(--padding-medium) 6px;
  flex-shrink: 0;
}

.plaza-select-all {
  font-size: var(--secondary-font-size);
  color: var(--secondary-text-color);
  cursor: pointer;
  user-select: none;
}

/* —— Scroll / List —— */
.plaza-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 var(--padding-medium) var(--padding-medium);
}

.plaza-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 8px;
  align-content: start;
}

/* —— Compact card (no article styles) —— */
.plaza-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px 10px 32px;
  border: 1px solid var(--shadow-light-color, rgba(127, 127, 127, .2));
  border-radius: 8px;
  background: var(--background-color);
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.plaza-card:hover {
  border-color: hsla(var(--accent-hsl), .35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.plaza-card.is-checked {
  background: hsla(var(--accent-hsl), .06);
  border-color: hsla(var(--accent-hsl), .4);
}

.plaza-card-check {
  position: absolute;
  left: 8px;
  top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  z-index: 2;
  cursor: pointer;
}

.plaza-card-check input {
  margin: 0;
  cursor: pointer;
}

.plaza-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.plaza-card-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--primary-text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaza-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  color: var(--secondary-text-color);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  padding-top: 2px;
}

.plaza-card-stat .icon-VKRw {
  color: var(--important-color, #e85d4c);
  opacity: .85;
}

.plaza-card-tip {
  margin: 0;
  padding: 0;
  color: var(--primary-text-color);
  font-size: 12px;
  line-height: 1.4;
  opacity: .85;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: pre-wrap;
}

.plaza-card-url {
  margin: 0;
  color: var(--secondary-text-color);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaza-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.plaza-card-user {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--secondary-text-color);
  font-size: 11px;
  line-height: 1.3;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaza-card-user:hover {
  color: var(--accent-color, #1988e0);
}

.plaza-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0;
  padding: 1px 7px;
  border: 0;
  border-radius: 999px;
  background: var(--hover-background-color, rgba(127, 127, 127, .1));
  color: var(--secondary-text-color);
  font-size: 11px;
  line-height: 1.45;
  cursor: pointer;
  width: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plaza-tag:hover {
  color: var(--accent-color, #1988e0);
  background: hsla(var(--accent-hsl), .12);
}

.plaza-card-actions {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
  position: relative;
  z-index: 2;
}

.plaza-card:hover .plaza-card-actions,
.plaza-card:focus-within .plaza-card-actions {
  display: grid;
}

.plaza-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.plaza-empty,
.plaza-loading {
  padding: var(--padding-medium);
  text-align: center;
}

.cloudmark-public-badge {
  color: var(--accent-color, #1988e0) !important;
  font-weight: 600;
}

@media (max-width: 800px) {
  .plaza-filters-panel {
    margin-top: 6px;
    padding: 8px 10px;
  }

  .plaza-filters-head {
    flex-wrap: wrap;
  }

  .plaza-search-form {
    width: 100%;
    max-width: none;
    order: -1;
    margin-left: 0;
  }

  .plaza-search-kbd {
    display: none;
  }

  .plaza-list {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .plaza-card {
    padding: 9px 10px 9px 30px;
  }

  /* 移动端始终露出操作，避免依赖 hover */
  .plaza-card-actions {
    display: grid;
  }

  .plaza-batch-actions:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex !important;
    justify-content: center;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, var(--background-color) 70%, transparent);
  }

  .plaza-scroll {
    padding-bottom: 56px;
  }
}

@media (min-width: 1200px) {
  .plaza-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
