:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #111827;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: #f6f7f9;
}

button,
input {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.page {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 22px) 16px calc(env(safe-area-inset-bottom) + 24px);
}

.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.kicker {
  margin: 0 0 7px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.2;
}

h1 {
  margin: 0;
  color: #111827;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.count {
  flex: 0 0 auto;
  margin: 0 0 3px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.2;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  /* margin-bottom: 16px; */
}

.stat-card {
  min-width: 0;
  border: 1px solid #edf0f3;
  border-radius: 14px;
  padding: 12px 13px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
}

.stat-card span {
  display: block;
  margin-bottom: 7px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.2;
}

.stat-card strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-section {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -16px 14px;
  padding: 12px 16px;
  background: rgba(246, 247, 249, 0.92);
  backdrop-filter: blur(16px);
}

.search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 5px 6px 5px 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.search:focus-within {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.search-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #9ca3af;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search input {
  min-width: 0;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 16px;
  outline: none;
}

.search input::placeholder {
  color: #9ca3af;
}

.search button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 180ms ease, transform 180ms ease;
}

.search button:active,
.pager button:active,
.open-link:active {
  transform: translateY(1px);
}

.list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  border: 1px solid #edf0f3;
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.045);
}

.item-main {
  min-width: 0;
}

.item-title {
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.2;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d1d5db;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.open-link:hover,
.open-link:focus-visible {
  background: #111827;
  color: #ffffff;
  outline: none;
}

.open-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.status {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #6b7280;
  font-size: 15px;
  text-align: center;
}

.status-empty {
  gap: 7px;
  min-height: 220px;
  border: 1px dashed #d9dee7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
}

.status-empty strong,
.status-empty span {
  display: block;
}

.status-empty strong {
  color: #111827;
  font-size: 16px;
}

.status-empty span {
  color: #6b7280;
  font-size: 14px;
}

.pager {
  display: grid;
  grid-template-columns: 94px 1fr 94px;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.pager button {
  min-height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 180ms ease, transform 180ms ease;
}

.pager button:disabled {
  color: #c0c4cc;
  background: #f9fafb;
}

.pager span {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 360px) {
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .search-section {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 28px;
  }

  .pager {
    grid-template-columns: 86px 1fr 86px;
    gap: 8px;
  }
}
