.page-home {
  --ph-gap-sm: 12px;
  --ph-gap-md: 18px;
  --ph-gap-lg: 28px;
  --ph-radius: 0;
}

.page-home__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 0;
}

.page-home__masthead {
  padding: 14px 16px 10px;
  border-bottom: 2px dashed rgba(142, 91, 158, 0.55);
}

.page-home__masthead h1 {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-text);
}

.page-home__lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 780px;
}

.page-home__section {
  padding: 30px 16px;
}

.page-home__section-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.page-home__section-head .section-title {
  margin: 0;
}

.page-home__section-tip {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--c-muted);
}

.page-home__section--tiles {
  background: var(--c-page);
}

.page-home__section--latest {
  background: var(--c-section-a);
}

.page-home__section--hot {
  background: var(--c-section-b);
}

.page-home__section--tags {
  background: var(--c-page);
}

.page-home__section--guide {
  background: var(--c-section-a);
}

.page-home__section--guide .section-title,
.page-home__section--latest .section-title {
  color: var(--c-text);
}

.page-home__tilegrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ph-gap-sm);
}

.page-home__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 128px;
  padding: 14px;
  border: 2px solid rgba(245, 239, 247, 0.2);
  border-radius: var(--ph-radius);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.page-home__tile:hover,
.page-home__tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 0 0 2px var(--c-accent);
  outline: none;
}

.page-home__tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.page-home__tile-cap {
  position: relative;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.page-home__tile-icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  opacity: 0.28;
}

.page-home__tile-name {
  position: relative;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-home__tile-count {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.page-home__tile--yellow {
  background: var(--c-tag-hot);
  border-color: rgba(255, 255, 255, 0.35);
  color: #1f1507;
}

.page-home__tile--red {
  background: var(--c-update);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff4f4;
}

.page-home__tile--blue {
  background: var(--c-primary);
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b2430;
}

.page-home__tile--green {
  background: var(--c-accent);
  border-color: rgba(0, 0, 0, 0.16);
  color: #0d2812;
}

.page-home__tile--pink {
  background: var(--c-tag-mid);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fffbfe;
}

.page-home__tile--orange {
  background: var(--c-new);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff5ec;
}

.page-home__latest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ph-gap-md);
}

.page-home__latest-card {
  display: flex;
  flex-direction: column;
  background: var(--c-card);
  border: 1px solid rgba(142, 91, 158, 0.55);
  border-radius: var(--ph-radius);
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.page-home__latest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--c-accent);
}

.page-home__latest-media {
  position: relative;
}

.page-home__latest-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  background: #1b1523;
}

.page-home__latest-media .status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}

.page-home__latest-info {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-home__latest-info .card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-text);
}

.page-home__latest-info .card__meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--c-muted);
}

.page-home__hot-banner {
  margin-bottom: 20px;
  border: 2px solid rgba(245, 239, 247, 0.2);
  border-radius: var(--ph-radius);
  overflow: hidden;
}

.page-home__hot-banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-home__hot-body {
  max-width: 880px;
}

.page-home__hot-body .section-title {
  color: var(--c-text);
}

.page-home__sync {
  margin: 12px 0 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid rgba(255, 140, 0, 0.55);
  background: rgba(0, 0, 0, 0.14);
}

.page-home__hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-home__hot-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 2px 10px;
  padding: 8px 10px;
  border-left: 4px solid transparent;
  background: rgba(0, 0, 0, 0.18);
}

.page-home__hot-row:hover {
  border-left-color: var(--c-accent);
  background: rgba(0, 0, 0, 0.28);
}

.page-home__hot-row .index-number {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-primary);
}

