:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1f2328;
  --text-muted: #6b7280;
  --border: #e3e5e8;
  --accent: #2563eb;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-header h1 {
  font-size: 22px;
  margin: 0;
}

.search-box input {
  width: 280px;
  max-width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 24px 48px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 28px 0 12px;
  letter-spacing: 0.02em;
}

.pinned-section .section-title {
  margin-top: 8px;
}

.card-grid {
  display: grid;
  gap: 14px;
}

.pinned-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.normal-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.app-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.app-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.pinned-grid .app-card {
  padding: 20px 18px;
}

.pinned-grid .app-icon {
  font-size: 30px;
}

.normal-grid .app-card {
  padding: 10px 12px;
}

.normal-grid .app-icon {
  font-size: 18px;
}

.app-icon {
  flex-shrink: 0;
  line-height: 1;
}

.app-info {
  min-width: 0;
}

.app-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pinned-grid .app-name {
  font-size: 15px;
}

.normal-grid .app-name {
  font-size: 13px;
}

.app-description {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.pinned-grid .app-description {
  display: block;
}

.normal-grid .app-description {
  display: none;
}

.category-block {
  margin-bottom: 8px;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  margin-top: 60px;
}

.page-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 24px;
}

.page-footer code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}
