* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --teal: #0097a7;
  --teal-bright: #00b8d4;
  --teal-light: #e4f7fa;
  --border: #e3e6e8;
  --text: #222;
  --muted: #888;
  --bg: #f6f8f9;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  background: linear-gradient(135deg, #0097a7, #00b8d4);
  color: #fff; padding: 18px 28px;
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
header h1 { font-size: 20px; font-weight: 600; letter-spacing: 1px; }
header .status { font-size: 12px; opacity: .92; }
header .status b { color: #fff8b0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 20px; }

.searchbar { margin-bottom: 12px; }
.searchbar input {
  width: 100%; max-width: 380px; padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: #fff; outline: none;
}
.searchbar input:focus { border-color: var(--teal); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; align-items: center; }
.chip {
  border: 1px solid var(--border); background: #fff; color: #555;
  padding: 6px 14px; border-radius: 18px; cursor: pointer; font-size: 13px; user-select: none;
}
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip .cnt { opacity: .6; margin-left: 4px; }

.group { margin-bottom: 28px; }
.group-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--teal-light);
}
.group-head h2 { font-size: 15px; font-weight: 600; color: var(--teal); }
.group-head .n { font-size: 12px; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tile {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  border-left: 3px solid transparent;
}
.tile:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  border-left-color: var(--teal);
  box-shadow: 0 4px 14px rgba(0,151,167,.14);
}
.tile .nm {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px; font-weight: 500; line-height: 1.4;
  min-height: 2.8em;
  margin-bottom: 3px; color: #222;
}
.tile:hover .nm { color: var(--teal); }
.tile .dm {
  display: block; font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 50px; color: var(--muted); font-size: 14px;
}
.loading .spinner {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-top-color: var(--teal); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 40px; text-align: center; color: var(--muted); font-size: 14px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
footer a { color: var(--teal); text-decoration: none; }

@media (max-width: 560px) {
  header { padding: 16px 18px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .wrap { padding: 16px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { padding: 10px 12px; }
  .tile .nm { font-size: 13px; }
}
