/* home-page.css — 首页分区预览 */

.home-wrap {
  display: none;
  width: 100%;
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.home-wrap.is-visible {
  display: block;
}

.home-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.home-section {
  position: relative;
  width: 100%;
  padding: 20px 20px 52px;
  border-radius: var(--rounded-xl);
  border: 1px solid color-mix(in srgb, var(--hairline) 80%, transparent);
  background: var(--background);
  box-sizing: border-box;
}

.home-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.home-section__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.home-section__icon-svg {
  width: 16px;
  height: 16px;
}

.home-section__icon--blue   { color: #3b82f6; }
.home-section__icon--violet { color: #8b5cf6; }
.home-section__icon--green  { color: #22c55e; }

.home-section__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  line-height: 32px;
}

.home-section__meta {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--rounded-md);
  background: color-mix(in srgb, var(--foreground) 5%, transparent);
}

.home-section__grid {
  --home-row-h: 128px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 320px));
  grid-auto-rows: var(--home-row-h);
  grid-auto-flow: row;
  justify-content: start;
  align-content: start;
  gap: 12px;
  padding-top: 6px;
  max-height: calc(var(--home-row-h) * 2 + 12px + 6px);
  overflow: hidden;
}

.home-section__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted-foreground);
}

.home-section__show-all {
  position: absolute;
  right: 20px;
  bottom: 16px;
  margin: 0;
  padding: 6px 12px;
  border: none;
  border-radius: var(--rounded-md);
  background: color-mix(in srgb, var(--foreground) 5%, transparent);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.home-section__show-all:hover,
.home-section__show-all:focus-visible {
  color: var(--foreground);
  background: color-mix(in srgb, var(--foreground) 10%, transparent);
  outline: none;
}

/* 首页紧凑卡片 */
.bento-card--compact {
  width: 100%;
  height: var(--home-row-h, 128px);
  min-height: 0;
  padding: 6px;
}

.bento-card--compact .bento-card__body {
  gap: 8px;
  height: 100%;
}

.bento-card--compact .bento-card__title {
  font-size: 14px;
}

.bento-card--compact .bento-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
}

.bento-card--compact .bento-card__foot {
  margin-top: auto;
}

.bento-card--compact .bento-card__tags {
  gap: 4px;
}

.bento-card--compact .bento-card__tag {
  padding: 3px 6px;
  font-size: 11px;
}
