:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --radius: 18px;
  --focus: rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: #ffffff;
  color: #111111;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #b6bdd3;
  box-shadow: 0px 5px 10px 0px rgba(45, 67, 139, 0.1);
}
header .head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  header .head-row {
    justify-content: center;
    text-align: center;
  }
}

h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}
h1 img {
  vertical-align: bottom;
}
@media (max-width: 600px) {
  h1 {
    font-size: 18px;
  }
}
h1 .count {
  color: #6b7280;
  white-space: nowrap;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 200px 200px;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
@media (max-width: 980px) {
  .controls {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }
  .controls input[type=search] {
    grid-column: span 2;
  }
}

input[type=search],
select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #111;
  outline: none;
  font-size: 16px;
}
input[type=search]:focus,
select:focus {
  box-shadow: 0 0 0 4px rgba(45, 67, 139, 0.08);
}

section.group-block {
  margin: 22px 0 28px;
}
section.group-block .group-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  border-left: 6px solid #e5e7eb;
}
section.group-block .group-title .group-badge {
  font-size: 12px;
  color: #374151;
  background: #f3f4f6;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  grid-template-columns: repeat(12, 1fr);
}
@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

.card {
  grid-column: span 4;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 3px 5px rgba(45, 67, 139, 0.1);
  overflow: hidden;
}
@media (max-width: 1000px) {
  .card {
    grid-column: span 6;
  }
}
@media (max-width: 640px) {
  .card {
    grid-column: span 12;
  }
}
.card .name-bar {
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.2px;
  border-bottom: 1px solid #e5e7eb;
}
.card .card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card .card-body .meta {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.8;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.card .card-body .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card .card-body .badges .badge {
  font-size: 12px;
  color: #4b5563;
  border: 1px dashed #e5e7eb;
  border-radius: 999px;
  padding: 2px 10px;
  background: #fff;
}
.card .card-body .badges .badge-territory {
  background: #eff6ff;
  color: #1e40af;
  border: 1px dashed #bfdbfe;
}
.card .card-body .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
  text-decoration: none;
  color: #111;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: background 0.15s, border-color 0.15s, transform 0.02s;
}
.btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  background: #f9fafb;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}
.btn:disabled:hover {
  background: #f9fafb;
  border-color: #e5e7eb;
  transform: none;
}

footer {
  border-top: 1px solid #e5e7eb;
  color: #dcdddf;
  font-size: 12px;
  background: #2d438b;
}

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

.nohit {
  padding: 14px;
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  color: #6b7280;
}