.page-home__hot-track {
  grid-column: 2;
  grid-row: 1;
  color: var(--c-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.page-home__hot-track:hover {
  color: var(--c-accent);
  text-decoration: underline;
}

.page-home__hot-count {
  grid-column: 3;
  grid-row: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-tag-hot);
  text-align: right;
}

.page-home__hot-row .metric-bar {
  grid-column: 2 / 4;
  grid-row: 2;
}

.page-home__hot-more {
  margin-top: 18px;
}

.page-home__tags-bg {
  border: 2px solid rgba(142, 91, 158, 0.55);
  border-radius: var(--ph-radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.page-home__tags-bg img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-home__tags-body .section-title {
  color: var(--c-text);
}

.page-home .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.page-home .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: 2px solid rgba(245, 239, 247, 0.18);
  border-radius: var(--ph-radius);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.page-home .tag:hover,
.page-home .tag:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 0 0 2px var(--c-accent);
}

.page-home .tag--hot {
  font-size: 26px;
  padding: 10px 14px;
  background: var(--c-tag-hot);
  color: #221505;
}

.page-home .tag--mid {
  font-size: 20px;
  padding: 8px 12px;
  background: var(--c-tag-mid);
  color: #2d0a1c;
}

.page-home .tag--cool {
  font-size: 16px;
  padding: 6px 10px;
  background: var(--c-tag-cool);
  color: #082831;
}

.page-home .tag--live {
  font-size: 18px;
  padding: 7px 11px;
  background: rgba(57, 255, 20, 0.14);
  color: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.28);
}

.page-home .tag--live:hover {
  box-shadow: 0 0 0 2px var(--c-accent), 0 0 14px rgba(57, 255, 20, 0.4);
}

.page-home__tag-count {
  font-family: var(--font-mono);
  font-size: 0.72em;
  opacity: 0.78;
}

.page-home__indexbars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-home .index-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid rgba(142, 91, 158, 0.5);
  background: rgba(36, 30, 46, 0.5);
}

.page-home .index-bar__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--c-muted);
  margin-right: 4px;
}

.page-home .index-bar__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--c-text);
  text-decoration: none;
  border: 1px solid transparent;
}

.page-home .index-bar__item:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.page-home .index-bar__item.is-active {
  background: var(--c-primary);
  color: #0b2430;
}

.page-home__guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ph-gap-md);
}

.page-home__guide-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px 16px;
  background: var(--c-card);
  border: 1px solid rgba(142, 91, 158, 0.55);
  border-radius: var(--ph-radius);
}

.page-home__guide-step {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--c-accent);
}

.page-home__guide-card .card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
}

.page-home__guide-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-muted);
}

.page-home__guide-card .btn {
  align-self: flex-start;
  margin-top: 4px;
}

@media (min-width: 600px) {
  .page-home__topbar,
  .page-home__masthead,
  .page-home__section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .page-home__masthead h1 {
    font-size: 30px;
  }

  .page-home__lead {
    font-size: 14px;
  }

  .page-home__latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-home__latest-card--wide {
    flex-direction: row;
  }

  .page-home__latest-card--wide .page-home__latest-media {
    flex: 0 0 42%;
  }

  .page-home__latest-card--wide .page-home__latest-info {
    flex: 1 1 auto;
    justify-content: center;
  }

  .page-home__guide-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .page-home__tilegrid {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }

  .page-home__tile--span1 {
    grid-column: span 1;
  }

  .page-home__tile--span2 {
    grid-column: span 2;
  }

  .page-home__tile--span3 {
    grid-column: span 3;
  }

  .page-home__tile {
    min-height: 152px;
    padding: 16px;
  }

  .page-home__tile-name {
    font-size: 22px;
  }

  .page-home__tile-count {
    font-size: 14px;
  }

  .page-home__section {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1024px) {
  .page-home__topbar,
  .page-home__masthead,
  .page-home__section {
    padding-left: 40px;
    padding-right: 40px;
  }

  .page-home__masthead {
    padding-top: 20px;
    padding-bottom: 16px;
  }

  .page-home__masthead h1 {
    font-size: 34px;
    max-width: 880px;
  }

  .page-home__lead {
    font-size: 15px;
  }

  .page-home__latest-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-home__latest-card--wide {
    grid-column: span 2;
  }

  .page-home__hot-banner img {
    max-height: 260px;
    object-fit: cover;
  }

  .page-home__hot-row {
    padding: 10px 12px;
  }

  .page-home__tags-bg {
    margin-bottom: 24px;
  }

  .page-home__section--guide {
    padding-bottom: 40px;
  }
}
