/* Download detail: readable primary column, restrained sidebar, clear download action. */

[data-page="/PC/Down/Item"]>.content {
  width: min(1200px,calc(100% - 48px));
  margin: 0 auto;
}

.breadcrumbs.container {
  width: 100%;
}

.download-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  align-items: start;
  gap: 24px;
}

.download-panel,.download-sidebar {
  min-width: 0;
}

.download-panel {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-overview {
  display: grid;
  grid-template-columns: 100px minmax(0,1fr) 156px;
  gap: 22px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.app-icon img {
  width: 100px;
  height: 100px;
  border-radius: 22px;
}

.app-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.app-heading h1 {
  font-size: 25px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.app-overview .app-metadata {
  min-width: 0;
  position: relative;
}

.app-overview .app-metadata>ul {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px 12px;
  color: var(--muted);
  font-size: 12px;
}

.app-overview .app-metadata li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-overview .app-metadata li.app-tags {
  grid-column: 1/-1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.app-tags a,.app-tags i {
  padding: 1px 7px;
  border-radius: 4px;
  color: var(--brand);
  background: var(--brand-soft);
}

.download-notice {
  position: relative;
  font-size: 11px;
  color: var(--muted);
  cursor: help;
}

.download-notice-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px;
  padding: 18px;
  z-index: 3;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.download-notice:hover .download-notice-panel {
  display: block;
}

.download-notice-panel .section-heading {
  font-size: 16px;
  margin-bottom: 8px;
}

.download-actions {
  text-align: center;
  padding-top: 8px;
}

.app-rating {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.app-rating .rating-value {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 650;
  color: #f4aa39;
}

.download-primary {
  width: 100%;
  padding-inline: 10px;
  min-height: 44px;
}

.download-qr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.download-qr .img {
  padding: 5px;
  width: 111px;
  height: 111px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.download-qr canvas,.download-qr img {
  width: 99px !important;
  height: 99px !important;
}

.download-qr p {
  max-width: 85px;
  color: var(--muted);
  font-size: 11px;
}

.screenshot-gallery {
  margin: 24px 0;
}

.screenshot-gallery .carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 0 12px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.screenshot-gallery .carousel-slide {
  flex: 0 0 auto;
  width: auto;
  scroll-snap-align: start;
}

.screenshot-gallery img {
  height: 300px;
  width: auto;
  border-radius: 9px;
}

.app-description,.package-info,.related-apps,.related-collections {
  margin-top: 28px;
}

.rich-content {
  font-size: 16px;
  line-height: 1.95;
  color: #465260;
  overflow-wrap: anywhere;
}

.rich-content p {
  margin: 14px 0;
}

.rich-content h2,.rich-content h3 {
  margin: 26px 0 12px;
  color: var(--ink);
  font-size: 20px;
}

.rich-content img,.rich-content video {
  max-width: 100% !important;
  height: auto !important;
  margin: 20px auto;
  border-radius: 8px;
}

.rich-content table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

.package-info h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.package-info-list {
  padding: 18px 20px;
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 13px;
}

.package-info-list li+li {
  margin-top: 6px;
}

.package-info-list span {
  color: #586677;
  overflow-wrap: anywhere;
}

.download-sidebar {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.download-sidebar>.section-heading {
  font-size: 18px;
  margin-bottom: 12px;
}

.sidebar-ranking {
  margin-bottom: 28px;
}

.sidebar-ranking li {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

.sidebar-ranking .sidebar-rank-summary {
  display: flex;
  gap: 9px;
  align-items: center;
}

.sidebar-ranking .sidebar-rank-summary strong {
  min-width: 0;
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-ranking .sidebar-rank-summary strong a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-ranking .sidebar-rank-summary>span {
  display: none;
}

.sidebar-rank-number {
  width: 22px;
  text-align: center;
  color: #9aa8b7;
  font-size: 12px;
}

.sidebar-ranking li:nth-child(-n/**/+3) .sidebar-rank-number {
  color: var(--brand);
  font-weight: 650;
}

.sidebar-ranking .sidebar-rank-detail {
  display: none;
  align-items: center;
  gap: 10px;
}

.sidebar-ranking .is-active .sidebar-rank-summary {
  display: none;
}

.sidebar-ranking .is-active .sidebar-rank-detail {
  display: flex;
}

.sidebar-app-cover img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.sidebar-app-info {
  min-width: 0;
  flex: 1;
}

.sidebar-app-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.sidebar-app-info p {
  color: var(--muted);
  font-size: 11px;
}

.sidebar-app-info .button {
  padding: 2px 9px;
  min-height: 26px;
  margin-top: 5px;
  font-size: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  border-color: transparent;
}

.sidebar-app-list li+li {
  margin-top: 14px;
}

.sidebar-app-list a {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr);
  column-gap: 12px;
}

.sidebar-app-list img {
  grid-row: 1/3;
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.sidebar-app-list h4 {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-app-meta {
  font-size: 11px;
  color: var(--muted);
}

.related-app-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.related-app-cover img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.related-app-info {
  flex: 1;
  min-width: 0;
}

.related-app-name {
  font-weight: 600;
}

.related-app-meta {
  display: flex;
  gap: 15px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.button-small {
  min-height: 32px;
  padding: 4px 13px;
  font-size: 12px;
}

.related-reading li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.related-reading time {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
}

.collection-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}

.collection-header h2 {
  font-size: 20px;
}

.collection-tabs {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.collection-tabs span {
  cursor: pointer;
}

.collection-tabs .is-active {
  color: var(--brand);
}

.collection-panel {
  display: grid;
  grid-template-columns: 200px minmax(0,1fr);
  gap: 20px;
}

.collection-summary>img {
  width: 100%;
  aspect-ratio: 2/1;
  border-radius: 8px;
}

.collection-summary>a span {
  display: none;
}

.collection-summary>a p {
  font-weight: 600;
  margin: 8px 0;
}

.collection-summary>p {
  color: var(--muted);
  font-size: 12px;
}

.collection-panel ul {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 15px;
  text-align: center;
}

.collection-panel li img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  margin: 0 auto 8px;
}

.collection-panel li p {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-panel li>p {
  color: var(--muted);
}

@media (max-width:1100px) {
  .download-layout {
    grid-template-columns: minmax(0,1fr) 260px;
  }

  .download-panel {
    padding: 22px;
  }

  .app-overview {
    grid-template-columns: 80px minmax(0,1fr);
  }

  .app-icon img {
    width: 80px;
    height: 80px;
  }

  .download-actions {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0;
  }

  .app-rating {
    margin: 0;
  }

  .download-primary {
    width: auto;
  }
}
