body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #ddd;
  background: #111111;
}

header {
  padding: 20px;
  background: #222;
  color: white;
}

main {
  padding: 20px;
}

.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

input {
  padding: 8px;
}


/* ====================
   テーブル
   ==================== */

.table-wrap {
  max-height: 70vh;
  overflow: auto;
  background: white;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  white-space: nowrap;
  color: #000;
  background: white;
}

/* ====================
   ヘッダー固定
   ==================== */

th {
  position: sticky;
  top: 0;
  z-index: 2;

  background: #eee;

  cursor: pointer;
  user-select: none;
}

th:hover {
  background: #ddd;
}


/* ====================
   Name列固定
   ==================== */

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  background: white;
  z-index: 1;
}


/* ====================
   左上のNameセル
   ==================== */

th:first-child {
  background: #eee;
  z-index: 3;
}


/* ====================
   行
   ==================== */

tr:hover {
  background: #f5f5f5;
}


/* ====================
   ソートアイコン
   ==================== */

.sort-icon {
  margin-left: 5px;
}


/* ====================
   スマホ
   ==================== */

@media (max-width: 600px) {

  header {
    padding: 10px;
  }

  header h1 {
    font-size: 18px;
  }

  main {
    padding: 8px;
  }

  #search {
    width: 150px;
    padding: 5px;
  }

  th,
  td {
    padding: 4px 6px;
    font-size: 10px;
  }

  table {
    font-size: 10px;
  }

  .table-wrap {
    max-height: 70vh;
    overflow: auto;
  }

}