* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, "Segoe UI", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

input {
  font: inherit;
}

.team-list-app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.team-list-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(180px, 340px) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 760;
}

.brand h1 a {
  color: inherit;
  text-decoration: none;
}

.brand h1 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.brand .powered-by {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
}

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

.search {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  outline: none;
}

.search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.summary {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
}

.metric {
  min-width: 92px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
}

.nav-links {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.nav-links a:hover {
  border-color: var(--accent);
}

.team-list-content {
  min-width: 0;
  padding: 16px;
}

.team-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.team-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.team-card:hover {
  border-color: var(--accent);
}

.team-card-visual {
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
  background: var(--img-bg);
  overflow: hidden;
}

.team-card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.team-card:hover .team-card-visual img {
  transform: scale(1.02);
}

.team-card-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 34px;
  font-weight: 800;
}

.team-card-body {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.team-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.team-symbol {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.team-card h2 {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.team-card-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.idea-title {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text-2);
  font-weight: 720;
  line-height: 1.35;
}

.idea-overview {
  margin: 0;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.team-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.team-card-stats span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 32px auto;
  max-width: 460px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1160px) {
  .team-list-topbar {
    grid-template-columns: 1fr;
  }

  .summary {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .team-list-topbar,
  .team-list-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand h1 {
    font-size: 15px;
  }

  .team-list-grid {
    grid-template-columns: 1fr;
  }

  .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-links {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
  }

  .nav-links a {
    min-width: 0;
    padding: 0 6px;
    font-size: 12px;
  }
}
