:root {
  color-scheme: light;
  --ink: #11171e;
  --muted: #607080;
  --line: #d8e0e7;
  --paper: #f5f8fa;
  --white: #ffffff;
  --teal: #087f72;
  --blue: #145cf5;
  --green: #14804a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: 0.92rem; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 0.65rem; }
.home-link { color: var(--muted); font-size: 0.78rem; font-weight: 700; text-decoration: none; }

.catalog-shell {
  min-height: calc(100vh - 76px);
  padding: 68px max(16px, calc((100% - 1120px) / 2)) 80px;
  border-top: 1px solid var(--line);
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.eyebrow,
.category {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

h1 { margin: 0; font-size: 2.5rem; line-height: 1.05; letter-spacing: 0; }
.intro { margin: 14px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.app-count { flex-shrink: 0; color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.app-card {
  display: flex;
  min-width: 0;
  min-height: 340px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(17, 23, 30, 0.07);
}

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.app-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: var(--ink);
}
.app-icon--light {
  border: 1px solid rgba(17, 23, 30, 0.08);
  background: linear-gradient(135deg, #ffffff 0%, #eef3f8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(17, 23, 30, 0.08);
}
.app-icon img { width: 100%; height: 100%; object-fit: contain; }
.status { color: var(--green); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; }

.card-copy h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.card-copy > p:last-child {
  display: -webkit-box;
  min-height: 4.7em;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 18px; color: var(--muted); font-size: 0.7rem; }
.download-count { color: var(--ink); font-weight: 800; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 22px; }
.detail-link,
.download-link { min-height: 36px; border-radius: 7px; font-size: 0.76rem; font-weight: 800; text-decoration: none; }
.detail-link { display: inline-flex; align-items: center; padding: 0 13px; border: 1px solid var(--line); color: var(--ink); }
.download-link { display: inline-flex; align-items: center; color: var(--blue); }

@media (max-width: 760px) {
  .site-header { min-height: 68px; }
  .brand small { display: none; }
  .catalog-shell { min-height: calc(100vh - 68px); padding-top: 50px; }
  .catalog-head { align-items: flex-start; }
  h1 { font-size: 2.1rem; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 320px; }
}
